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