Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Octeon: Use board_cache_error_setup for cache error handler setup.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3820/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

David Daney and committed by
Ralf Baechle
586016eb e3dc81f2

+8 -6
+8 -6
arch/mips/mm/c-octeon.c
··· 21 21 #include <asm/page.h> 22 22 #include <asm/pgtable.h> 23 23 #include <asm/r4kcache.h> 24 + #include <asm/traps.h> 24 25 #include <asm/mmu_context.h> 25 26 #include <asm/war.h> 26 27 ··· 249 248 } 250 249 } 251 250 251 + static void __cpuinit octeon_cache_error_setup(void) 252 + { 253 + extern char except_vec2_octeon; 254 + set_handler(0x100, &except_vec2_octeon, 0x80); 255 + } 252 256 253 257 /** 254 258 * Setup the Octeon cache flush routines ··· 261 255 */ 262 256 void __cpuinit octeon_cache_init(void) 263 257 { 264 - extern unsigned long ebase; 265 - extern char except_vec2_octeon; 266 - 267 - memcpy((void *)(ebase + 0x100), &except_vec2_octeon, 0x80); 268 - octeon_flush_cache_sigtramp(ebase + 0x100); 269 - 270 258 probe_octeon(); 271 259 272 260 shm_align_mask = PAGE_SIZE - 1; ··· 280 280 281 281 build_clear_page(); 282 282 build_copy_page(); 283 + 284 + board_cache_error_setup = octeon_cache_error_setup; 283 285 } 284 286 285 287 /**