diff options
| -rw-r--r-- | arch/x86/include/asm/iomap.h | 4 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_amd.c | 4 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/mcheck/therm_throt.c | 9 | ||||
| -rw-r--r-- | arch/x86/kernel/trampoline.c | 3 | ||||
| -rw-r--r-- | arch/x86/mm/iomap_32.c | 6 | ||||
| -rw-r--r-- | include/linux/io-mapping.h | 24 |
6 files changed, 25 insertions, 25 deletions
diff --git a/arch/x86/include/asm/iomap.h b/arch/x86/include/asm/iomap.h index f35eb45d6576..c4191b3b7056 100644 --- a/arch/x86/include/asm/iomap.h +++ b/arch/x86/include/asm/iomap.h | |||
| @@ -26,11 +26,11 @@ | |||
| 26 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
| 27 | #include <asm/tlbflush.h> | 27 | #include <asm/tlbflush.h> |
| 28 | 28 | ||
| 29 | void * | 29 | void __iomem * |
| 30 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot); | 30 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot); |
| 31 | 31 | ||
| 32 | void | 32 | void |
| 33 | iounmap_atomic(void *kvaddr, enum km_type type); | 33 | iounmap_atomic(void __iomem *kvaddr, enum km_type type); |
| 34 | 34 | ||
| 35 | int | 35 | int |
| 36 | iomap_create_wc(resource_size_t base, unsigned long size, pgprot_t *prot); | 36 | iomap_create_wc(resource_size_t base, unsigned long size, pgprot_t *prot); |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 224392d8fe8c..5e975298fa81 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
| @@ -530,7 +530,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) | |||
| 530 | err = -ENOMEM; | 530 | err = -ENOMEM; |
| 531 | goto out; | 531 | goto out; |
| 532 | } | 532 | } |
| 533 | if (!alloc_cpumask_var(&b->cpus, GFP_KERNEL)) { | 533 | if (!zalloc_cpumask_var(&b->cpus, GFP_KERNEL)) { |
| 534 | kfree(b); | 534 | kfree(b); |
| 535 | err = -ENOMEM; | 535 | err = -ENOMEM; |
| 536 | goto out; | 536 | goto out; |
| @@ -543,7 +543,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) | |||
| 543 | #ifndef CONFIG_SMP | 543 | #ifndef CONFIG_SMP |
| 544 | cpumask_setall(b->cpus); | 544 | cpumask_setall(b->cpus); |
| 545 | #else | 545 | #else |
| 546 | cpumask_copy(b->cpus, c->llc_shared_map); | 546 | cpumask_set_cpu(cpu, b->cpus); |
| 547 | #endif | 547 | #endif |
| 548 | 548 | ||
| 549 | per_cpu(threshold_banks, cpu)[bank] = b; | 549 | per_cpu(threshold_banks, cpu)[bank] = b; |
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index c2a8b26d4fea..d9368eeda309 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c | |||
| @@ -202,10 +202,11 @@ static int therm_throt_process(bool new_event, int event, int level) | |||
| 202 | 202 | ||
| 203 | #ifdef CONFIG_SYSFS | 203 | #ifdef CONFIG_SYSFS |
| 204 | /* Add/Remove thermal_throttle interface for CPU device: */ | 204 | /* Add/Remove thermal_throttle interface for CPU device: */ |
| 205 | static __cpuinit int thermal_throttle_add_dev(struct sys_device *sys_dev) | 205 | static __cpuinit int thermal_throttle_add_dev(struct sys_device *sys_dev, |
| 206 | unsigned int cpu) | ||
| 206 | { | 207 | { |
| 207 | int err; | 208 | int err; |
| 208 | struct cpuinfo_x86 *c = &cpu_data(smp_processor_id()); | 209 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
| 209 | 210 | ||
| 210 | err = sysfs_create_group(&sys_dev->kobj, &thermal_attr_group); | 211 | err = sysfs_create_group(&sys_dev->kobj, &thermal_attr_group); |
| 211 | if (err) | 212 | if (err) |
| @@ -251,7 +252,7 @@ thermal_throttle_cpu_callback(struct notifier_block *nfb, | |||
| 251 | case CPU_UP_PREPARE: | 252 | case CPU_UP_PREPARE: |
| 252 | case CPU_UP_PREPARE_FROZEN: | 253 | case CPU_UP_PREPARE_FROZEN: |
| 253 | mutex_lock(&therm_cpu_lock); | 254 | mutex_lock(&therm_cpu_lock); |
| 254 | err = thermal_throttle_add_dev(sys_dev); | 255 | err = thermal_throttle_add_dev(sys_dev, cpu); |
| 255 | mutex_unlock(&therm_cpu_lock); | 256 | mutex_unlock(&therm_cpu_lock); |
| 256 | WARN_ON(err); | 257 | WARN_ON(err); |
| 257 | break; | 258 | break; |
| @@ -287,7 +288,7 @@ static __init int thermal_throttle_init_device(void) | |||
| 287 | #endif | 288 | #endif |
| 288 | /* connect live CPUs to sysfs */ | 289 | /* connect live CPUs to sysfs */ |
| 289 | for_each_online_cpu(cpu) { | 290 | for_each_online_cpu(cpu) { |
| 290 | err = thermal_throttle_add_dev(get_cpu_sysdev(cpu)); | 291 | err = thermal_throttle_add_dev(get_cpu_sysdev(cpu), cpu); |
| 291 | WARN_ON(err); | 292 | WARN_ON(err); |
| 292 | } | 293 | } |
| 293 | #ifdef CONFIG_HOTPLUG_CPU | 294 | #ifdef CONFIG_HOTPLUG_CPU |
diff --git a/arch/x86/kernel/trampoline.c b/arch/x86/kernel/trampoline.c index a874495b3673..e2a595257390 100644 --- a/arch/x86/kernel/trampoline.c +++ b/arch/x86/kernel/trampoline.c | |||
| @@ -45,8 +45,7 @@ void __init setup_trampoline_page_table(void) | |||
| 45 | /* Copy kernel address range */ | 45 | /* Copy kernel address range */ |
| 46 | clone_pgd_range(trampoline_pg_dir + KERNEL_PGD_BOUNDARY, | 46 | clone_pgd_range(trampoline_pg_dir + KERNEL_PGD_BOUNDARY, |
| 47 | swapper_pg_dir + KERNEL_PGD_BOUNDARY, | 47 | swapper_pg_dir + KERNEL_PGD_BOUNDARY, |
| 48 | min_t(unsigned long, KERNEL_PGD_PTRS, | 48 | KERNEL_PGD_PTRS); |
| 49 | KERNEL_PGD_BOUNDARY)); | ||
| 50 | 49 | ||
| 51 | /* Initialize low mappings */ | 50 | /* Initialize low mappings */ |
| 52 | clone_pgd_range(trampoline_pg_dir, | 51 | clone_pgd_range(trampoline_pg_dir, |
diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c index 84e236ce76ba..72fc70cf6184 100644 --- a/arch/x86/mm/iomap_32.c +++ b/arch/x86/mm/iomap_32.c | |||
| @@ -74,7 +74,7 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) | |||
| 74 | /* | 74 | /* |
| 75 | * Map 'pfn' using fixed map 'type' and protections 'prot' | 75 | * Map 'pfn' using fixed map 'type' and protections 'prot' |
| 76 | */ | 76 | */ |
| 77 | void * | 77 | void __iomem * |
| 78 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) | 78 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) |
| 79 | { | 79 | { |
| 80 | /* | 80 | /* |
| @@ -86,12 +86,12 @@ iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) | |||
| 86 | if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC)) | 86 | if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC)) |
| 87 | prot = PAGE_KERNEL_UC_MINUS; | 87 | prot = PAGE_KERNEL_UC_MINUS; |
| 88 | 88 | ||
| 89 | return kmap_atomic_prot_pfn(pfn, type, prot); | 89 | return (void __force __iomem *) kmap_atomic_prot_pfn(pfn, type, prot); |
| 90 | } | 90 | } |
| 91 | EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn); | 91 | EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn); |
| 92 | 92 | ||
| 93 | void | 93 | void |
| 94 | iounmap_atomic(void *kvaddr, enum km_type type) | 94 | iounmap_atomic(void __iomem *kvaddr, enum km_type type) |
| 95 | { | 95 | { |
| 96 | unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; | 96 | unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; |
| 97 | enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id(); | 97 | enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id(); |
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 0a6b3d5c490c..7fb592793738 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
| @@ -79,7 +79,7 @@ io_mapping_free(struct io_mapping *mapping) | |||
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | /* Atomic map/unmap */ | 81 | /* Atomic map/unmap */ |
| 82 | static inline void * | 82 | static inline void __iomem * |
| 83 | io_mapping_map_atomic_wc(struct io_mapping *mapping, | 83 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
| 84 | unsigned long offset, | 84 | unsigned long offset, |
| 85 | int slot) | 85 | int slot) |
| @@ -94,12 +94,12 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping, | |||
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | static inline void | 96 | static inline void |
| 97 | io_mapping_unmap_atomic(void *vaddr, int slot) | 97 | io_mapping_unmap_atomic(void __iomem *vaddr, int slot) |
| 98 | { | 98 | { |
| 99 | iounmap_atomic(vaddr, slot); | 99 | iounmap_atomic(vaddr, slot); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | static inline void * | 102 | static inline void __iomem * |
| 103 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | 103 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) |
| 104 | { | 104 | { |
| 105 | resource_size_t phys_addr; | 105 | resource_size_t phys_addr; |
| @@ -111,7 +111,7 @@ io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | |||
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | static inline void | 113 | static inline void |
| 114 | io_mapping_unmap(void *vaddr) | 114 | io_mapping_unmap(void __iomem *vaddr) |
| 115 | { | 115 | { |
| 116 | iounmap(vaddr); | 116 | iounmap(vaddr); |
| 117 | } | 117 | } |
| @@ -125,38 +125,38 @@ struct io_mapping; | |||
| 125 | static inline struct io_mapping * | 125 | static inline struct io_mapping * |
| 126 | io_mapping_create_wc(resource_size_t base, unsigned long size) | 126 | io_mapping_create_wc(resource_size_t base, unsigned long size) |
| 127 | { | 127 | { |
| 128 | return (struct io_mapping *) ioremap_wc(base, size); | 128 | return (struct io_mapping __force *) ioremap_wc(base, size); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | static inline void | 131 | static inline void |
| 132 | io_mapping_free(struct io_mapping *mapping) | 132 | io_mapping_free(struct io_mapping *mapping) |
| 133 | { | 133 | { |
| 134 | iounmap(mapping); | 134 | iounmap((void __force __iomem *) mapping); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | /* Atomic map/unmap */ | 137 | /* Atomic map/unmap */ |
| 138 | static inline void * | 138 | static inline void __iomem * |
| 139 | io_mapping_map_atomic_wc(struct io_mapping *mapping, | 139 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
| 140 | unsigned long offset, | 140 | unsigned long offset, |
| 141 | int slot) | 141 | int slot) |
| 142 | { | 142 | { |
| 143 | return ((char *) mapping) + offset; | 143 | return ((char __force __iomem *) mapping) + offset; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | static inline void | 146 | static inline void |
| 147 | io_mapping_unmap_atomic(void *vaddr, int slot) | 147 | io_mapping_unmap_atomic(void __iomem *vaddr, int slot) |
| 148 | { | 148 | { |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | /* Non-atomic map/unmap */ | 151 | /* Non-atomic map/unmap */ |
| 152 | static inline void * | 152 | static inline void __iomem * |
| 153 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | 153 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) |
| 154 | { | 154 | { |
| 155 | return ((char *) mapping) + offset; | 155 | return ((char __force __iomem *) mapping) + offset; |
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | static inline void | 158 | static inline void |
| 159 | io_mapping_unmap(void *vaddr) | 159 | io_mapping_unmap(void __iomem *vaddr) |
| 160 | { | 160 | { |
| 161 | } | 161 | } |
| 162 | 162 | ||
