diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 14:55:41 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 14:55:41 +0900 |
commit | 749cf486920bf53f16e6a6889d9635a91ffb6c82 (patch) | |
tree | ff288990effd0fe5bf980d6c27af5dc9ad11bc3d /arch/sh/mm/tlb-sh4.c | |
parent | 94c0fa520cc169ccf661e9c03b5b95f74d1520b8 (diff) |
sh: Add flag for MMU PTEA capability.
Add CPU_HAS_PTEA, refactor some of the cpu flag settings.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/tlb-sh4.c')
-rw-r--r-- | arch/sh/mm/tlb-sh4.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/sh/mm/tlb-sh4.c b/arch/sh/mm/tlb-sh4.c index 96e5fb0ac4fa..812b2d567de2 100644 --- a/arch/sh/mm/tlb-sh4.c +++ b/arch/sh/mm/tlb-sh4.c @@ -36,9 +36,6 @@ void update_mmu_cache(struct vm_area_struct * vma, unsigned long vpn; struct page *page; unsigned long pfn; -#ifndef CONFIG_CPU_SUBTYPE_SH7780 - unsigned long ptea; -#endif /* Ptrace may call this routine. */ if (vma && current->active_mm != vma->vm_mm) @@ -61,12 +58,11 @@ void update_mmu_cache(struct vm_area_struct * vma, ctrl_outl(vpn, MMU_PTEH); pteval = pte_val(pte); -#ifndef CONFIG_CPU_SUBTYPE_SH7780 + /* Set PTEA register */ - /* TODO: make this look less hacky */ - ptea = ((pteval >> 28) & 0xe) | (pteval & 0x1); - ctrl_outl(ptea, MMU_PTEA); -#endif + if (cpu_data->flags & CPU_HAS_PTEA) + /* TODO: make this look less hacky */ + ctrl_outl(((pteval >> 28) & 0xe) | (pteval & 0x1), MMU_PTEA); /* Set PTEL register */ pteval &= _PAGE_FLAGS_HARDWARE_MASK; /* drop software flags */ |