diff options
Diffstat (limited to 'arch/mips/netlogic/common/smp.c')
-rw-r--r-- | arch/mips/netlogic/common/smp.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/mips/netlogic/common/smp.c b/arch/mips/netlogic/common/smp.c index 3b32c834d14c..c1960439f7e1 100644 --- a/arch/mips/netlogic/common/smp.c +++ b/arch/mips/netlogic/common/smp.c | |||
@@ -45,8 +45,15 @@ | |||
45 | #include <asm/netlogic/haldefs.h> | 45 | #include <asm/netlogic/haldefs.h> |
46 | #include <asm/netlogic/common.h> | 46 | #include <asm/netlogic/common.h> |
47 | 47 | ||
48 | #if defined(CONFIG_CPU_XLP) | ||
49 | #include <asm/netlogic/xlp-hal/iomap.h> | ||
50 | #include <asm/netlogic/xlp-hal/pic.h> | ||
51 | #elif defined(CONFIG_CPU_XLR) | ||
48 | #include <asm/netlogic/xlr/iomap.h> | 52 | #include <asm/netlogic/xlr/iomap.h> |
49 | #include <asm/netlogic/xlr/pic.h> | 53 | #include <asm/netlogic/xlr/pic.h> |
54 | #else | ||
55 | #error "Unknown CPU" | ||
56 | #endif | ||
50 | 57 | ||
51 | void nlm_send_ipi_single(int logical_cpu, unsigned int action) | 58 | void nlm_send_ipi_single(int logical_cpu, unsigned int action) |
52 | { | 59 | { |
@@ -70,15 +77,15 @@ void nlm_send_ipi_mask(const struct cpumask *mask, unsigned int action) | |||
70 | /* IRQ_IPI_SMP_FUNCTION Handler */ | 77 | /* IRQ_IPI_SMP_FUNCTION Handler */ |
71 | void nlm_smp_function_ipi_handler(unsigned int irq, struct irq_desc *desc) | 78 | void nlm_smp_function_ipi_handler(unsigned int irq, struct irq_desc *desc) |
72 | { | 79 | { |
73 | smp_call_function_interrupt(); | ||
74 | write_c0_eirr(1ull << irq); | 80 | write_c0_eirr(1ull << irq); |
81 | smp_call_function_interrupt(); | ||
75 | } | 82 | } |
76 | 83 | ||
77 | /* IRQ_IPI_SMP_RESCHEDULE handler */ | 84 | /* IRQ_IPI_SMP_RESCHEDULE handler */ |
78 | void nlm_smp_resched_ipi_handler(unsigned int irq, struct irq_desc *desc) | 85 | void nlm_smp_resched_ipi_handler(unsigned int irq, struct irq_desc *desc) |
79 | { | 86 | { |
80 | scheduler_ipi(); | ||
81 | write_c0_eirr(1ull << irq); | 87 | write_c0_eirr(1ull << irq); |
88 | scheduler_ipi(); | ||
82 | } | 89 | } |
83 | 90 | ||
84 | /* | 91 | /* |
@@ -86,9 +93,10 @@ void nlm_smp_resched_ipi_handler(unsigned int irq, struct irq_desc *desc) | |||
86 | */ | 93 | */ |
87 | void nlm_early_init_secondary(int cpu) | 94 | void nlm_early_init_secondary(int cpu) |
88 | { | 95 | { |
96 | change_c0_config(CONF_CM_CMASK, 0x3); | ||
89 | write_c0_ebase((uint32_t)nlm_common_ebase); | 97 | write_c0_ebase((uint32_t)nlm_common_ebase); |
90 | #ifdef NLM_XLP | 98 | #ifdef CONFIG_CPU_XLP |
91 | if (cpu % 4 == 0) | 99 | if (hard_smp_processor_id() % 4 == 0) |
92 | xlp_mmu_init(); | 100 | xlp_mmu_init(); |
93 | #endif | 101 | #endif |
94 | } | 102 | } |