.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | ** SMP Support |
---|
3 | 4 | ** |
---|
.. | .. |
---|
11 | 12 | ** Thanks to John Curry and Ullas Ponnadi. I learned a lot from their work. |
---|
12 | 13 | ** -grant (1/12/2001) |
---|
13 | 14 | ** |
---|
14 | | -** This program is free software; you can redistribute it and/or modify |
---|
15 | | -** it under the terms of the GNU General Public License as published by |
---|
16 | | -** the Free Software Foundation; either version 2 of the License, or |
---|
17 | | -** (at your option) any later version. |
---|
18 | 15 | */ |
---|
19 | 16 | #include <linux/types.h> |
---|
20 | 17 | #include <linux/spinlock.h> |
---|
.. | .. |
---|
43 | 40 | #include <asm/irq.h> /* for CPU_IRQ_REGION and friends */ |
---|
44 | 41 | #include <asm/mmu_context.h> |
---|
45 | 42 | #include <asm/page.h> |
---|
46 | | -#include <asm/pgtable.h> |
---|
47 | | -#include <asm/pgalloc.h> |
---|
48 | 43 | #include <asm/processor.h> |
---|
49 | 44 | #include <asm/ptrace.h> |
---|
50 | 45 | #include <asm/unistd.h> |
---|
.. | .. |
---|
116 | 111 | /* REVISIT : does PM *know* this CPU isn't available? */ |
---|
117 | 112 | set_cpu_online(smp_processor_id(), false); |
---|
118 | 113 | local_irq_disable(); |
---|
| 114 | + __pdc_cpu_rendezvous(); |
---|
119 | 115 | for (;;) |
---|
120 | 116 | ; |
---|
121 | 117 | } |
---|
.. | .. |
---|
159 | 155 | |
---|
160 | 156 | case IPI_CALL_FUNC: |
---|
161 | 157 | smp_debug(100, KERN_DEBUG "CPU%d IPI_CALL_FUNC\n", this_cpu); |
---|
| 158 | + inc_irq_stat(irq_call_count); |
---|
162 | 159 | generic_smp_call_function_interrupt(); |
---|
163 | 160 | break; |
---|
164 | 161 | |
---|
.. | .. |
---|
185 | 182 | this_cpu, which); |
---|
186 | 183 | return IRQ_NONE; |
---|
187 | 184 | } /* Switch */ |
---|
188 | | - /* let in any pending interrupts */ |
---|
189 | | - local_irq_enable(); |
---|
190 | | - local_irq_disable(); |
---|
| 185 | + |
---|
| 186 | + /* before doing more, let in any pending interrupts */ |
---|
| 187 | + if (ops) { |
---|
| 188 | + local_irq_enable(); |
---|
| 189 | + local_irq_disable(); |
---|
| 190 | + } |
---|
191 | 191 | } /* while (ops) */ |
---|
192 | 192 | } |
---|
193 | 193 | return IRQ_HANDLED; |
---|
.. | .. |
---|
317 | 317 | #endif |
---|
318 | 318 | |
---|
319 | 319 | smp_cpu_init(slave_id); |
---|
320 | | - preempt_disable(); |
---|
321 | 320 | |
---|
322 | 321 | flush_cache_all_local(); /* start with known state */ |
---|
323 | 322 | flush_tlb_all_local(NULL); |
---|