sparc64: fix mmu context at trap levels above zero
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>
Sat, 22 May 2010 10:52:35 +0000 (14:52 +0400)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 22 May 2010 12:51:48 +0000 (12:51 +0000)
commitb26305a6a6fdde649ad59c16ef714906851a0f8c
treea502557fbb90efc2bb6ba2acddf1fbdfef598337
parentb87378465a02bb3a9ec4c02a41a5519e39688c76
sparc64: fix mmu context at trap levels above zero

- cpu_mmu_index return MMU_NUCLEUS_IDX if trap level is not zero
- cpu_get_tb_cpu_state: store trap level and primary context in flags
  this allows to restart code translation when address translation is changed
- stop translation block after writing to pstate and tl registers
- stop translation block after writing to alternate space
  this can be optimized to stop only if address translation can be changed
  by write operation (e.g. by comparing with MMU ASI values)

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-sparc/cpu.h
target-sparc/helper.c
target-sparc/translate.c