Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, mcheck: Avoid duplicate sysfs links/files for thresholding banks
io-mapping: Fix the address space annotations
x86: Fix the address space annotations of iomap_atomic_prot_pfn()
x86, mm: Fix CONFIG_VMSPLIT_1G and 2G_OPT trampoline
x86, hwmon: Fix unsafe smp_processor_id() in thermal_throttle_add_dev

+25 -25
+2 -2
arch/x86/include/asm/iomap.h
··· 26 26 #include <asm/pgtable.h> 27 27 #include <asm/tlbflush.h> 28 28 29 - void * 29 + void __iomem * 30 30 iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot); 31 31 32 32 void 33 - iounmap_atomic(void *kvaddr, enum km_type type); 33 + iounmap_atomic(void __iomem *kvaddr, enum km_type type); 34 34 35 35 int 36 36 iomap_create_wc(resource_size_t base, unsigned long size, pgprot_t *prot);
+2 -2
arch/x86/kernel/cpu/mcheck/mce_amd.c
··· 530 530 err = -ENOMEM; 531 531 goto out; 532 532 } 533 - if (!alloc_cpumask_var(&b->cpus, GFP_KERNEL)) { 533 + if (!zalloc_cpumask_var(&b->cpus, GFP_KERNEL)) { 534 534 kfree(b); 535 535 err = -ENOMEM; 536 536 goto out; ··· 543 543 #ifndef CONFIG_SMP 544 544 cpumask_setall(b->cpus); 545 545 #else 546 - cpumask_copy(b->cpus, c->llc_shared_map); 546 + cpumask_set_cpu(cpu, b->cpus); 547 547 #endif 548 548 549 549 per_cpu(threshold_banks, cpu)[bank] = b;
+5 -4
arch/x86/kernel/cpu/mcheck/therm_throt.c
··· 202 202 203 203 #ifdef CONFIG_SYSFS 204 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 208 int err; 208 - struct cpuinfo_x86 *c = &cpu_data(smp_processor_id()); 209 + struct cpuinfo_x86 *c = &cpu_data(cpu); 209 210 210 211 err = sysfs_create_group(&sys_dev->kobj, &thermal_attr_group); 211 212 if (err) ··· 252 251 case CPU_UP_PREPARE: 253 252 case CPU_UP_PREPARE_FROZEN: 254 253 mutex_lock(&therm_cpu_lock); 255 - err = thermal_throttle_add_dev(sys_dev); 254 + err = thermal_throttle_add_dev(sys_dev, cpu); 256 255 mutex_unlock(&therm_cpu_lock); 257 256 WARN_ON(err); 258 257 break; ··· 288 287 #endif 289 288 /* connect live CPUs to sysfs */ 290 289 for_each_online_cpu(cpu) { 291 - err = thermal_throttle_add_dev(get_cpu_sysdev(cpu)); 290 + err = thermal_throttle_add_dev(get_cpu_sysdev(cpu), cpu); 292 291 WARN_ON(err); 293 292 } 294 293 #ifdef CONFIG_HOTPLUG_CPU
+1 -2
arch/x86/kernel/trampoline.c
··· 45 45 /* Copy kernel address range */ 46 46 clone_pgd_range(trampoline_pg_dir + KERNEL_PGD_BOUNDARY, 47 47 swapper_pg_dir + KERNEL_PGD_BOUNDARY, 48 - min_t(unsigned long, KERNEL_PGD_PTRS, 49 - KERNEL_PGD_BOUNDARY)); 48 + KERNEL_PGD_PTRS); 50 49 51 50 /* Initialize low mappings */ 52 51 clone_pgd_range(trampoline_pg_dir,
+3 -3
arch/x86/mm/iomap_32.c
··· 74 74 /* 75 75 * Map 'pfn' using fixed map 'type' and protections 'prot' 76 76 */ 77 - void * 77 + void __iomem * 78 78 iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) 79 79 { 80 80 /* ··· 86 86 if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC)) 87 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 91 EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn); 92 92 93 93 void 94 - iounmap_atomic(void *kvaddr, enum km_type type) 94 + iounmap_atomic(void __iomem *kvaddr, enum km_type type) 95 95 { 96 96 unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; 97 97 enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();
+12 -12
include/linux/io-mapping.h
··· 79 79 } 80 80 81 81 /* Atomic map/unmap */ 82 - static inline void * 82 + static inline void __iomem * 83 83 io_mapping_map_atomic_wc(struct io_mapping *mapping, 84 84 unsigned long offset, 85 85 int slot) ··· 94 94 } 95 95 96 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 99 iounmap_atomic(vaddr, slot); 100 100 } 101 101 102 - static inline void * 102 + static inline void __iomem * 103 103 io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) 104 104 { 105 105 resource_size_t phys_addr; ··· 111 111 } 112 112 113 113 static inline void 114 - io_mapping_unmap(void *vaddr) 114 + io_mapping_unmap(void __iomem *vaddr) 115 115 { 116 116 iounmap(vaddr); 117 117 } ··· 125 125 static inline struct io_mapping * 126 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 131 static inline void 132 132 io_mapping_free(struct io_mapping *mapping) 133 133 { 134 - iounmap(mapping); 134 + iounmap((void __force __iomem *) mapping); 135 135 } 136 136 137 137 /* Atomic map/unmap */ 138 - static inline void * 138 + static inline void __iomem * 139 139 io_mapping_map_atomic_wc(struct io_mapping *mapping, 140 140 unsigned long offset, 141 141 int slot) 142 142 { 143 - return ((char *) mapping) + offset; 143 + return ((char __force __iomem *) mapping) + offset; 144 144 } 145 145 146 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 151 /* Non-atomic map/unmap */ 152 - static inline void * 152 + static inline void __iomem * 153 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 158 static inline void 159 - io_mapping_unmap(void *vaddr) 159 + io_mapping_unmap(void __iomem *vaddr) 160 160 { 161 161 } 162 162