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: show number of core_siblings instead of thread_siblings in /proc/cpuinfo
amd-iommu: fix iommu flag masks
x86: initialize io_bitmap_base on 32bit
x86: gettimeofday() vDSO: fix segfault when tv == NULL

+18 -14
+8 -8
arch/x86/kernel/amd_iommu_init.c
··· 49 49 #define IVHD_DEV_EXT_SELECT 0x46 50 50 #define IVHD_DEV_EXT_SELECT_RANGE 0x47 51 51 52 - #define IVHD_FLAG_HT_TUN_EN 0x00 53 - #define IVHD_FLAG_PASSPW_EN 0x01 54 - #define IVHD_FLAG_RESPASSPW_EN 0x02 55 - #define IVHD_FLAG_ISOC_EN 0x03 52 + #define IVHD_FLAG_HT_TUN_EN_MASK 0x01 53 + #define IVHD_FLAG_PASSPW_EN_MASK 0x02 54 + #define IVHD_FLAG_RESPASSPW_EN_MASK 0x04 55 + #define IVHD_FLAG_ISOC_EN_MASK 0x08 56 56 57 57 #define IVMD_FLAG_EXCL_RANGE 0x08 58 58 #define IVMD_FLAG_UNITY_MAP 0x01 ··· 569 569 * First set the recommended feature enable bits from ACPI 570 570 * into the IOMMU control registers 571 571 */ 572 - h->flags & IVHD_FLAG_HT_TUN_EN ? 572 + h->flags & IVHD_FLAG_HT_TUN_EN_MASK ? 573 573 iommu_feature_enable(iommu, CONTROL_HT_TUN_EN) : 574 574 iommu_feature_disable(iommu, CONTROL_HT_TUN_EN); 575 575 576 - h->flags & IVHD_FLAG_PASSPW_EN ? 576 + h->flags & IVHD_FLAG_PASSPW_EN_MASK ? 577 577 iommu_feature_enable(iommu, CONTROL_PASSPW_EN) : 578 578 iommu_feature_disable(iommu, CONTROL_PASSPW_EN); 579 579 580 - h->flags & IVHD_FLAG_RESPASSPW_EN ? 580 + h->flags & IVHD_FLAG_RESPASSPW_EN_MASK ? 581 581 iommu_feature_enable(iommu, CONTROL_RESPASSPW_EN) : 582 582 iommu_feature_disable(iommu, CONTROL_RESPASSPW_EN); 583 583 584 - h->flags & IVHD_FLAG_ISOC_EN ? 584 + h->flags & IVHD_FLAG_ISOC_EN_MASK ? 585 585 iommu_feature_enable(iommu, CONTROL_ISOC_EN) : 586 586 iommu_feature_disable(iommu, CONTROL_ISOC_EN); 587 587
+2
arch/x86/kernel/cpu/common.c
··· 1203 1203 load_TR_desc(); 1204 1204 load_LDT(&init_mm.context); 1205 1205 1206 + t->x86_tss.io_bitmap_base = offsetof(struct tss_struct, io_bitmap); 1207 + 1206 1208 #ifdef CONFIG_DOUBLEFAULT 1207 1209 /* Set up doublefault TSS pointer in the GDT */ 1208 1210 __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss);
+1 -1
arch/x86/kernel/cpu/proc.c
··· 14 14 if (c->x86_max_cores * smp_num_siblings > 1) { 15 15 seq_printf(m, "physical id\t: %d\n", c->phys_proc_id); 16 16 seq_printf(m, "siblings\t: %d\n", 17 - cpumask_weight(cpu_sibling_mask(cpu))); 17 + cpumask_weight(cpu_core_mask(cpu))); 18 18 seq_printf(m, "core id\t\t: %d\n", c->cpu_core_id); 19 19 seq_printf(m, "cpu cores\t: %d\n", c->booted_cores); 20 20 seq_printf(m, "apicid\t\t: %d\n", c->apicid);
+7 -5
arch/x86/vdso/vclock_gettime.c
··· 104 104 { 105 105 long ret; 106 106 if (likely(gtod->sysctl_enabled && gtod->clock.vread)) { 107 - BUILD_BUG_ON(offsetof(struct timeval, tv_usec) != 108 - offsetof(struct timespec, tv_nsec) || 109 - sizeof(*tv) != sizeof(struct timespec)); 110 - do_realtime((struct timespec *)tv); 111 - tv->tv_usec /= 1000; 107 + if (likely(tv != NULL)) { 108 + BUILD_BUG_ON(offsetof(struct timeval, tv_usec) != 109 + offsetof(struct timespec, tv_nsec) || 110 + sizeof(*tv) != sizeof(struct timespec)); 111 + do_realtime((struct timespec *)tv); 112 + tv->tv_usec /= 1000; 113 + } 112 114 if (unlikely(tz != NULL)) { 113 115 /* Avoid memcpy. Some old compilers fail to inline it */ 114 116 tz->tz_minuteswest = gtod->sys_tz.tz_minuteswest;