hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/parisc/kernel/smp.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 ** SMP Support
34 **
....@@ -11,10 +12,6 @@
1112 ** Thanks to John Curry and Ullas Ponnadi. I learned a lot from their work.
1213 ** -grant (1/12/2001)
1314 **
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.
1815 */
1916 #include <linux/types.h>
2017 #include <linux/spinlock.h>
....@@ -43,8 +40,6 @@
4340 #include <asm/irq.h> /* for CPU_IRQ_REGION and friends */
4441 #include <asm/mmu_context.h>
4542 #include <asm/page.h>
46
-#include <asm/pgtable.h>
47
-#include <asm/pgalloc.h>
4843 #include <asm/processor.h>
4944 #include <asm/ptrace.h>
5045 #include <asm/unistd.h>
....@@ -116,6 +111,7 @@
116111 /* REVISIT : does PM *know* this CPU isn't available? */
117112 set_cpu_online(smp_processor_id(), false);
118113 local_irq_disable();
114
+ __pdc_cpu_rendezvous();
119115 for (;;)
120116 ;
121117 }
....@@ -159,6 +155,7 @@
159155
160156 case IPI_CALL_FUNC:
161157 smp_debug(100, KERN_DEBUG "CPU%d IPI_CALL_FUNC\n", this_cpu);
158
+ inc_irq_stat(irq_call_count);
162159 generic_smp_call_function_interrupt();
163160 break;
164161
....@@ -185,9 +182,12 @@
185182 this_cpu, which);
186183 return IRQ_NONE;
187184 } /* 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
+ }
191191 } /* while (ops) */
192192 }
193193 return IRQ_HANDLED;
....@@ -317,7 +317,6 @@
317317 #endif
318318
319319 smp_cpu_init(slave_id);
320
- preempt_disable();
321320
322321 flush_cache_all_local(); /* start with known state */
323322 flush_tlb_all_local(NULL);