diff options
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r-- | arch/i386/kernel/acpi/boot.c | 10 | ||||
-rw-r--r-- | arch/i386/kernel/cpuid.c | 20 | ||||
-rw-r--r-- | arch/i386/kernel/msr.c | 20 | ||||
-rw-r--r-- | arch/i386/kernel/pci-dma.c | 4 |
4 files changed, 28 insertions, 26 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index d12fb97a5337..c8f96cff07c6 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -333,7 +333,7 @@ acpi_parse_ioapic(acpi_table_entry_header * header, const unsigned long end) | |||
333 | /* | 333 | /* |
334 | * Parse Interrupt Source Override for the ACPI SCI | 334 | * Parse Interrupt Source Override for the ACPI SCI |
335 | */ | 335 | */ |
336 | static void acpi_sci_ioapic_setup(u32 bus_irq, u32 gsi, u16 polarity, u16 trigger) | 336 | static void acpi_sci_ioapic_setup(u32 gsi, u16 polarity, u16 trigger) |
337 | { | 337 | { |
338 | if (trigger == 0) /* compatible SCI trigger is level */ | 338 | if (trigger == 0) /* compatible SCI trigger is level */ |
339 | trigger = 3; | 339 | trigger = 3; |
@@ -353,13 +353,13 @@ static void acpi_sci_ioapic_setup(u32 bus_irq, u32 gsi, u16 polarity, u16 trigge | |||
353 | * If GSI is < 16, this will update its flags, | 353 | * If GSI is < 16, this will update its flags, |
354 | * else it will create a new mp_irqs[] entry. | 354 | * else it will create a new mp_irqs[] entry. |
355 | */ | 355 | */ |
356 | mp_override_legacy_irq(bus_irq, polarity, trigger, gsi); | 356 | mp_override_legacy_irq(gsi, polarity, trigger, gsi); |
357 | 357 | ||
358 | /* | 358 | /* |
359 | * stash over-ride to indicate we've been here | 359 | * stash over-ride to indicate we've been here |
360 | * and for later update of acpi_fadt | 360 | * and for later update of acpi_fadt |
361 | */ | 361 | */ |
362 | acpi_sci_override_gsi = bus_irq; | 362 | acpi_sci_override_gsi = gsi; |
363 | return; | 363 | return; |
364 | } | 364 | } |
365 | 365 | ||
@@ -377,7 +377,7 @@ acpi_parse_int_src_ovr(acpi_table_entry_header * header, | |||
377 | acpi_table_print_madt_entry(header); | 377 | acpi_table_print_madt_entry(header); |
378 | 378 | ||
379 | if (intsrc->bus_irq == acpi_fadt.sci_int) { | 379 | if (intsrc->bus_irq == acpi_fadt.sci_int) { |
380 | acpi_sci_ioapic_setup(intsrc->bus_irq, intsrc->global_irq, | 380 | acpi_sci_ioapic_setup(intsrc->global_irq, |
381 | intsrc->flags.polarity, | 381 | intsrc->flags.polarity, |
382 | intsrc->flags.trigger); | 382 | intsrc->flags.trigger); |
383 | return 0; | 383 | return 0; |
@@ -880,7 +880,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
880 | * pretend we got one so we can set the SCI flags. | 880 | * pretend we got one so we can set the SCI flags. |
881 | */ | 881 | */ |
882 | if (!acpi_sci_override_gsi) | 882 | if (!acpi_sci_override_gsi) |
883 | acpi_sci_ioapic_setup(acpi_fadt.sci_int, acpi_fadt.sci_int, 0, 0); | 883 | acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0); |
884 | 884 | ||
885 | /* Fill in identity legacy mapings where no override */ | 885 | /* Fill in identity legacy mapings where no override */ |
886 | mp_config_acpi_legacy_irqs(); | 886 | mp_config_acpi_legacy_irqs(); |
diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c index fde8bea85cee..ab0c327e79dc 100644 --- a/arch/i386/kernel/cpuid.c +++ b/arch/i386/kernel/cpuid.c | |||
@@ -156,14 +156,14 @@ static struct file_operations cpuid_fops = { | |||
156 | .open = cpuid_open, | 156 | .open = cpuid_open, |
157 | }; | 157 | }; |
158 | 158 | ||
159 | static int cpuid_class_device_create(int i) | 159 | static int cpuid_device_create(int i) |
160 | { | 160 | { |
161 | int err = 0; | 161 | int err = 0; |
162 | struct class_device *class_err; | 162 | struct device *dev; |
163 | 163 | ||
164 | class_err = class_device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, i), NULL, "cpu%d",i); | 164 | dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, i), "cpu%d",i); |
165 | if (IS_ERR(class_err)) | 165 | if (IS_ERR(dev)) |
166 | err = PTR_ERR(class_err); | 166 | err = PTR_ERR(dev); |
167 | return err; | 167 | return err; |
168 | } | 168 | } |
169 | 169 | ||
@@ -174,10 +174,10 @@ static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long ac | |||
174 | 174 | ||
175 | switch (action) { | 175 | switch (action) { |
176 | case CPU_ONLINE: | 176 | case CPU_ONLINE: |
177 | cpuid_class_device_create(cpu); | 177 | cpuid_device_create(cpu); |
178 | break; | 178 | break; |
179 | case CPU_DEAD: | 179 | case CPU_DEAD: |
180 | class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); | 180 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); |
181 | break; | 181 | break; |
182 | } | 182 | } |
183 | return NOTIFY_OK; | 183 | return NOTIFY_OK; |
@@ -206,7 +206,7 @@ static int __init cpuid_init(void) | |||
206 | goto out_chrdev; | 206 | goto out_chrdev; |
207 | } | 207 | } |
208 | for_each_online_cpu(i) { | 208 | for_each_online_cpu(i) { |
209 | err = cpuid_class_device_create(i); | 209 | err = cpuid_device_create(i); |
210 | if (err != 0) | 210 | if (err != 0) |
211 | goto out_class; | 211 | goto out_class; |
212 | } | 212 | } |
@@ -218,7 +218,7 @@ static int __init cpuid_init(void) | |||
218 | out_class: | 218 | out_class: |
219 | i = 0; | 219 | i = 0; |
220 | for_each_online_cpu(i) { | 220 | for_each_online_cpu(i) { |
221 | class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, i)); | 221 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, i)); |
222 | } | 222 | } |
223 | class_destroy(cpuid_class); | 223 | class_destroy(cpuid_class); |
224 | out_chrdev: | 224 | out_chrdev: |
@@ -232,7 +232,7 @@ static void __exit cpuid_exit(void) | |||
232 | int cpu = 0; | 232 | int cpu = 0; |
233 | 233 | ||
234 | for_each_online_cpu(cpu) | 234 | for_each_online_cpu(cpu) |
235 | class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); | 235 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); |
236 | class_destroy(cpuid_class); | 236 | class_destroy(cpuid_class); |
237 | unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); | 237 | unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); |
238 | unregister_hotcpu_notifier(&cpuid_class_cpu_notifier); | 238 | unregister_hotcpu_notifier(&cpuid_class_cpu_notifier); |
diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index d535cdbbfd25..a773f776c9ea 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c | |||
@@ -239,14 +239,14 @@ static struct file_operations msr_fops = { | |||
239 | .open = msr_open, | 239 | .open = msr_open, |
240 | }; | 240 | }; |
241 | 241 | ||
242 | static int msr_class_device_create(int i) | 242 | static int msr_device_create(int i) |
243 | { | 243 | { |
244 | int err = 0; | 244 | int err = 0; |
245 | struct class_device *class_err; | 245 | struct device *dev; |
246 | 246 | ||
247 | class_err = class_device_create(msr_class, NULL, MKDEV(MSR_MAJOR, i), NULL, "msr%d",i); | 247 | dev = device_create(msr_class, NULL, MKDEV(MSR_MAJOR, i), "msr%d",i); |
248 | if (IS_ERR(class_err)) | 248 | if (IS_ERR(dev)) |
249 | err = PTR_ERR(class_err); | 249 | err = PTR_ERR(dev); |
250 | return err; | 250 | return err; |
251 | } | 251 | } |
252 | 252 | ||
@@ -258,10 +258,10 @@ static int msr_class_cpu_callback(struct notifier_block *nfb, | |||
258 | 258 | ||
259 | switch (action) { | 259 | switch (action) { |
260 | case CPU_ONLINE: | 260 | case CPU_ONLINE: |
261 | msr_class_device_create(cpu); | 261 | msr_device_create(cpu); |
262 | break; | 262 | break; |
263 | case CPU_DEAD: | 263 | case CPU_DEAD: |
264 | class_device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); | 264 | device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); |
265 | break; | 265 | break; |
266 | } | 266 | } |
267 | return NOTIFY_OK; | 267 | return NOTIFY_OK; |
@@ -290,7 +290,7 @@ static int __init msr_init(void) | |||
290 | goto out_chrdev; | 290 | goto out_chrdev; |
291 | } | 291 | } |
292 | for_each_online_cpu(i) { | 292 | for_each_online_cpu(i) { |
293 | err = msr_class_device_create(i); | 293 | err = msr_device_create(i); |
294 | if (err != 0) | 294 | if (err != 0) |
295 | goto out_class; | 295 | goto out_class; |
296 | } | 296 | } |
@@ -302,7 +302,7 @@ static int __init msr_init(void) | |||
302 | out_class: | 302 | out_class: |
303 | i = 0; | 303 | i = 0; |
304 | for_each_online_cpu(i) | 304 | for_each_online_cpu(i) |
305 | class_device_destroy(msr_class, MKDEV(MSR_MAJOR, i)); | 305 | device_destroy(msr_class, MKDEV(MSR_MAJOR, i)); |
306 | class_destroy(msr_class); | 306 | class_destroy(msr_class); |
307 | out_chrdev: | 307 | out_chrdev: |
308 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); | 308 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); |
@@ -314,7 +314,7 @@ static void __exit msr_exit(void) | |||
314 | { | 314 | { |
315 | int cpu = 0; | 315 | int cpu = 0; |
316 | for_each_online_cpu(cpu) | 316 | for_each_online_cpu(cpu) |
317 | class_device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); | 317 | device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); |
318 | class_destroy(msr_class); | 318 | class_destroy(msr_class); |
319 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); | 319 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); |
320 | unregister_hotcpu_notifier(&msr_class_cpu_notifier); | 320 | unregister_hotcpu_notifier(&msr_class_cpu_notifier); |
diff --git a/arch/i386/kernel/pci-dma.c b/arch/i386/kernel/pci-dma.c index 25fe66853934..5c8c6ef1fc5e 100644 --- a/arch/i386/kernel/pci-dma.c +++ b/arch/i386/kernel/pci-dma.c | |||
@@ -75,7 +75,7 @@ EXPORT_SYMBOL(dma_free_coherent); | |||
75 | int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | 75 | int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, |
76 | dma_addr_t device_addr, size_t size, int flags) | 76 | dma_addr_t device_addr, size_t size, int flags) |
77 | { | 77 | { |
78 | void __iomem *mem_base; | 78 | void __iomem *mem_base = NULL; |
79 | int pages = size >> PAGE_SHIFT; | 79 | int pages = size >> PAGE_SHIFT; |
80 | int bitmap_size = (pages + 31)/32; | 80 | int bitmap_size = (pages + 31)/32; |
81 | 81 | ||
@@ -114,6 +114,8 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | |||
114 | free1_out: | 114 | free1_out: |
115 | kfree(dev->dma_mem->bitmap); | 115 | kfree(dev->dma_mem->bitmap); |
116 | out: | 116 | out: |
117 | if (mem_base) | ||
118 | iounmap(mem_base); | ||
117 | return 0; | 119 | return 0; |
118 | } | 120 | } |
119 | EXPORT_SYMBOL(dma_declare_coherent_memory); | 121 | EXPORT_SYMBOL(dma_declare_coherent_memory); |