diff options
Diffstat (limited to 'arch/ia64/sn/kernel/sn2/sn2_smp.c')
-rw-r--r-- | arch/ia64/sn/kernel/sn2/sn2_smp.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c index 033c8a9f000..f3c69329e14 100644 --- a/arch/ia64/sn/kernel/sn2/sn2_smp.c +++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <asm/sn/shub_mmr.h> | 40 | #include <asm/sn/shub_mmr.h> |
41 | #include <asm/sn/nodepda.h> | 41 | #include <asm/sn/nodepda.h> |
42 | #include <asm/sn/rw_mmr.h> | 42 | #include <asm/sn/rw_mmr.h> |
43 | #include <asm/sn/sn_feature_sets.h> | ||
43 | 44 | ||
44 | DEFINE_PER_CPU(struct ptc_stats, ptcstats); | 45 | DEFINE_PER_CPU(struct ptc_stats, ptcstats); |
45 | DECLARE_PER_CPU(struct ptc_stats, ptcstats); | 46 | DECLARE_PER_CPU(struct ptc_stats, ptcstats); |
@@ -429,6 +430,31 @@ void sn2_send_IPI(int cpuid, int vector, int delivery_mode, int redirect) | |||
429 | sn_send_IPI_phys(nasid, physid, vector, delivery_mode); | 430 | sn_send_IPI_phys(nasid, physid, vector, delivery_mode); |
430 | } | 431 | } |
431 | 432 | ||
433 | #ifdef CONFIG_HOTPLUG_CPU | ||
434 | /** | ||
435 | * sn_cpu_disable_allowed - Determine if a CPU can be disabled. | ||
436 | * @cpu - CPU that is requested to be disabled. | ||
437 | * | ||
438 | * CPU disable is only allowed on SHub2 systems running with a PROM | ||
439 | * that supports CPU disable. It is not permitted to disable the boot processor. | ||
440 | */ | ||
441 | bool sn_cpu_disable_allowed(int cpu) | ||
442 | { | ||
443 | if (is_shub2() && sn_prom_feature_available(PRF_CPU_DISABLE_SUPPORT)) { | ||
444 | if (cpu != 0) | ||
445 | return true; | ||
446 | else | ||
447 | printk(KERN_WARNING | ||
448 | "Disabling the boot processor is not allowed.\n"); | ||
449 | |||
450 | } else | ||
451 | printk(KERN_WARNING | ||
452 | "CPU disable is not supported on this system.\n"); | ||
453 | |||
454 | return false; | ||
455 | } | ||
456 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
457 | |||
432 | #ifdef CONFIG_PROC_FS | 458 | #ifdef CONFIG_PROC_FS |
433 | 459 | ||
434 | #define PTC_BASENAME "sgi_sn/ptc_statistics" | 460 | #define PTC_BASENAME "sgi_sn/ptc_statistics" |