X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc64%2Fkernel%2Fsysfs.c;h=41b34932f14ab546363f7db299a81d3ad2b71d86;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=dcb1097ce55ef1dfdaa9927e649f30fbbc5da75d;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/arch/ppc64/kernel/sysfs.c b/arch/ppc64/kernel/sysfs.c index dcb1097ce..41b34932f 100644 --- a/arch/ppc64/kernel/sysfs.c +++ b/arch/ppc64/kernel/sysfs.c @@ -156,7 +156,7 @@ void ppc64_enable_pmcs(void) /* instruct hypervisor to maintain PMCs */ if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) { - char *ptr = (char *)&paca[smp_processor_id()].xLpPaca; + char *ptr = (char *)&paca[smp_processor_id()].lppaca; ptr[0xBB] = 1; } @@ -208,8 +208,8 @@ static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \ return sprintf(buf, "%lx\n", val); \ } \ -static ssize_t store_##NAME(struct sys_device *dev, const char *buf, \ - size_t count) \ +static ssize_t __attribute_used__ \ + store_##NAME(struct sys_device *dev, const char *buf, size_t count) \ { \ struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ unsigned long val; \ @@ -325,6 +325,16 @@ static int __init topology_init(void) #ifdef CONFIG_NUMA parent = &node_devices[cpu_to_node(cpu)]; #endif + /* + * For now, we just see if the system supports making + * the RTAS calls for CPU hotplug. But, there may be a + * more comprehensive way to do this for an individual + * CPU. For instance, the boot cpu might never be valid + * for hotplugging. + */ + if (systemcfg->platform != PLATFORM_PSERIES_LPAR) + c->no_control = 1; + register_cpu(c, cpu, parent); register_cpu_pmc(&c->sysdev);