[Top] [All Lists]

[PATCH 0/5] MIPS: Move cache setup earlier.

Subject: [PATCH 0/5] MIPS: Move cache setup earlier.
From: David Daney <>
Date: Mon, 19 Dec 2011 15:16:37 -0800
Cc: David Daney <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=aRBFSDyQGridUBb0yT6+/SMbCPCSs6+VvI/jZl89UTU=; b=j9qTw7XISWF8Mw189vGbmG2s2mMkb+z7iol0FZ6UmkqkAm4c9LJXvvTcL9URJbvbRV 6hAJ6tRy+LA1h7vqWBxPxv2zUOft/4tahaCBvBr9XTDD7ojKpFzYlfta3hwGTbHO2g/F WQ1WuW8/91fzJuVzwkQBy5YkkeEUA4X5ziluo=
From: David Daney <>

Found on 3.2-rc4, if jump label things are enabled, the kernel will
not boot on MIPS.

As noted in patch 5/5, this was caused by: commit
97ce2c88f9ad42e3c60a9beb9fca87abf3639faa (jump-label: initialize
jump-label subsystem much earlier).

The fix is to make flush_icache_range() usable earlier.  I do this by
calling cpu_cache_init() from setup_arch().  For the boot CPU we can
no longer call this from per_cpu_trap_init(), so I add a flag to that
function so we can skip the call if on the boot CPU.

Some of the code in the various cpu_cache_init() functions however
could not be called this early, so I moved it into functions called by
the new board_cache_error_setup() hook.

Tested on Octeon and ip32-R5000

David Daney (5):
  MIPS: Introduce board_cache_error_setup() hook.
  MIPS: Make set_handler() __cpuinit.
  MIPS: Octeon: Use board_cache_error_setup for cache error handler
  MIPS: Use board_cache_error_setup for r4k cache error handler setup.
  MIPS: Move cache setup to setup_arch().

 arch/mips/include/asm/system.h |    2 +-
 arch/mips/include/asm/traps.h  |    1 +
 arch/mips/kernel/setup.c       |    3 +++
 arch/mips/kernel/smp.c         |    2 +-
 arch/mips/kernel/traps.c       |   15 ++++++++++-----
 arch/mips/mm/c-octeon.c        |   14 ++++++++------
 arch/mips/mm/c-r4k.c           |   14 ++++++++++----
 7 files changed, 34 insertions(+), 17 deletions(-)


<Prev in Thread] Current Thread [Next in Thread>