aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/smp.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-04-07 16:34:16 -0400
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-04-07 16:34:16 -0400
commit38f4b8c0da01ae7cd9b93386842ce272d6fde9ab (patch)
tree3c8c52201aac038094bfea7efdd0984a8f62045e /arch/parisc/kernel/smp.c
parenta811454027352c762e0d5bba1b1d8f7d26bf96ae (diff)
parent8e2c4f2844c0e8dcdfe312e5f2204854ca8532c6 (diff)
Merge commit 'origin/master' into for-linus/xen/master
* commit 'origin/master': (4825 commits) Fix build errors due to CONFIG_BRANCH_TRACER=y parport: Use the PCI IRQ if offered tty: jsm cleanups Adjust path to gpio headers KGDB_SERIAL_CONSOLE check for module Change KCONFIG name tty: Blackin CTS/RTS Change hardware flow control from poll to interrupt driven Add support for the MAX3100 SPI UART. lanana: assign a device name and numbering for MAX3100 serqt: initial clean up pass for tty side tty: Use the generic RS485 ioctl on CRIS tty: Correct inline types for tty_driver_kref_get() splice: fix deadlock in splicing to file nilfs2: support nanosecond timestamp nilfs2: introduce secondary super block nilfs2: simplify handling of active state of segments nilfs2: mark minor flag for checkpoint created by internal operation nilfs2: clean up sketch file nilfs2: super block operations fix endian bug ... Conflicts: arch/x86/include/asm/thread_info.h arch/x86/lguest/boot.c drivers/xen/manage.c
Diffstat (limited to 'arch/parisc/kernel/smp.c')
-rw-r--r--arch/parisc/kernel/smp.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 9995d7ed5819..1fd0f0cec037 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -31,6 +31,7 @@
31#include <linux/err.h> 31#include <linux/err.h>
32#include <linux/delay.h> 32#include <linux/delay.h>
33#include <linux/bitops.h> 33#include <linux/bitops.h>
34#include <linux/ftrace.h>
34 35
35#include <asm/system.h> 36#include <asm/system.h>
36#include <asm/atomic.h> 37#include <asm/atomic.h>
@@ -113,14 +114,14 @@ halt_processor(void)
113{ 114{
114 /* REVISIT : redirect I/O Interrupts to another CPU? */ 115 /* REVISIT : redirect I/O Interrupts to another CPU? */
115 /* REVISIT : does PM *know* this CPU isn't available? */ 116 /* REVISIT : does PM *know* this CPU isn't available? */
116 cpu_clear(smp_processor_id(), cpu_online_map); 117 set_cpu_online(smp_processor_id(), false);
117 local_irq_disable(); 118 local_irq_disable();
118 for (;;) 119 for (;;)
119 ; 120 ;
120} 121}
121 122
122 123
123irqreturn_t 124irqreturn_t __irq_entry
124ipi_interrupt(int irq, void *dev_id) 125ipi_interrupt(int irq, void *dev_id)
125{ 126{
126 int this_cpu = smp_processor_id(); 127 int this_cpu = smp_processor_id();
@@ -214,11 +215,11 @@ ipi_send(int cpu, enum ipi_message_type op)
214} 215}
215 216
216static void 217static void
217send_IPI_mask(cpumask_t mask, enum ipi_message_type op) 218send_IPI_mask(const struct cpumask *mask, enum ipi_message_type op)
218{ 219{
219 int cpu; 220 int cpu;
220 221
221 for_each_cpu_mask(cpu, mask) 222 for_each_cpu(cpu, mask)
222 ipi_send(cpu, op); 223 ipi_send(cpu, op);
223} 224}
224 225
@@ -257,7 +258,7 @@ smp_send_all_nop(void)
257 send_IPI_allbutself(IPI_NOP); 258 send_IPI_allbutself(IPI_NOP);
258} 259}
259 260
260void arch_send_call_function_ipi(cpumask_t mask) 261void arch_send_call_function_ipi_mask(const struct cpumask *mask)
261{ 262{
262 send_IPI_mask(mask, IPI_CALL_FUNC); 263 send_IPI_mask(mask, IPI_CALL_FUNC);
263} 264}
@@ -296,13 +297,14 @@ smp_cpu_init(int cpunum)
296 mb(); 297 mb();
297 298
298 /* Well, support 2.4 linux scheme as well. */ 299 /* Well, support 2.4 linux scheme as well. */
299 if (cpu_test_and_set(cpunum, cpu_online_map)) 300 if (cpu_isset(cpunum, cpu_online_map))
300 { 301 {
301 extern void machine_halt(void); /* arch/parisc.../process.c */ 302 extern void machine_halt(void); /* arch/parisc.../process.c */
302 303
303 printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum); 304 printk(KERN_CRIT "CPU#%d already initialized!\n", cpunum);
304 machine_halt(); 305 machine_halt();
305 } 306 }
307 set_cpu_online(cpunum, true);
306 308
307 /* Initialise the idle task for this CPU */ 309 /* Initialise the idle task for this CPU */
308 atomic_inc(&init_mm.mm_count); 310 atomic_inc(&init_mm.mm_count);
@@ -424,8 +426,8 @@ void __init smp_prepare_boot_cpu(void)
424 /* Setup BSP mappings */ 426 /* Setup BSP mappings */
425 printk(KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor); 427 printk(KERN_INFO "SMP: bootstrap CPU ID is %d\n", bootstrap_processor);
426 428
427 cpu_set(bootstrap_processor, cpu_online_map); 429 set_cpu_online(bootstrap_processor, true);
428 cpu_set(bootstrap_processor, cpu_present_map); 430 set_cpu_present(bootstrap_processor, true);
429} 431}
430 432
431 433
@@ -436,8 +438,7 @@ void __init smp_prepare_boot_cpu(void)
436*/ 438*/
437void __init smp_prepare_cpus(unsigned int max_cpus) 439void __init smp_prepare_cpus(unsigned int max_cpus)
438{ 440{
439 cpus_clear(cpu_present_map); 441 init_cpu_present(cpumask_of(0));
440 cpu_set(0, cpu_present_map);
441 442
442 parisc_max_cpus = max_cpus; 443 parisc_max_cpus = max_cpus;
443 if (!max_cpus) 444 if (!max_cpus)