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: more general identifier for Phoenix BIOS
AMD IOMMU: check for next_bit also in unmapped area
AMD IOMMU: fix fullflush comparison length
AMD IOMMU: enable device isolation per default
AMD IOMMU: add parameter to disable device isolation
x86, PEBS/DS: fix code flow in ds_request()
x86: add rdtsc barrier to TSC sync check
xen: fix scrub_page()
x86: fix es7000 compiling
x86, bts: fix unlock problem in ds.c
x86, voyager: fix smp generic helper voyager breakage
x86: move iomap.h to the new include location

+54 -28
+3 -1
Documentation/kernel-parameters.txt
··· 294 294 Possible values are: 295 295 isolate - enable device isolation (each device, as far 296 296 as possible, will get its own protection 297 - domain) 297 + domain) [default] 298 + share - put every device behind one IOMMU into the 299 + same protection domain 298 300 fullflush - enable flushing of IO/TLB entries when 299 301 they are unmapped. Otherwise they are 300 302 flushed before they will be reused, which
+4 -1
arch/x86/Kconfig
··· 167 167 config X86_SMP 168 168 bool 169 169 depends on SMP && ((X86_32 && !X86_VOYAGER) || X86_64) 170 - select USE_GENERIC_SMP_HELPERS 171 170 default y 171 + 172 + config USE_GENERIC_SMP_HELPERS 173 + def_bool y 174 + depends on SMP 172 175 173 176 config X86_32_SMP 174 177 def_bool y
+1 -1
arch/x86/kernel/amd_iommu.c
··· 537 537 address >>= PAGE_SHIFT; 538 538 iommu_area_free(dom->bitmap, address, pages); 539 539 540 - if (address + pages >= dom->next_bit) 540 + if (address >= dom->next_bit) 541 541 dom->need_flush = true; 542 542 } 543 543
+4 -2
arch/x86/kernel/amd_iommu_init.c
··· 121 121 LIST_HEAD(amd_iommu_unity_map); /* a list of required unity mappings 122 122 we find in ACPI */ 123 123 unsigned amd_iommu_aperture_order = 26; /* size of aperture in power of 2 */ 124 - int amd_iommu_isolate; /* if 1, device isolation is enabled */ 124 + int amd_iommu_isolate = 1; /* if 1, device isolation is enabled */ 125 125 bool amd_iommu_unmap_flush; /* if true, flush on every unmap */ 126 126 127 127 LIST_HEAD(amd_iommu_list); /* list of all AMD IOMMUs in the ··· 1213 1213 for (; *str; ++str) { 1214 1214 if (strncmp(str, "isolate", 7) == 0) 1215 1215 amd_iommu_isolate = 1; 1216 - if (strncmp(str, "fullflush", 11) == 0) 1216 + if (strncmp(str, "share", 5) == 0) 1217 + amd_iommu_isolate = 0; 1218 + if (strncmp(str, "fullflush", 9) == 0) 1217 1219 amd_iommu_unmap_flush = true; 1218 1220 } 1219 1221
+21 -4
arch/x86/kernel/ds.c
··· 236 236 struct ds_context *context = *p_context; 237 237 238 238 if (!context) { 239 + spin_unlock(&ds_lock); 240 + 239 241 context = kzalloc(sizeof(*context), GFP_KERNEL); 240 242 241 - if (!context) 243 + if (!context) { 244 + spin_lock(&ds_lock); 242 245 return NULL; 246 + } 243 247 244 248 context->ds = kzalloc(ds_cfg.sizeof_ds, GFP_KERNEL); 245 249 if (!context->ds) { 246 250 kfree(context); 251 + spin_lock(&ds_lock); 247 252 return NULL; 253 + } 254 + 255 + spin_lock(&ds_lock); 256 + /* 257 + * Check for race - another CPU could have allocated 258 + * it meanwhile: 259 + */ 260 + if (*p_context) { 261 + kfree(context->ds); 262 + kfree(context); 263 + return *p_context; 248 264 } 249 265 250 266 *p_context = context; ··· 400 384 401 385 spin_lock(&ds_lock); 402 386 403 - if (!check_tracer(task)) 404 - return -EPERM; 405 - 406 387 error = -ENOMEM; 407 388 context = ds_alloc_context(task); 408 389 if (!context) 390 + goto out_unlock; 391 + 392 + error = -EPERM; 393 + if (!check_tracer(task)) 409 394 goto out_unlock; 410 395 411 396 error = -EALREADY;
+1 -8
arch/x86/kernel/es7000_32.c
··· 250 250 { 251 251 struct acpi_table_header *header = NULL; 252 252 int i = 0; 253 - acpi_size tbl_size; 254 253 255 - while (ACPI_SUCCESS(acpi_get_table_with_size("OEM1", i++, &header, &tbl_size))) { 254 + while (ACPI_SUCCESS(acpi_get_table("OEM1", i++, &header))) { 256 255 if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) { 257 256 struct oem_table *t = (struct oem_table *)header; 258 257 259 258 oem_addrX = t->OEMTableAddr; 260 259 oem_size = t->OEMTableSize; 261 - early_acpi_os_unmap_memory(header, tbl_size); 262 260 263 261 *oem_addr = (unsigned long)__acpi_map_table(oem_addrX, 264 262 oem_size); 265 263 return 0; 266 264 } 267 - early_acpi_os_unmap_memory(header, tbl_size); 268 265 } 269 266 return -1; 270 267 } 271 268 272 269 void __init unmap_unisys_acpi_oem_table(unsigned long oem_addr) 273 270 { 274 - if (!oem_addr) 275 - return; 276 - 277 - __acpi_unmap_table((char *)oem_addr, oem_size); 278 271 } 279 272 #endif 280 273
+1 -1
arch/x86/kernel/setup.c
··· 764 764 .callback = dmi_low_memory_corruption, 765 765 .ident = "Phoenix BIOS", 766 766 .matches = { 767 - DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"), 767 + DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies"), 768 768 }, 769 769 }, 770 770 #endif
+4
arch/x86/kernel/tsc_sync.c
··· 46 46 cycles_t start, now, prev, end; 47 47 int i; 48 48 49 + rdtsc_barrier(); 49 50 start = get_cycles(); 51 + rdtsc_barrier(); 50 52 /* 51 53 * The measurement runs for 20 msecs: 52 54 */ ··· 63 61 */ 64 62 __raw_spin_lock(&sync_lock); 65 63 prev = last_tsc; 64 + rdtsc_barrier(); 66 65 now = get_cycles(); 66 + rdtsc_barrier(); 67 67 last_tsc = now; 68 68 __raw_spin_unlock(&sync_lock); 69 69
+14 -2
arch/x86/mach-voyager/voyager_smp.c
··· 7 7 * This file provides all the same external entries as smp.c but uses 8 8 * the voyager hal to provide the functionality 9 9 */ 10 + #include <linux/cpu.h> 10 11 #include <linux/module.h> 11 12 #include <linux/mm.h> 12 13 #include <linux/kernel_stat.h> ··· 1791 1790 x86_write_percpu(cpu_number, hard_smp_processor_id()); 1792 1791 } 1793 1792 1793 + static void voyager_send_call_func(cpumask_t callmask) 1794 + { 1795 + __u32 mask = cpus_addr(callmask)[0] & ~(1 << smp_processor_id()); 1796 + send_CPI(mask, VIC_CALL_FUNCTION_CPI); 1797 + } 1798 + 1799 + static void voyager_send_call_func_single(int cpu) 1800 + { 1801 + send_CPI(1 << cpu, VIC_CALL_FUNCTION_SINGLE_CPI); 1802 + } 1803 + 1794 1804 struct smp_ops smp_ops = { 1795 1805 .smp_prepare_boot_cpu = voyager_smp_prepare_boot_cpu, 1796 1806 .smp_prepare_cpus = voyager_smp_prepare_cpus, ··· 1811 1799 .smp_send_stop = voyager_smp_send_stop, 1812 1800 .smp_send_reschedule = voyager_smp_send_reschedule, 1813 1801 1814 - .send_call_func_ipi = native_send_call_func_ipi, 1815 - .send_call_func_single_ipi = native_send_call_func_single_ipi, 1802 + .send_call_func_ipi = voyager_send_call_func, 1803 + .send_call_func_single_ipi = voyager_send_call_func_single, 1816 1804 };
+1 -8
drivers/xen/balloon.c
··· 122 122 static void scrub_page(struct page *page) 123 123 { 124 124 #ifdef CONFIG_XEN_SCRUB_PAGES 125 - if (PageHighMem(page)) { 126 - void *v = kmap(page); 127 - clear_page(v); 128 - kunmap(v); 129 - } else { 130 - void *v = page_address(page); 131 - clear_page(v); 132 - } 125 + clear_highpage(page); 133 126 #endif 134 127 } 135 128
include/asm-x86/iomap.h arch/x86/include/asm/iomap.h