Commit 5890f70f authored by Leonid Yegoshin's avatar Leonid Yegoshin Committed by Ralf Baechle

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: default avatarLeonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7339/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 6ee729aa
...@@ -90,6 +90,7 @@ extern asmlinkage void handle_mt(void); ...@@ -90,6 +90,7 @@ extern asmlinkage void handle_mt(void);
extern asmlinkage void handle_dsp(void); extern asmlinkage void handle_dsp(void);
extern asmlinkage void handle_mcheck(void); extern asmlinkage void handle_mcheck(void);
extern asmlinkage void handle_reserved(void); extern asmlinkage void handle_reserved(void);
extern void tlb_do_page_fault_0(void);
void (*board_be_init)(void); void (*board_be_init)(void);
int (*board_be_handler)(struct pt_regs *regs, int is_fixup); int (*board_be_handler)(struct pt_regs *regs, int is_fixup);
...@@ -2114,6 +2115,12 @@ void __init trap_init(void) ...@@ -2114,6 +2115,12 @@ void __init trap_init(void)
set_except_vector(15, handle_fpe); set_except_vector(15, handle_fpe);
set_except_vector(16, handle_ftlb); set_except_vector(16, handle_ftlb);
if (cpu_has_rixiex) {
set_except_vector(19, tlb_do_page_fault_0);
set_except_vector(20, tlb_do_page_fault_0);
}
set_except_vector(21, handle_msa); set_except_vector(21, handle_msa);
set_except_vector(22, handle_mdmx); set_except_vector(22, handle_mdmx);
......
...@@ -1919,7 +1919,7 @@ static void build_r4000_tlb_load_handler(void) ...@@ -1919,7 +1919,7 @@ static void build_r4000_tlb_load_handler(void)
if (m4kc_tlbp_war()) if (m4kc_tlbp_war())
build_tlb_probe_entry(&p); build_tlb_probe_entry(&p);
if (cpu_has_rixi) { if (cpu_has_rixi && !cpu_has_rixiex) {
/* /*
* If the page is not _PAGE_VALID, RI or XI could not * If the page is not _PAGE_VALID, RI or XI could not
* have triggered it. Skip the expensive test.. * have triggered it. Skip the expensive test..
...@@ -1986,7 +1986,7 @@ static void build_r4000_tlb_load_handler(void) ...@@ -1986,7 +1986,7 @@ static void build_r4000_tlb_load_handler(void)
build_pte_present(&p, &r, wr.r1, wr.r2, wr.r3, label_nopage_tlbl); build_pte_present(&p, &r, wr.r1, wr.r2, wr.r3, label_nopage_tlbl);
build_tlb_probe_entry(&p); build_tlb_probe_entry(&p);
if (cpu_has_rixi) { if (cpu_has_rixi && !cpu_has_rixiex) {
/* /*
* If the page is not _PAGE_VALID, RI or XI could not * If the page is not _PAGE_VALID, RI or XI could not
* have triggered it. Skip the expensive test.. * have triggered it. Skip the expensive test..
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment