diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-17 21:01:02 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:13:34 -0500 |
commit | 8b234274418d6d79527c4ac3a72da446ca4cb35f (patch) | |
tree | ab4ab14fa7f1cab7889ecc2339f0261253a5d0e1 /arch/sparc64/mm/init.c | |
parent | 7adb37fe80d06cbd40de9b225b12a3a9ec40b6bb (diff) |
[SPARC64]: More TLB/TSB handling fixes.
The SUN4V convention with non-shared TSBs is that the context
bit of the TAG is clear. So we have to choose an "invalid"
bit and initialize new TSBs appropriately. Otherwise a zero
TAG looks "valid".
Make sure, for the window fixup cases, that we use the right
global registers and that we don't potentially trample on
the live global registers in etrap/rtrap handling (%g2 and
%g6) and that we put the missing virtual address properly
in %g5.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/mm/init.c')
-rw-r--r-- | arch/sparc64/mm/init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index bd9e3205674b..aa2aec6373c3 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c | |||
@@ -296,7 +296,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t p | |||
296 | 296 | ||
297 | tsb = &mm->context.tsb[(address >> PAGE_SHIFT) & | 297 | tsb = &mm->context.tsb[(address >> PAGE_SHIFT) & |
298 | (mm->context.tsb_nentries - 1UL)]; | 298 | (mm->context.tsb_nentries - 1UL)]; |
299 | tag = (address >> 22UL) | CTX_HWBITS(mm->context) << 48UL; | 299 | tag = (address >> 22UL); |
300 | tsb_insert(tsb, tag, pte_val(pte)); | 300 | tsb_insert(tsb, tag, pte_val(pte)); |
301 | } | 301 | } |
302 | } | 302 | } |
@@ -1110,6 +1110,8 @@ void __init paging_init(void) | |||
1110 | kern_base = (prom_boot_mapping_phys_low >> 22UL) << 22UL; | 1110 | kern_base = (prom_boot_mapping_phys_low >> 22UL) << 22UL; |
1111 | kern_size = (unsigned long)&_end - (unsigned long)KERNBASE; | 1111 | kern_size = (unsigned long)&_end - (unsigned long)KERNBASE; |
1112 | 1112 | ||
1113 | memset(swapper_tsb, 0x40, sizeof(swapper_tsb)); | ||
1114 | |||
1113 | if (tlb_type == hypervisor) | 1115 | if (tlb_type == hypervisor) |
1114 | sun4v_pgprot_init(); | 1116 | sun4v_pgprot_init(); |
1115 | else | 1117 | else |