Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: fix usage of bios intcall()
x86: Remove unused function lapic_watchdog_ok()
x86: Remove unused variable disable_x2apic
x86, kvm: Fix section mismatches in kvm.c
x86: Add missing annotation to arch/x86/lib/copy_user_64.S::copy_to_user
x86: Fix fixmap page order for FIX_TEXT_POKE0,1
amd-iommu: set evt_buf_size correctly
amd-iommu: handle alias entries correctly in init code
x86: Fix printk call in print_local_apic()
x86: Declare check_efer() before it gets used
x86: Mark device_nb as static and fix NULL noise
x86: Remove double declaration of MSR_P6_EVNTSEL0 and MSR_P6_EVNTSEL1
xen: Use kcalloc() in xen_init_IRQ()
x86: Fix fixmap ordering
x86: Fix symbol annotation for arch/x86/lib/clear_page_64.S::clear_page_c

+39 -51
+1 -2
arch/x86/boot/video-bios.c
··· 37 37 ireg.al = mode; /* AH=0x00 Set Video Mode */ 38 38 intcall(0x10, &ireg, NULL); 39 39 40 - 41 40 ireg.ah = 0x0f; /* Get Current Video Mode */ 42 41 intcall(0x10, &ireg, &oreg); 43 42 44 43 do_restore = 1; /* Assume video contents were lost */ 45 44 46 45 /* Not all BIOSes are clean with the top bit */ 47 - new_mode = ireg.al & 0x7f; 46 + new_mode = oreg.al & 0x7f; 48 47 49 48 if (new_mode == mode) 50 49 return 0; /* Mode change OK */
+2 -2
arch/x86/boot/video-vesa.c
··· 45 45 ireg.di = (size_t)&vginfo; 46 46 intcall(0x10, &ireg, &oreg); 47 47 48 - if (ireg.ax != 0x004f || 48 + if (oreg.ax != 0x004f || 49 49 vginfo.signature != VESA_MAGIC || 50 50 vginfo.version < 0x0102) 51 51 return 0; /* Not present */ ··· 70 70 ireg.di = (size_t)&vminfo; 71 71 intcall(0x10, &ireg, &oreg); 72 72 73 - if (ireg.ax != 0x004f) 73 + if (oreg.ax != 0x004f) 74 74 continue; 75 75 76 76 if ((vminfo.mode_attr & 0x15) == 0x05) {
+5 -5
arch/x86/include/asm/fixmap.h
··· 111 111 #ifdef CONFIG_PARAVIRT 112 112 FIX_PARAVIRT_BOOTMAP, 113 113 #endif 114 - FIX_TEXT_POKE0, /* reserve 2 pages for text_poke() */ 115 - FIX_TEXT_POKE1, 114 + FIX_TEXT_POKE1, /* reserve 2 pages for text_poke() */ 115 + FIX_TEXT_POKE0, /* first page is last, because allocation is backward */ 116 116 __end_of_permanent_fixed_addresses, 117 - #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT 118 - FIX_OHCI1394_BASE, 119 - #endif 120 117 /* 121 118 * 256 temporary boot-time mappings, used by early_ioremap(), 122 119 * before ioremap() is functional. ··· 126 129 FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 - 127 130 (__end_of_permanent_fixed_addresses & 255), 128 131 FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1, 132 + #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT 133 + FIX_OHCI1394_BASE, 134 + #endif 129 135 #ifdef CONFIG_X86_32 130 136 FIX_WP_TEST, 131 137 #endif
-4
arch/x86/include/asm/msr-index.h
··· 246 246 #define MSR_IA32_MISC_ENABLE_TURBO_DISABLE (1ULL << 38) 247 247 #define MSR_IA32_MISC_ENABLE_IP_PREF_DISABLE (1ULL << 39) 248 248 249 - /* Intel Model 6 */ 250 - #define MSR_P6_EVNTSEL0 0x00000186 251 - #define MSR_P6_EVNTSEL1 0x00000187 252 - 253 249 /* P4/Xeon+ specific */ 254 250 #define MSR_IA32_MCG_EAX 0x00000180 255 251 #define MSR_IA32_MCG_EBX 0x00000181
-1
arch/x86/include/asm/nmi.h
··· 72 72 int lapic_watchdog_init(unsigned nmi_hz); 73 73 int lapic_wd_event(unsigned nmi_hz); 74 74 unsigned lapic_adjust_nmi_hz(unsigned hz); 75 - int lapic_watchdog_ok(void); 76 75 void disable_lapic_nmi_watchdog(void); 77 76 void enable_lapic_nmi_watchdog(void); 78 77 void stop_nmi(void);
+2 -2
arch/x86/kernel/amd_iommu.c
··· 1192 1192 return 0; 1193 1193 } 1194 1194 1195 - struct notifier_block device_nb = { 1195 + static struct notifier_block device_nb = { 1196 1196 .notifier_call = device_change_notifier, 1197 1197 }; 1198 1198 ··· 1763 1763 flag |= __GFP_ZERO; 1764 1764 virt_addr = (void *)__get_free_pages(flag, get_order(size)); 1765 1765 if (!virt_addr) 1766 - return 0; 1766 + return NULL; 1767 1767 1768 1768 paddr = virt_to_phys(virt_addr); 1769 1769
+9 -4
arch/x86/kernel/amd_iommu_init.c
··· 472 472 if (iommu->evt_buf == NULL) 473 473 return NULL; 474 474 475 + iommu->evt_buf_size = EVT_BUFFER_SIZE; 476 + 475 477 return iommu->evt_buf; 476 478 } 477 479 ··· 693 691 694 692 devid = e->devid; 695 693 devid_to = e->ext >> 8; 694 + set_dev_entry_from_acpi(iommu, devid , e->flags, 0); 696 695 set_dev_entry_from_acpi(iommu, devid_to, e->flags, 0); 697 696 amd_iommu_alias_table[devid] = devid_to; 698 697 break; ··· 752 749 753 750 devid = e->devid; 754 751 for (dev_i = devid_start; dev_i <= devid; ++dev_i) { 755 - if (alias) 752 + if (alias) { 756 753 amd_iommu_alias_table[dev_i] = devid_to; 757 - set_dev_entry_from_acpi(iommu, 758 - amd_iommu_alias_table[dev_i], 759 - flags, ext_flags); 754 + set_dev_entry_from_acpi(iommu, 755 + devid_to, flags, ext_flags); 756 + } 757 + set_dev_entry_from_acpi(iommu, dev_i, 758 + flags, ext_flags); 760 759 } 761 760 break; 762 761 default:
-2
arch/x86/kernel/apic/apic.c
··· 140 140 #ifdef CONFIG_X86_X2APIC 141 141 /* x2apic enabled before OS handover */ 142 142 static int x2apic_preenabled; 143 - static int disable_x2apic; 144 143 static __init int setup_nox2apic(char *str) 145 144 { 146 145 if (x2apic_enabled()) { ··· 148 149 return 0; 149 150 } 150 151 151 - disable_x2apic = 1; 152 152 setup_clear_cpu_cap(X86_FEATURE_X2APIC); 153 153 return 0; 154 154 }
+13 -18
arch/x86/kernel/apic/io_apic.c
··· 1716 1716 return; 1717 1717 } 1718 1718 1719 - __apicdebuginit(void) print_APIC_bitfield(int base) 1719 + __apicdebuginit(void) print_APIC_field(int base) 1720 1720 { 1721 - unsigned int v; 1722 - int i, j; 1721 + int i; 1723 1722 1724 1723 if (apic_verbosity == APIC_QUIET) 1725 1724 return; 1726 1725 1727 - printk(KERN_DEBUG "0123456789abcdef0123456789abcdef\n" KERN_DEBUG); 1728 - for (i = 0; i < 8; i++) { 1729 - v = apic_read(base + i*0x10); 1730 - for (j = 0; j < 32; j++) { 1731 - if (v & (1<<j)) 1732 - printk("1"); 1733 - else 1734 - printk("0"); 1735 - } 1736 - printk("\n"); 1737 - } 1726 + printk(KERN_DEBUG); 1727 + 1728 + for (i = 0; i < 8; i++) 1729 + printk(KERN_CONT "%08x", apic_read(base + i*0x10)); 1730 + 1731 + printk(KERN_CONT "\n"); 1738 1732 } 1739 1733 1740 1734 __apicdebuginit(void) print_local_APIC(void *dummy) ··· 1739 1745 if (apic_verbosity == APIC_QUIET) 1740 1746 return; 1741 1747 1742 - printk("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n", 1748 + printk(KERN_DEBUG "\n"); 1749 + printk(KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n", 1743 1750 smp_processor_id(), hard_smp_processor_id()); 1744 1751 v = apic_read(APIC_ID); 1745 1752 printk(KERN_INFO "... APIC ID: %08x (%01x)\n", v, read_apic_id()); ··· 1781 1786 printk(KERN_DEBUG "... APIC SPIV: %08x\n", v); 1782 1787 1783 1788 printk(KERN_DEBUG "... APIC ISR field:\n"); 1784 - print_APIC_bitfield(APIC_ISR); 1789 + print_APIC_field(APIC_ISR); 1785 1790 printk(KERN_DEBUG "... APIC TMR field:\n"); 1786 - print_APIC_bitfield(APIC_TMR); 1791 + print_APIC_field(APIC_TMR); 1787 1792 printk(KERN_DEBUG "... APIC IRR field:\n"); 1788 - print_APIC_bitfield(APIC_IRR); 1793 + print_APIC_field(APIC_IRR); 1789 1794 1790 1795 if (APIC_INTEGRATED(ver)) { /* !82489DX */ 1791 1796 if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
-5
arch/x86/kernel/cpu/perfctr-watchdog.c
··· 803 803 wd_ops->rearm(wd, nmi_hz); 804 804 return 1; 805 805 } 806 - 807 - int lapic_watchdog_ok(void) 808 - { 809 - return wd_ops != NULL; 810 - }
+1 -1
arch/x86/kernel/kvm.c
··· 200 200 state->mode = paravirt_get_lazy_mode(); 201 201 } 202 202 203 - static void paravirt_ops_setup(void) 203 + static void __init paravirt_ops_setup(void) 204 204 { 205 205 pv_info.name = "KVM"; 206 206 pv_info.paravirt_enabled = 1;
+2 -3
arch/x86/lib/clear_page_64.S
··· 5 5 * Zero a page. 6 6 * rdi page 7 7 */ 8 - ALIGN 9 - clear_page_c: 8 + ENTRY(clear_page_c) 10 9 CFI_STARTPROC 11 10 movl $4096/8,%ecx 12 11 xorl %eax,%eax 13 12 rep stosq 14 13 ret 15 14 CFI_ENDPROC 16 - ENDPROC(clear_page) 15 + ENDPROC(clear_page_c) 17 16 18 17 ENTRY(clear_page) 19 18 CFI_STARTPROC
+1
arch/x86/lib/copy_user_64.S
··· 75 75 jae bad_to_user 76 76 ALTERNATIVE_JUMP X86_FEATURE_REP_GOOD,copy_user_generic_unrolled,copy_user_generic_string 77 77 CFI_ENDPROC 78 + ENDPROC(copy_to_user) 78 79 79 80 /* Standard copy_from_user with segment limit checking */ 80 81 ENTRY(copy_from_user)
+1
arch/x86/mm/init.c
··· 12 12 #include <asm/system.h> 13 13 #include <asm/tlbflush.h> 14 14 #include <asm/tlb.h> 15 + #include <asm/proto.h> 15 16 16 17 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 17 18
+2 -2
drivers/xen/events.c
··· 927 927 void __init xen_init_IRQ(void) 928 928 { 929 929 int i; 930 - size_t size = nr_cpu_ids * sizeof(struct cpu_evtchn_s); 931 930 932 - cpu_evtchn_mask_p = alloc_bootmem(size); 931 + cpu_evtchn_mask_p = kcalloc(nr_cpu_ids, sizeof(struct cpu_evtchn_s), 932 + GFP_KERNEL); 933 933 BUG_ON(cpu_evtchn_mask_p == NULL); 934 934 935 935 init_evtchn_cpu_bindings();