/* 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;
}
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; \
#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);