diff options
author | Kevin Cernekee <cernekee@gmail.com> | 2014-10-21 00:27:59 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-11-24 01:45:11 -0500 |
commit | d8010ceba66ac8d1953a1fb00ead89f4ee8a76f5 (patch) | |
tree | 3f053d131a0f822ae9545deb061b8987113b50e0 | |
parent | bbf2ba67cdbdb3676a661c3eba5572d1e513627f (diff) |
MIPS: BMIPS: Let each platform customize the CPU1 IRQ mask
On some chips like bcm3384, "other stuff" gets wired up to CPU1's IE_IRQ1
input, generating spurious IRQs. In this case we want the platform code
to be able to mask it off.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Cc: f.fainelli@gmail.com
Cc: mbizon@freebox.fr
Cc: jogo@openwrt.org
Cc: jfraser@broadcom.com
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8163/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/include/asm/bmips.h | 1 | ||||
-rw-r--r-- | arch/mips/kernel/smp-bmips.c | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/mips/include/asm/bmips.h b/arch/mips/include/asm/bmips.h index cbaccebf5065..30939b02e3ff 100644 --- a/arch/mips/include/asm/bmips.h +++ b/arch/mips/include/asm/bmips.h | |||
@@ -84,6 +84,7 @@ extern char bmips_smp_int_vec_end; | |||
84 | extern int bmips_smp_enabled; | 84 | extern int bmips_smp_enabled; |
85 | extern int bmips_cpu_offset; | 85 | extern int bmips_cpu_offset; |
86 | extern cpumask_t bmips_booted_mask; | 86 | extern cpumask_t bmips_booted_mask; |
87 | extern unsigned long bmips_tp1_irqs; | ||
87 | 88 | ||
88 | extern void bmips_ebase_setup(void); | 89 | extern void bmips_ebase_setup(void); |
89 | extern asmlinkage void plat_wired_tlb_setup(void); | 90 | extern asmlinkage void plat_wired_tlb_setup(void); |
diff --git a/arch/mips/kernel/smp-bmips.c b/arch/mips/kernel/smp-bmips.c index 162391d548b5..b8bd9340c9c7 100644 --- a/arch/mips/kernel/smp-bmips.c +++ b/arch/mips/kernel/smp-bmips.c | |||
@@ -43,6 +43,7 @@ static int __maybe_unused max_cpus = 1; | |||
43 | int bmips_smp_enabled = 1; | 43 | int bmips_smp_enabled = 1; |
44 | int bmips_cpu_offset; | 44 | int bmips_cpu_offset; |
45 | cpumask_t bmips_booted_mask; | 45 | cpumask_t bmips_booted_mask; |
46 | unsigned long bmips_tp1_irqs = IE_IRQ1; | ||
46 | 47 | ||
47 | #define RESET_FROM_KSEG0 0x80080800 | 48 | #define RESET_FROM_KSEG0 0x80080800 |
48 | #define RESET_FROM_KSEG1 0xa0080800 | 49 | #define RESET_FROM_KSEG1 0xa0080800 |
@@ -257,7 +258,7 @@ static void bmips_smp_finish(void) | |||
257 | write_c0_compare(read_c0_count() + mips_hpt_frequency / HZ); | 258 | write_c0_compare(read_c0_count() + mips_hpt_frequency / HZ); |
258 | 259 | ||
259 | irq_enable_hazard(); | 260 | irq_enable_hazard(); |
260 | set_c0_status(IE_SW0 | IE_SW1 | IE_IRQ1 | IE_IRQ5 | ST0_IE); | 261 | set_c0_status(IE_SW0 | IE_SW1 | bmips_tp1_irqs | IE_IRQ5 | ST0_IE); |
261 | irq_enable_hazard(); | 262 | irq_enable_hazard(); |
262 | } | 263 | } |
263 | 264 | ||
@@ -387,7 +388,8 @@ void __ref play_dead(void) | |||
387 | * IRQ handlers; this clears ST0_IE and returns immediately. | 388 | * IRQ handlers; this clears ST0_IE and returns immediately. |
388 | */ | 389 | */ |
389 | clear_c0_cause(CAUSEF_IV | C_SW0 | C_SW1); | 390 | clear_c0_cause(CAUSEF_IV | C_SW0 | C_SW1); |
390 | change_c0_status(IE_IRQ5 | IE_IRQ1 | IE_SW0 | IE_SW1 | ST0_IE | ST0_BEV, | 391 | change_c0_status( |
392 | IE_IRQ5 | bmips_tp1_irqs | IE_SW0 | IE_SW1 | ST0_IE | ST0_BEV, | ||
391 | IE_SW0 | IE_SW1 | ST0_IE | ST0_BEV); | 393 | IE_SW0 | IE_SW1 | ST0_IE | ST0_BEV); |
392 | irq_disable_hazard(); | 394 | irq_disable_hazard(); |
393 | 395 | ||