]> err.no Git - linux-2.6/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 May 2008 02:31:52 +0000 (19:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 May 2008 02:31:52 +0000 (19:31 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes3: (21 commits)
  x86: numaq fix
  x86: 8K stacks by default
  x86: ioremap ram check fix
  x86: fix HT cpu booting on 32-bit
  x86: optimize inlining off
  x86: CONFIG_X86_ELAN fix
  x86: Kconfig fix
  x86 PAT: fix performance drop for glx, use UC minus for ioremap(), ioremap_nocache() and pci_mmap_page_range()
  x86: use defconfigs from x86/configs/*
  toshiba: use ioremap_cached
  revert: "x86: ioremap(), extend check to all RAM pages"
  x86: don't bother printing compat vdso address
  fix: x86: support for new UV apic
  x86: fix early-BUG message
  x86: iommu_sac_force can become static
  x86: add proper header for reboot_force
  x86 VISWS: build fix
  x86, voyager: fix ioremap_nocache()
  hpet: fix
  x86: unexport kmap_atomic_to_page
  ...

20 files changed:
arch/x86/Kconfig
arch/x86/Kconfig.cpu
arch/x86/Kconfig.debug
arch/x86/kernel/Makefile
arch/x86/kernel/genapic_64.c
arch/x86/kernel/head_32.S
arch/x86/kernel/hpet.c
arch/x86/kernel/pci-dma.c
arch/x86/kernel/reboot.c
arch/x86/mach-voyager/voyager_cat.c
arch/x86/mm/highmem_32.c
arch/x86/mm/ioremap.c
arch/x86/mm/pageattr.c
arch/x86/pci/Makefile_32
arch/x86/pci/i386.c
arch/x86/vdso/vdso32-setup.c
drivers/char/toshiba.c
include/asm-x86/mach-default/mach_apic.h
include/asm-x86/processor.h
include/asm-x86/proto.h

index f70e3e3a9fa78ca0649adccf695ad8df40ade0e3..c3f880902d66555afd6e079292f23ec009126f34 100644 (file)
@@ -25,6 +25,18 @@ config X86
        select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
        select HAVE_ARCH_KGDB if !X86_VOYAGER
 
+config DEFCONFIG_LIST
+       string
+       depends on X86_32
+       option defconfig_list
+       default "arch/x86/configs/i386_defconfig"
+
+config DEFCONFIG_LIST
+       string
+       depends on X86_64
+       option defconfig_list
+       default "arch/x86/configs/x86_64_defconfig"
+
 
 config GENERIC_LOCKBREAK
        def_bool n
@@ -180,7 +192,7 @@ config X86_HT
 
 config X86_BIOS_REBOOT
        bool
-       depends on X86_32 && !(X86_VISWS || X86_VOYAGER)
+       depends on !X86_VISWS && !X86_VOYAGER
        default y
 
 config X86_TRAMPOLINE
@@ -1161,7 +1173,7 @@ source kernel/Kconfig.hz
 
 config KEXEC
        bool "kexec system call"
-       depends on X86_64 || X86_BIOS_REBOOT
+       depends on X86_BIOS_REBOOT
        help
          kexec is a system call that implements the ability to shutdown your
          current kernel, and to start another kernel.  It is like a reboot
index 7ef18b01f0bca49c4da9ed1ed78b330ab1506da4..2ad6301849a1ba68ec78c9ea3c5f39232484c645 100644 (file)
@@ -278,11 +278,6 @@ config GENERIC_CPU
 
 endchoice
 
-config X86_CPU
-       def_bool y
-       select GENERIC_FIND_FIRST_BIT
-       select GENERIC_FIND_NEXT_BIT
-
 config X86_GENERIC
        bool "Generic x86 support"
        depends on X86_32
@@ -297,6 +292,11 @@ config X86_GENERIC
 
 endif
 
+config X86_CPU
+       def_bool y
+       select GENERIC_FIND_FIRST_BIT
+       select GENERIC_FIND_NEXT_BIT
+
 #
 # Define implied options from the CPU selection here
 config X86_L1_CACHE_BYTES
index 5b1979a45a1ea07f6ffc8d6b563fc1ddcb64dae3..5fc8d0b3191da4d1b79c32a5ed127bb994b27b0c 100644 (file)
@@ -118,7 +118,6 @@ config DEBUG_NX_TEST
 config 4KSTACKS
        bool "Use 4Kb for kernel stacks instead of 8Kb"
        depends on X86_32
-       default y
        help
          If you say Y here the kernel will use a 4Kb stacksize for the
          kernel stack attached to each process/thread. This facilitates
@@ -256,11 +255,8 @@ config CPA_DEBUG
        help
          Do change_page_attr() self-tests every 30 seconds.
 
-endmenu
-
 config OPTIMIZE_INLINING
        bool "Allow gcc to uninline functions marked 'inline'"
-       default y
        help
          This option determines if the kernel forces gcc to inline the functions
          developers have marked 'inline'. Doing so takes away freedom from gcc to
@@ -270,3 +266,6 @@ config OPTIMIZE_INLINING
          this algorithm is so good that allowing gcc4 to make the decision can
          become the default in the future, until then this option is there to
          test gcc for this.
+
+endmenu
+
index 30d54ed27e558cb1d3725f38c411e820b7fe5073..bbdacb398d48e05a05c17f23af0d2b650751d912 100644 (file)
@@ -40,7 +40,6 @@ obj-$(CONFIG_STACKTRACE)      += stacktrace.o
 obj-y                          += cpu/
 obj-y                          += acpi/
 obj-$(CONFIG_X86_BIOS_REBOOT)  += reboot.o
-obj-$(CONFIG_X86_64)           += reboot.o
 obj-$(CONFIG_MCA)              += mca_32.o
 obj-$(CONFIG_X86_MSR)          += msr.o
 obj-$(CONFIG_X86_CPUID)                += cpuid.o
index 021624c835832d81f00f1ed6ef5d5437e9303813..cbaaf69bedb29c92055e2272a12efba7f49f9ee1 100644 (file)
@@ -83,7 +83,7 @@ unsigned int read_apic_id(void)
 {
        unsigned int id;
 
-       WARN_ON(preemptible());
+       WARN_ON(preemptible() && num_online_cpus() > 1);
        id = apic_read(APIC_ID);
        if (uv_system_type >= UV_X2APIC)
                id  |= __get_cpu_var(x2apic_extra_bits);
index 90f038af3adc326725cbdec61825e1b31f340ebb..b2cc73768a9daaa5f6e568bd4977f6fea7889d87 100644 (file)
@@ -656,15 +656,16 @@ int_msg:
        .asciz "Unknown interrupt or fault at EIP %p %p %p\n"
 
 fault_msg:
-       .asciz                                                          \
-/* fault info: */      "BUG: Int %d: CR2 %p\n"                         \
-/* pusha regs: */      "     EDI %p  ESI %p  EBP %p  ESP %p\n"         \
-                       "     EBX %p  EDX %p  ECX %p  EAX %p\n"         \
-/* fault frame: */     "     err %p  EIP %p   CS %p  flg %p\n"         \
-                                                                       \
-                       "Stack: %p %p %p %p %p %p %p %p\n"              \
-                       "       %p %p %p %p %p %p %p %p\n"              \
-                       "       %p %p %p %p %p %p %p %p\n"
+/* fault info: */
+       .ascii "BUG: Int %d: CR2 %p\n"
+/* pusha regs: */
+       .ascii "     EDI %p  ESI %p  EBP %p  ESP %p\n"
+       .ascii "     EBX %p  EDX %p  ECX %p  EAX %p\n"
+/* fault frame: */
+       .ascii "     err %p  EIP %p   CS %p  flg %p\n"
+       .ascii "Stack: %p %p %p %p %p %p %p %p\n"
+       .ascii "       %p %p %p %p %p %p %p %p\n"
+       .asciz "       %p %p %p %p %p %p %p %p\n"
 
 #include "../../x86/xen/xen-head.S"
 
index 9007f9ea64eed80e9537be44d391fe55d6f7f749..9b5cfcdfc426cc194365020c061c6c0b46e54083 100644 (file)
@@ -137,9 +137,10 @@ static void hpet_reserve_platform_timers(unsigned long id)
        hd.hd_irq[0] = HPET_LEGACY_8254;
        hd.hd_irq[1] = HPET_LEGACY_RTC;
 
-       for (i = 2; i < nrtimers; timer++, i++)
-               hd.hd_irq[i] = (timer->hpet_config & Tn_INT_ROUTE_CNF_MASK) >>
+       for (i = 2; i < nrtimers; timer++, i++) {
+               hd.hd_irq[i] = (readl(&timer->hpet_config) & Tn_INT_ROUTE_CNF_MASK) >>
                        Tn_INT_ROUTE_CNF_SHIFT;
+       }
 
        hpet_alloc(&hd);
 
index 388b113a7d88ffbc0efaf52c348412af9e439a8c..0c37f16b69502e1fe31f4e94c80775dc1fd22060 100644 (file)
@@ -14,7 +14,7 @@ EXPORT_SYMBOL(forbid_dac);
 const struct dma_mapping_ops *dma_ops;
 EXPORT_SYMBOL(dma_ops);
 
-int iommu_sac_force __read_mostly = 0;
+static int iommu_sac_force __read_mostly;
 
 #ifdef CONFIG_IOMMU_DEBUG
 int panic_on_overflow __read_mostly = 1;
index a4a838306b2cc69f2856f1b8244b6045c86165c9..07c6d42ab5ff326203f417c1b8ccbc9ae1fc5dac 100644 (file)
@@ -9,6 +9,7 @@
 #include <asm/desc.h>
 #include <asm/hpet.h>
 #include <asm/pgtable.h>
+#include <asm/proto.h>
 #include <asm/reboot_fixups.h>
 #include <asm/reboot.h>
 
index ecab9fff0fd17579b43d550f8bae2e5eea98f22b..2ad598c104af77d398e59a1e6d4edc04ed91ea53 100644 (file)
@@ -877,7 +877,7 @@ void __init voyager_cat_init(void)
                        request_resource(&iomem_resource, res);
                }
 
-               qic_addr = (unsigned long)ioremap(qic_addr, 0x400);
+               qic_addr = (unsigned long)ioremap_cache(qic_addr, 0x400);
 
                for (j = 0; j < 4; j++) {
                        __u8 cpu;
index 9cf33d3ee5bc7ee0d10fbc4b0ce9c9fc04697ee8..165c871ba9af0211e0c939e0bc2212750d4bf39f 100644 (file)
@@ -155,4 +155,3 @@ EXPORT_SYMBOL(kmap);
 EXPORT_SYMBOL(kunmap);
 EXPORT_SYMBOL(kmap_atomic);
 EXPORT_SYMBOL(kunmap_atomic);
-EXPORT_SYMBOL(kmap_atomic_to_page);
index 804de18abcc2b47e7cf4e880a9b23ee159091061..71bb3159031afba912c9a60cad9f4510a3074ff3 100644 (file)
@@ -149,7 +149,8 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
         * Don't allow anybody to remap normal RAM that we're using..
         */
        for (pfn = phys_addr >> PAGE_SHIFT;
-                               (pfn << PAGE_SHIFT) < last_addr; pfn++) {
+                               (pfn << PAGE_SHIFT) < (last_addr & PAGE_MASK);
+                               pfn++) {
 
                int is_ram = page_is_ram(pfn);
 
@@ -176,11 +177,11 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
                /*
                 * Do not fallback to certain memory types with certain
                 * requested type:
-                * - request is uncached, return cannot be write-back
-                * - request is uncached, return cannot be write-combine
+                * - request is uc-, return cannot be write-back
+                * - request is uc-, return cannot be write-combine
                 * - request is write-combine, return cannot be write-back
                 */
-               if ((prot_val == _PAGE_CACHE_UC &&
+               if ((prot_val == _PAGE_CACHE_UC_MINUS &&
                     (new_prot_val == _PAGE_CACHE_WB ||
                      new_prot_val == _PAGE_CACHE_WC)) ||
                    (prot_val == _PAGE_CACHE_WC &&
@@ -201,6 +202,9 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
        default:
                prot = PAGE_KERNEL_NOCACHE;
                break;
+       case _PAGE_CACHE_UC_MINUS:
+               prot = PAGE_KERNEL_UC_MINUS;
+               break;
        case _PAGE_CACHE_WC:
                prot = PAGE_KERNEL_WC;
                break;
@@ -255,7 +259,16 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
  */
 void __iomem *ioremap_nocache(resource_size_t phys_addr, unsigned long size)
 {
-       return __ioremap_caller(phys_addr, size, _PAGE_CACHE_UC,
+       /*
+        * Ideally, this should be:
+        *      pat_wc_enabled ? _PAGE_CACHE_UC : _PAGE_CACHE_UC_MINUS;
+        *
+        * Till we fix all X drivers to use ioremap_wc(), we will use
+        * UC MINUS.
+        */
+       unsigned long val = _PAGE_CACHE_UC_MINUS;
+
+       return __ioremap_caller(phys_addr, size, val,
                                __builtin_return_address(0));
 }
 EXPORT_SYMBOL(ioremap_nocache);
index bd5e05c654dccfb33d368718e4b7acdbdd16d5d0..60bcb5b6a37ef0130fb08da8ef38db58fd37910a 100644 (file)
@@ -777,14 +777,20 @@ static inline int change_page_attr_clear(unsigned long addr, int numpages,
 
 int _set_memory_uc(unsigned long addr, int numpages)
 {
+       /*
+        * for now UC MINUS. see comments in ioremap_nocache()
+        */
        return change_page_attr_set(addr, numpages,
-                                   __pgprot(_PAGE_CACHE_UC));
+                                   __pgprot(_PAGE_CACHE_UC_MINUS));
 }
 
 int set_memory_uc(unsigned long addr, int numpages)
 {
+       /*
+        * for now UC MINUS. see comments in ioremap_nocache()
+        */
        if (reserve_memtype(addr, addr + numpages * PAGE_SIZE,
-                           _PAGE_CACHE_UC, NULL))
+                           _PAGE_CACHE_UC_MINUS, NULL))
                return -EINVAL;
 
        return _set_memory_uc(addr, numpages);
index 2a1516efb5426dcb79f6b77283e2aeb813811711..7fa519868d7091d4dd0b64fbb880c68517428f99 100644 (file)
@@ -9,8 +9,8 @@ pci-y                           := fixup.o
 pci-$(CONFIG_ACPI)             += acpi.o
 pci-y                          += legacy.o irq.o
 
-pci-$(CONFIG_X86_VISWS)                := visws.o fixup.o
-pci-$(CONFIG_X86_NUMAQ)                := numa.o irq.o
+pci-$(CONFIG_X86_VISWS)                += visws.o fixup.o
+pci-$(CONFIG_X86_NUMAQ)                += numa.o irq.o
 pci-$(CONFIG_NUMA)             += mp_bus_to_node.o
 
 obj-y                          += $(pci-y) common.o early.o
index 94f6c73a53d0aae6ac048668ea6b06a0a1f370d0..8af0f0bae2af45f0baca08051056946235db7d1e 100644 (file)
@@ -301,6 +301,13 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
        prot = pgprot_val(vma->vm_page_prot);
        if (pat_wc_enabled && write_combine)
                prot |= _PAGE_CACHE_WC;
+       else if (pat_wc_enabled)
+               /*
+                * ioremap() and ioremap_nocache() defaults to UC MINUS for now.
+                * To avoid attribute conflicts, request UC MINUS here
+                * aswell.
+                */
+               prot |= _PAGE_CACHE_UC_MINUS;
        else if (boot_cpu_data.x86 > 3)
                prot |= _PAGE_CACHE_UC;
 
@@ -319,9 +326,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
                 * - request is uncached, return cannot be write-combine
                 * - request is write-combine, return cannot be write-back
                 */
-               if ((flags == _PAGE_CACHE_UC &&
-                    (new_flags == _PAGE_CACHE_WB ||
-                     new_flags == _PAGE_CACHE_WC)) ||
+               if ((flags == _PAGE_CACHE_UC_MINUS &&
+                    (new_flags == _PAGE_CACHE_WB)) ||
                    (flags == _PAGE_CACHE_WC &&
                     new_flags == _PAGE_CACHE_WB)) {
                        free_memtype(addr, addr+len);
index e2af8eee80e35b2915c461b469be6c0a4eb0f804..4dceeb1fc5e0f229305c983d39c8cf6497b5a409 100644 (file)
@@ -303,8 +303,6 @@ int __init sysenter_setup(void)
 
 #ifdef CONFIG_X86_32
        gate_vma_init();
-
-       printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO));
 #endif
 
        if (!vdso32_sysenter()) {
index 64f1ceed0b2cbb3d4f72b8faad3a8459821f3ad0..663cd15d7c78fa5a0cbd548179f61b352ba53e38 100644 (file)
@@ -426,7 +426,7 @@ static int tosh_probe(void)
        int i,major,minor,day,year,month,flag;
        unsigned char signature[7] = { 0x54,0x4f,0x53,0x48,0x49,0x42,0x41 };
        SMMRegisters regs;
-       void __iomem *bios = ioremap(0xf0000, 0x10000);
+       void __iomem *bios = ioremap_cache(0xf0000, 0x10000);
 
        if (!bios)
                return -ENOMEM;
index 0a6634f62abe2c1c37d91d078846cdeef51f15c3..21003b56ae959e0db51ebd1ac689ccb83ecbda37 100644 (file)
@@ -109,13 +109,8 @@ static inline int cpu_to_logical_apicid(int cpu)
 
 static inline int cpu_present_to_apicid(int mps_cpu)
 {
-#ifdef CONFIG_X86_64
-       if (cpu_present(mps_cpu))
+       if (mps_cpu < NR_CPUS && cpu_present(mps_cpu))
                return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
-#else
-       if (mps_cpu < get_physical_broadcast())
-               return  mps_cpu;
-#endif
        else
                return BAD_APICID;
 }
index 2e7974ec77eca6e94b2ee503d02580a87db717a2..559105220a477e2be9cfbd87eee62d1cd68767c2 100644 (file)
@@ -3,9 +3,6 @@
 
 #include <asm/processor-flags.h>
 
-/* migration helper, for KVM - will be removed in 2.6.25: */
-#define Xgt_desc_struct        desc_ptr
-
 /* Forward declaration, a strange C thing */
 struct task_struct;
 struct mm_struct;
index 1e17bcce450e0ffcb47dbea2939c7366f769f29f..6c8b41b03f6def5593696d12752c3627028e10b3 100644 (file)
@@ -20,7 +20,11 @@ extern void syscall32_cpu_init(void);
 
 extern void check_efer(void);
 
+#ifdef CONFIG_X86_BIOS_REBOOT
 extern int reboot_force;
+#else
+static const int reboot_force = 0;
+#endif
 
 long do_arch_prctl(struct task_struct *task, int code, unsigned long addr);