diff options
Diffstat (limited to 'arch/sh/mm')
-rw-r--r-- | arch/sh/mm/tlb-sh4.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/arch/sh/mm/tlb-sh4.c b/arch/sh/mm/tlb-sh4.c index 13fde8cc7179..2d1dd6044307 100644 --- a/arch/sh/mm/tlb-sh4.c +++ b/arch/sh/mm/tlb-sh4.c | |||
@@ -4,27 +4,14 @@ | |||
4 | * SH-4 specific TLB operations | 4 | * SH-4 specific TLB operations |
5 | * | 5 | * |
6 | * Copyright (C) 1999 Niibe Yutaka | 6 | * Copyright (C) 1999 Niibe Yutaka |
7 | * Copyright (C) 2002 Paul Mundt | 7 | * Copyright (C) 2002 - 2007 Paul Mundt |
8 | * | 8 | * |
9 | * Released under the terms of the GNU GPL v2.0. | 9 | * Released under the terms of the GNU GPL v2.0. |
10 | */ | 10 | */ |
11 | #include <linux/signal.h> | ||
12 | #include <linux/sched.h> | ||
13 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
14 | #include <linux/errno.h> | ||
15 | #include <linux/string.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/ptrace.h> | ||
18 | #include <linux/mman.h> | ||
19 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
20 | #include <linux/smp.h> | 13 | #include <linux/io.h> |
21 | #include <linux/smp_lock.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | |||
24 | #include <asm/system.h> | 14 | #include <asm/system.h> |
25 | #include <asm/io.h> | ||
26 | #include <asm/uaccess.h> | ||
27 | #include <asm/pgalloc.h> | ||
28 | #include <asm/mmu_context.h> | 15 | #include <asm/mmu_context.h> |
29 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
30 | 17 | ||
@@ -62,12 +49,22 @@ void update_mmu_cache(struct vm_area_struct * vma, | |||
62 | vpn = (address & MMU_VPN_MASK) | get_asid(); | 49 | vpn = (address & MMU_VPN_MASK) | get_asid(); |
63 | ctrl_outl(vpn, MMU_PTEH); | 50 | ctrl_outl(vpn, MMU_PTEH); |
64 | 51 | ||
65 | pteval = pte_val(pte); | 52 | pteval = pte.pte_low; |
66 | 53 | ||
67 | /* Set PTEA register */ | 54 | /* Set PTEA register */ |
55 | #ifdef CONFIG_X2TLB | ||
56 | /* | ||
57 | * For the extended mode TLB this is trivial, only the ESZ and | ||
58 | * EPR bits need to be written out to PTEA, with the remainder of | ||
59 | * the protection bits (with the exception of the compat-mode SZ | ||
60 | * and PR bits, which are cleared) being written out in PTEL. | ||
61 | */ | ||
62 | ctrl_outl(pte.pte_high, MMU_PTEA); | ||
63 | #else | ||
68 | if (cpu_data->flags & CPU_HAS_PTEA) | 64 | if (cpu_data->flags & CPU_HAS_PTEA) |
69 | /* TODO: make this look less hacky */ | 65 | /* TODO: make this look less hacky */ |
70 | ctrl_outl(((pteval >> 28) & 0xe) | (pteval & 0x1), MMU_PTEA); | 66 | ctrl_outl(((pteval >> 28) & 0xe) | (pteval & 0x1), MMU_PTEA); |
67 | #endif | ||
71 | 68 | ||
72 | /* Set PTEL register */ | 69 | /* Set PTEL register */ |
73 | pteval &= _PAGE_FLAGS_HARDWARE_MASK; /* drop software flags */ | 70 | pteval &= _PAGE_FLAGS_HARDWARE_MASK; /* drop software flags */ |
@@ -98,4 +95,3 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page) | |||
98 | ctrl_outl(data, addr); | 95 | ctrl_outl(data, addr); |
99 | back_to_P1(); | 96 | back_to_P1(); |
100 | } | 97 | } |
101 | |||