base-files: diag does not need to insmod any drivers, procd already did it for us
[openwrt.git] / target / linux / brcm63xx / patches-3.9 / 318-MIPS-BCM63XX-add-cpu-argument-to-dispatch-internal.patch
1 From 398337c57ebe3c704e0df5f569e6bd860ffe8914 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Fri, 26 Apr 2013 11:21:16 +0200
4 Subject: [PATCH 09/13] MIPS: BCM63XX: add cpu argument to dispatch internal
5
6 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
7 ---
8  arch/mips/bcm63xx/irq.c |   14 +++++++-------
9  1 file changed, 7 insertions(+), 7 deletions(-)
10
11 --- a/arch/mips/bcm63xx/irq.c
12 +++ b/arch/mips/bcm63xx/irq.c
13 @@ -19,8 +19,8 @@
14  #include <bcm63xx_io.h>
15  #include <bcm63xx_irq.h>
16  
17 -static void __dispatch_internal_32(void) __maybe_unused;
18 -static void __dispatch_internal_64(void) __maybe_unused;
19 +static void __dispatch_internal_32(int cpu) __maybe_unused;
20 +static void __dispatch_internal_64(int cpu) __maybe_unused;
21  static void __internal_irq_mask_32(unsigned int irq) __maybe_unused;
22  static void __internal_irq_mask_64(unsigned int irq) __maybe_unused;
23  static void __internal_irq_unmask_32(unsigned int irq) __maybe_unused;
24 @@ -140,7 +140,7 @@ static inline void bcm63xx_init_irq(void
25  #else /* ! BCMCPU_RUNTIME_DETECT */
26  
27  static u32 irq_stat_addr0, irq_mask_addr0, irq_stat_addr1, irq_mask_addr1;
28 -static void (*dispatch_internal)(void);
29 +static void (*dispatch_internal)(int cpu);
30  static int is_ext_irq_cascaded;
31  static unsigned int ext_irq_count;
32  static unsigned int ext_irq_start, ext_irq_end;
33 @@ -282,14 +282,14 @@ static inline void handle_internal(int i
34   */
35  
36  #define BUILD_IPIC_INTERNAL(width)                                     \
37 -void __dispatch_internal_##width(void)                                 \
38 +void __dispatch_internal_##width(int cpu)                              \
39  {                                                                      \
40         u32 pending[width / 32];                                        \
41         unsigned int src, tgt;                                          \
42         bool irqs_pending = false;                                      \
43         static int i;                                                   \
44 -       u32 irq_stat_addr = get_irq_stat_addr(0);                       \
45 -       u32 irq_mask_addr = get_irq_mask_addr(0);                       \
46 +       u32 irq_stat_addr = get_irq_stat_addr(cpu);                     \
47 +       u32 irq_mask_addr = get_irq_mask_addr(cpu);                     \
48                                                                         \
49         /* read registers in reverse order */                           \
50         for (src = 0, tgt = (width / 32); src < (width / 32); src++) {  \
51 @@ -361,7 +361,7 @@ asmlinkage void plat_irq_dispatch(void)
52                 if (cause & CAUSEF_IP1)
53                         do_IRQ(1);
54                 if (cause & CAUSEF_IP2)
55 -                       dispatch_internal();
56 +                       dispatch_internal(0);
57                 if (!is_ext_irq_cascaded) {
58                         if (cause & CAUSEF_IP3)
59                                 do_IRQ(IRQ_EXT_0);