diff options
author | Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> | 2014-07-15 09:09:56 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-08-01 18:06:39 -0400 |
commit | 5890f70f15c52d0204a578422f8da828a0ba1096 (patch) | |
tree | 433c553c87e4e9150fdffbbc8d8026f747e21f5f /arch | |
parent | 6ee729aa6c06c9bc2bc1dd27e809e8fe976a9e04 (diff) |
MIPS: Use dedicated exception handler if CPU supports RI/XI exceptions
Use the regular tlb_do_page_fault_0 (no write) handler to handle
the RI and XI exceptions. Also skip the RI/XI validation check
on TLB load handler since it's redundant when the CPU has
unique RI/XI exceptions.
Singed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7339/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/kernel/traps.c | 7 | ||||
-rw-r--r-- | arch/mips/mm/tlbex.c | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 51706d6dd5b0..1a328b1e288b 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -90,6 +90,7 @@ extern asmlinkage void handle_mt(void); | |||
90 | extern asmlinkage void handle_dsp(void); | 90 | extern asmlinkage void handle_dsp(void); |
91 | extern asmlinkage void handle_mcheck(void); | 91 | extern asmlinkage void handle_mcheck(void); |
92 | extern asmlinkage void handle_reserved(void); | 92 | extern asmlinkage void handle_reserved(void); |
93 | extern void tlb_do_page_fault_0(void); | ||
93 | 94 | ||
94 | void (*board_be_init)(void); | 95 | void (*board_be_init)(void); |
95 | int (*board_be_handler)(struct pt_regs *regs, int is_fixup); | 96 | int (*board_be_handler)(struct pt_regs *regs, int is_fixup); |
@@ -2114,6 +2115,12 @@ void __init trap_init(void) | |||
2114 | set_except_vector(15, handle_fpe); | 2115 | set_except_vector(15, handle_fpe); |
2115 | 2116 | ||
2116 | set_except_vector(16, handle_ftlb); | 2117 | set_except_vector(16, handle_ftlb); |
2118 | |||
2119 | if (cpu_has_rixiex) { | ||
2120 | set_except_vector(19, tlb_do_page_fault_0); | ||
2121 | set_except_vector(20, tlb_do_page_fault_0); | ||
2122 | } | ||
2123 | |||
2117 | set_except_vector(21, handle_msa); | 2124 | set_except_vector(21, handle_msa); |
2118 | set_except_vector(22, handle_mdmx); | 2125 | set_except_vector(22, handle_mdmx); |
2119 | 2126 | ||
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 0d9d0f06dbb2..ccf8298e7ab2 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -1919,7 +1919,7 @@ static void build_r4000_tlb_load_handler(void) | |||
1919 | if (m4kc_tlbp_war()) | 1919 | if (m4kc_tlbp_war()) |
1920 | build_tlb_probe_entry(&p); | 1920 | build_tlb_probe_entry(&p); |
1921 | 1921 | ||
1922 | if (cpu_has_rixi) { | 1922 | if (cpu_has_rixi && !cpu_has_rixiex) { |
1923 | /* | 1923 | /* |
1924 | * If the page is not _PAGE_VALID, RI or XI could not | 1924 | * If the page is not _PAGE_VALID, RI or XI could not |
1925 | * have triggered it. Skip the expensive test.. | 1925 | * have triggered it. Skip the expensive test.. |
@@ -1986,7 +1986,7 @@ static void build_r4000_tlb_load_handler(void) | |||
1986 | build_pte_present(&p, &r, wr.r1, wr.r2, wr.r3, label_nopage_tlbl); | 1986 | build_pte_present(&p, &r, wr.r1, wr.r2, wr.r3, label_nopage_tlbl); |
1987 | build_tlb_probe_entry(&p); | 1987 | build_tlb_probe_entry(&p); |
1988 | 1988 | ||
1989 | if (cpu_has_rixi) { | 1989 | if (cpu_has_rixi && !cpu_has_rixiex) { |
1990 | /* | 1990 | /* |
1991 | * If the page is not _PAGE_VALID, RI or XI could not | 1991 | * If the page is not _PAGE_VALID, RI or XI could not |
1992 | * have triggered it. Skip the expensive test.. | 1992 | * have triggered it. Skip the expensive test.. |