[Top] [All Lists]

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

Subject: [PATCH v2 0/5] MIPS: Move cache setup earlier.
From: David Daney <>
Date: Mon, 14 May 2012 17:04:45 -0700
Cc: David Daney <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=Ssmh8eUXeY+viPRvhhPPKpTKTE14ZCQ8NUWnBUkRVy0=; b=0DhCgmkOC4IswMQ79kBGxq+GGo6DES2sc4hmpITsf5GRHXtpAdvLV7bbu/ffPsf56s ycNf+fqyufPgxde5R4qF99Lgi7E8473NDPW7EVahFXep4GXUcqqVHUsYgHBriuWWkvyt n/p/p3+D4h6iAgPmNMyyMEj+YHPRBu8oryyMxvRAsmpV94VgfmASNFX0+ea9t5HpSkFw RE+Okvx6xwiTDrPgekK7EEh2wXe3BTqeO3zMj/iOS4tyHSUE0Zgvr5X532k4LVw2ZSNg H69HPLqAyqhyZi02MSkqF2G2MIrgZKoOSy66K/jn1MZCNYB8S56/CrZx1fdCEV/QeeJ/ g/8w==
From: David Daney <>

v2: Rebased to 3.4-rc7

>From v1:

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/setup.h |    3 ++-
 arch/mips/include/asm/traps.h |    1 +
 arch/mips/kernel/setup.c      |    2 ++
 arch/mips/kernel/smp.c        |    2 +-
 arch/mips/kernel/traps.c      |   16 ++++++++++------
 arch/mips/mm/c-octeon.c       |   14 ++++++++------
 arch/mips/mm/c-r4k.c          |   14 ++++++++++----
 7 files changed, 34 insertions(+), 18 deletions(-)


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