#include <linux/percpu.h>
#include <linux/init.h>
#include <linux/sched.h>
+#include <linux/module.h>
#include <asm/current.h>
#include <asm/processor.h>
#include <asm/cputable.h>
/* instruct hypervisor to maintain PMCs */
if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
- char *ptr = (char *)&paca[smp_processor_id()].lppaca;
+ char *ptr = (char *)&paca[smp_processor_id()].xLpPaca;
ptr[0xBB] = 1;
}
}
#endif
+EXPORT_SYMBOL_GPL(ppc64_enable_pmcs);
+
/* XXX convert to rusty's on_one_cpu */
static unsigned long run_on_cpu(unsigned long cpu,
unsigned long (*func)(unsigned long),
unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \
return sprintf(buf, "%lx\n", val); \
} \
-static ssize_t __attribute_used__ \
- store_##NAME(struct sys_device *dev, const char *buf, size_t count) \
+static ssize_t store_##NAME(struct sys_device *dev, const char *buf, \
+ size_t count) \
{ \
struct cpu *cpu = container_of(dev, struct cpu, sysdev); \
unsigned long val; \