diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/sysfs.c | 15 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/cbe_thermal.c | 45 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spu_base.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/pci.c | 2 |
4 files changed, 44 insertions, 21 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; \ |
diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c b/arch/powerpc/platforms/cell/cbe_thermal.c index 4852bf312d83..4d4c8c169124 100644 --- a/arch/powerpc/platforms/cell/cbe_thermal.c +++ b/arch/powerpc/platforms/cell/cbe_thermal.c | |||
@@ -97,7 +97,8 @@ static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iom | |||
97 | return value.spe[spu->spe_id]; | 97 | return value.spe[spu->spe_id]; |
98 | } | 98 | } |
99 | 99 | ||
100 | static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf) | 100 | static ssize_t spu_show_temp(struct sys_device *sysdev, struct sysdev_attribute *attr, |
101 | char *buf) | ||
101 | { | 102 | { |
102 | u8 value; | 103 | u8 value; |
103 | struct cbe_pmd_regs __iomem *pmd_regs; | 104 | struct cbe_pmd_regs __iomem *pmd_regs; |
@@ -146,32 +147,38 @@ static ssize_t store_throttle(struct cbe_pmd_regs __iomem *pmd_regs, const char | |||
146 | return size; | 147 | return size; |
147 | } | 148 | } |
148 | 149 | ||
149 | static ssize_t spu_show_throttle_end(struct sys_device *sysdev, char *buf) | 150 | static ssize_t spu_show_throttle_end(struct sys_device *sysdev, |
151 | struct sysdev_attribute *attr, char *buf) | ||
150 | { | 152 | { |
151 | return show_throttle(get_pmd_regs(sysdev), buf, 0); | 153 | return show_throttle(get_pmd_regs(sysdev), buf, 0); |
152 | } | 154 | } |
153 | 155 | ||
154 | static ssize_t spu_show_throttle_begin(struct sys_device *sysdev, char *buf) | 156 | static ssize_t spu_show_throttle_begin(struct sys_device *sysdev, |
157 | struct sysdev_attribute *attr, char *buf) | ||
155 | { | 158 | { |
156 | return show_throttle(get_pmd_regs(sysdev), buf, 8); | 159 | return show_throttle(get_pmd_regs(sysdev), buf, 8); |
157 | } | 160 | } |
158 | 161 | ||
159 | static ssize_t spu_show_throttle_full_stop(struct sys_device *sysdev, char *buf) | 162 | static ssize_t spu_show_throttle_full_stop(struct sys_device *sysdev, |
163 | struct sysdev_attribute *attr, char *buf) | ||
160 | { | 164 | { |
161 | return show_throttle(get_pmd_regs(sysdev), buf, 16); | 165 | return show_throttle(get_pmd_regs(sysdev), buf, 16); |
162 | } | 166 | } |
163 | 167 | ||
164 | static ssize_t spu_store_throttle_end(struct sys_device *sysdev, const char *buf, size_t size) | 168 | static ssize_t spu_store_throttle_end(struct sys_device *sysdev, |
169 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
165 | { | 170 | { |
166 | return store_throttle(get_pmd_regs(sysdev), buf, size, 0); | 171 | return store_throttle(get_pmd_regs(sysdev), buf, size, 0); |
167 | } | 172 | } |
168 | 173 | ||
169 | static ssize_t spu_store_throttle_begin(struct sys_device *sysdev, const char *buf, size_t size) | 174 | static ssize_t spu_store_throttle_begin(struct sys_device *sysdev, |
175 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
170 | { | 176 | { |
171 | return store_throttle(get_pmd_regs(sysdev), buf, size, 8); | 177 | return store_throttle(get_pmd_regs(sysdev), buf, size, 8); |
172 | } | 178 | } |
173 | 179 | ||
174 | static ssize_t spu_store_throttle_full_stop(struct sys_device *sysdev, const char *buf, size_t size) | 180 | static ssize_t spu_store_throttle_full_stop(struct sys_device *sysdev, |
181 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
175 | { | 182 | { |
176 | return store_throttle(get_pmd_regs(sysdev), buf, size, 16); | 183 | return store_throttle(get_pmd_regs(sysdev), buf, size, 16); |
177 | } | 184 | } |
@@ -192,43 +199,51 @@ static ssize_t ppe_show_temp(struct sys_device *sysdev, char *buf, int pos) | |||
192 | 199 | ||
193 | /* shows the temperature of the DTS on the PPE, | 200 | /* shows the temperature of the DTS on the PPE, |
194 | * located near the linear thermal sensor */ | 201 | * located near the linear thermal sensor */ |
195 | static ssize_t ppe_show_temp0(struct sys_device *sysdev, char *buf) | 202 | static ssize_t ppe_show_temp0(struct sys_device *sysdev, |
203 | struct sysdev_attribute *attr, char *buf) | ||
196 | { | 204 | { |
197 | return ppe_show_temp(sysdev, buf, 32); | 205 | return ppe_show_temp(sysdev, buf, 32); |
198 | } | 206 | } |
199 | 207 | ||
200 | /* shows the temperature of the second DTS on the PPE */ | 208 | /* shows the temperature of the second DTS on the PPE */ |
201 | static ssize_t ppe_show_temp1(struct sys_device *sysdev, char *buf) | 209 | static ssize_t ppe_show_temp1(struct sys_device *sysdev, |
210 | struct sysdev_attribute *attr, char *buf) | ||
202 | { | 211 | { |
203 | return ppe_show_temp(sysdev, buf, 0); | 212 | return ppe_show_temp(sysdev, buf, 0); |
204 | } | 213 | } |
205 | 214 | ||
206 | static ssize_t ppe_show_throttle_end(struct sys_device *sysdev, char *buf) | 215 | static ssize_t ppe_show_throttle_end(struct sys_device *sysdev, |
216 | struct sysdev_attribute *attr, char *buf) | ||
207 | { | 217 | { |
208 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 32); | 218 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 32); |
209 | } | 219 | } |
210 | 220 | ||
211 | static ssize_t ppe_show_throttle_begin(struct sys_device *sysdev, char *buf) | 221 | static ssize_t ppe_show_throttle_begin(struct sys_device *sysdev, |
222 | struct sysdev_attribute *attr, char *buf) | ||
212 | { | 223 | { |
213 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 40); | 224 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 40); |
214 | } | 225 | } |
215 | 226 | ||
216 | static ssize_t ppe_show_throttle_full_stop(struct sys_device *sysdev, char *buf) | 227 | static ssize_t ppe_show_throttle_full_stop(struct sys_device *sysdev, |
228 | struct sysdev_attribute *attr, char *buf) | ||
217 | { | 229 | { |
218 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 48); | 230 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 48); |
219 | } | 231 | } |
220 | 232 | ||
221 | static ssize_t ppe_store_throttle_end(struct sys_device *sysdev, const char *buf, size_t size) | 233 | static ssize_t ppe_store_throttle_end(struct sys_device *sysdev, |
234 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
222 | { | 235 | { |
223 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 32); | 236 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 32); |
224 | } | 237 | } |
225 | 238 | ||
226 | static ssize_t ppe_store_throttle_begin(struct sys_device *sysdev, const char *buf, size_t size) | 239 | static ssize_t ppe_store_throttle_begin(struct sys_device *sysdev, |
240 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
227 | { | 241 | { |
228 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 40); | 242 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 40); |
229 | } | 243 | } |
230 | 244 | ||
231 | static ssize_t ppe_store_throttle_full_stop(struct sys_device *sysdev, const char *buf, size_t size) | 245 | static ssize_t ppe_store_throttle_full_stop(struct sys_device *sysdev, |
246 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
232 | { | 247 | { |
233 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 48); | 248 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 48); |
234 | } | 249 | } |
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index 78f905bc6a42..a5bdb89a17c3 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -703,7 +703,8 @@ static unsigned long long spu_acct_time(struct spu *spu, | |||
703 | } | 703 | } |
704 | 704 | ||
705 | 705 | ||
706 | static ssize_t spu_stat_show(struct sys_device *sysdev, char *buf) | 706 | static ssize_t spu_stat_show(struct sys_device *sysdev, |
707 | struct sysdev_attribute *attr, char *buf) | ||
707 | { | 708 | { |
708 | struct spu *spu = container_of(sysdev, struct spu, sysdev); | 709 | struct spu *spu = container_of(sysdev, struct spu, sysdev); |
709 | 710 | ||
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 609c46db4a1b..768c262b9368 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
@@ -367,7 +367,7 @@ static void chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide) | |||
367 | viaisa = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL); | 367 | viaisa = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL); |
368 | if (!viaisa) | 368 | if (!viaisa) |
369 | return; | 369 | return; |
370 | printk("Fixing VIA IDE, force legacy mode on '%s'\n", viaide->dev.bus_id); | 370 | dev_info(&viaide->dev, "Fixing VIA IDE, force legacy mode on\n"); |
371 | 371 | ||
372 | pci_read_config_byte(viaide, PCI_CLASS_PROG, &progif); | 372 | pci_read_config_byte(viaide, PCI_CLASS_PROG, &progif); |
373 | pci_write_config_byte(viaide, PCI_CLASS_PROG, progif & ~0x5); | 373 | pci_write_config_byte(viaide, PCI_CLASS_PROG, progif & ~0x5); |