diff options
Diffstat (limited to 'arch/mips/sgi-ip27/ip27-smp.c')
-rw-r--r-- | arch/mips/sgi-ip27/ip27-smp.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/arch/mips/sgi-ip27/ip27-smp.c b/arch/mips/sgi-ip27/ip27-smp.c index 17f768cba94f..3a8291b7d26d 100644 --- a/arch/mips/sgi-ip27/ip27-smp.c +++ b/arch/mips/sgi-ip27/ip27-smp.c | |||
@@ -127,37 +127,28 @@ void cpu_node_probe(void) | |||
127 | printk("Discovered %d cpus on %d nodes\n", highest + 1, num_online_nodes()); | 127 | printk("Discovered %d cpus on %d nodes\n", highest + 1, num_online_nodes()); |
128 | } | 128 | } |
129 | 129 | ||
130 | static void intr_clear_bits(nasid_t nasid, volatile hubreg_t *pend, | 130 | static __init void intr_clear_all(nasid_t nasid) |
131 | int base_level) | ||
132 | { | 131 | { |
133 | volatile hubreg_t bits; | ||
134 | int i; | 132 | int i; |
135 | 133 | ||
136 | /* Check pending interrupts */ | ||
137 | if ((bits = HUB_L(pend)) != 0) | ||
138 | for (i = 0; i < N_INTPEND_BITS; i++) | ||
139 | if (bits & (1 << i)) | ||
140 | LOCAL_HUB_CLR_INTR(base_level + i); | ||
141 | } | ||
142 | |||
143 | static void intr_clear_all(nasid_t nasid) | ||
144 | { | ||
145 | REMOTE_HUB_S(nasid, PI_INT_MASK0_A, 0); | 134 | REMOTE_HUB_S(nasid, PI_INT_MASK0_A, 0); |
146 | REMOTE_HUB_S(nasid, PI_INT_MASK0_B, 0); | 135 | REMOTE_HUB_S(nasid, PI_INT_MASK0_B, 0); |
147 | REMOTE_HUB_S(nasid, PI_INT_MASK1_A, 0); | 136 | REMOTE_HUB_S(nasid, PI_INT_MASK1_A, 0); |
148 | REMOTE_HUB_S(nasid, PI_INT_MASK1_B, 0); | 137 | REMOTE_HUB_S(nasid, PI_INT_MASK1_B, 0); |
149 | intr_clear_bits(nasid, REMOTE_HUB_ADDR(nasid, PI_INT_PEND0), | 138 | |
150 | INT_PEND0_BASELVL); | 139 | for (i = 0; i < 128; i++) |
151 | intr_clear_bits(nasid, REMOTE_HUB_ADDR(nasid, PI_INT_PEND1), | 140 | REMOTE_HUB_CLR_INTR(nasid, i); |
152 | INT_PEND1_BASELVL); | ||
153 | } | 141 | } |
154 | 142 | ||
155 | void __init prom_prepare_cpus(unsigned int max_cpus) | 143 | void __init prom_prepare_cpus(unsigned int max_cpus) |
156 | { | 144 | { |
157 | cnodeid_t cnode; | 145 | cnodeid_t cnode; |
158 | 146 | ||
159 | for_each_online_node(cnode) | 147 | for_each_online_node(cnode) { |
148 | if (cnode == 0) | ||
149 | continue; | ||
160 | intr_clear_all(COMPACT_TO_NASID_NODEID(cnode)); | 150 | intr_clear_all(COMPACT_TO_NASID_NODEID(cnode)); |
151 | } | ||
161 | 152 | ||
162 | replicate_kernel_text(); | 153 | replicate_kernel_text(); |
163 | 154 | ||