diff options
Diffstat (limited to 'arch/powerpc/kernel/sysfs.c')
| -rw-r--r-- | arch/powerpc/kernel/sysfs.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index c8127f832df0..aba0ba95f062 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
| @@ -28,7 +28,9 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices); | |||
| 28 | /* Time in microseconds we delay before sleeping in the idle loop */ | 28 | /* Time in microseconds we delay before sleeping in the idle loop */ |
| 29 | DEFINE_PER_CPU(unsigned long, smt_snooze_delay) = { 100 }; | 29 | DEFINE_PER_CPU(unsigned long, smt_snooze_delay) = { 100 }; |
| 30 | 30 | ||
| 31 | static ssize_t store_smt_snooze_delay(struct sys_device *dev, const char *buf, | 31 | static ssize_t store_smt_snooze_delay(struct sys_device *dev, |
| 32 | struct sysdev_attribute *attr, | ||
| 33 | const char *buf, | ||
| 32 | size_t count) | 34 | size_t count) |
| 33 | { | 35 | { |
| 34 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); | 36 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); |
| @@ -44,7 +46,9 @@ static ssize_t store_smt_snooze_delay(struct sys_device *dev, const char *buf, | |||
| 44 | return count; | 46 | return count; |
| 45 | } | 47 | } |
| 46 | 48 | ||
| 47 | static ssize_t show_smt_snooze_delay(struct sys_device *dev, char *buf) | 49 | static ssize_t show_smt_snooze_delay(struct sys_device *dev, |
| 50 | struct sysdev_attribute *attr, | ||
| 51 | char *buf) | ||
| 48 | { | 52 | { |
| 49 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); | 53 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); |
| 50 | 54 | ||
| @@ -152,14 +156,17 @@ static unsigned long write_##NAME(unsigned long val) \ | |||
| 152 | mtspr(ADDRESS, val); \ | 156 | mtspr(ADDRESS, val); \ |
| 153 | return 0; \ | 157 | return 0; \ |
| 154 | } \ | 158 | } \ |
| 155 | static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ | 159 | static ssize_t show_##NAME(struct sys_device *dev, \ |
| 160 | struct sysdev_attribute *attr, \ | ||
| 161 | char *buf) \ | ||
| 156 | { \ | 162 | { \ |
| 157 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ | 163 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ |
| 158 | unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \ | 164 | unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \ |
| 159 | return sprintf(buf, "%lx\n", val); \ | 165 | return sprintf(buf, "%lx\n", val); \ |
| 160 | } \ | 166 | } \ |
| 161 | static ssize_t __used \ | 167 | static ssize_t __used \ |
| 162 | store_##NAME(struct sys_device *dev, const char *buf, size_t count) \ | 168 | store_##NAME(struct sys_device *dev, struct sysdev_attribute *attr, \ |
| 169 | const char *buf, size_t count) \ | ||
| 163 | { \ | 170 | { \ |
| 164 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ | 171 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ |
| 165 | unsigned long val; \ | 172 | unsigned long val; \ |
