提交 958a2f29 编写于 作者: L Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes3

* '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
  ...
...@@ -25,6 +25,18 @@ config X86 ...@@ -25,6 +25,18 @@ config X86
select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
select HAVE_ARCH_KGDB if !X86_VOYAGER 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 config GENERIC_LOCKBREAK
def_bool n def_bool n
...@@ -180,7 +192,7 @@ config X86_HT ...@@ -180,7 +192,7 @@ config X86_HT
config X86_BIOS_REBOOT config X86_BIOS_REBOOT
bool bool
depends on X86_32 && !(X86_VISWS || X86_VOYAGER) depends on !X86_VISWS && !X86_VOYAGER
default y default y
config X86_TRAMPOLINE config X86_TRAMPOLINE
...@@ -1161,7 +1173,7 @@ source kernel/Kconfig.hz ...@@ -1161,7 +1173,7 @@ source kernel/Kconfig.hz
config KEXEC config KEXEC
bool "kexec system call" bool "kexec system call"
depends on X86_64 || X86_BIOS_REBOOT depends on X86_BIOS_REBOOT
help help
kexec is a system call that implements the ability to shutdown your kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel. It is like a reboot current kernel, and to start another kernel. It is like a reboot
......
...@@ -278,11 +278,6 @@ config GENERIC_CPU ...@@ -278,11 +278,6 @@ config GENERIC_CPU
endchoice endchoice
config X86_CPU
def_bool y
select GENERIC_FIND_FIRST_BIT
select GENERIC_FIND_NEXT_BIT
config X86_GENERIC config X86_GENERIC
bool "Generic x86 support" bool "Generic x86 support"
depends on X86_32 depends on X86_32
...@@ -297,6 +292,11 @@ config X86_GENERIC ...@@ -297,6 +292,11 @@ config X86_GENERIC
endif 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 # Define implied options from the CPU selection here
config X86_L1_CACHE_BYTES config X86_L1_CACHE_BYTES
......
...@@ -118,7 +118,6 @@ config DEBUG_NX_TEST ...@@ -118,7 +118,6 @@ config DEBUG_NX_TEST
config 4KSTACKS config 4KSTACKS
bool "Use 4Kb for kernel stacks instead of 8Kb" bool "Use 4Kb for kernel stacks instead of 8Kb"
depends on X86_32 depends on X86_32
default y
help help
If you say Y here the kernel will use a 4Kb stacksize for the If you say Y here the kernel will use a 4Kb stacksize for the
kernel stack attached to each process/thread. This facilitates kernel stack attached to each process/thread. This facilitates
...@@ -256,11 +255,8 @@ config CPA_DEBUG ...@@ -256,11 +255,8 @@ config CPA_DEBUG
help help
Do change_page_attr() self-tests every 30 seconds. Do change_page_attr() self-tests every 30 seconds.
endmenu
config OPTIMIZE_INLINING config OPTIMIZE_INLINING
bool "Allow gcc to uninline functions marked 'inline'" bool "Allow gcc to uninline functions marked 'inline'"
default y
help help
This option determines if the kernel forces gcc to inline the functions This option determines if the kernel forces gcc to inline the functions
developers have marked 'inline'. Doing so takes away freedom from gcc to developers have marked 'inline'. Doing so takes away freedom from gcc to
...@@ -270,3 +266,6 @@ config OPTIMIZE_INLINING ...@@ -270,3 +266,6 @@ config OPTIMIZE_INLINING
this algorithm is so good that allowing gcc4 to make the decision can 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 become the default in the future, until then this option is there to
test gcc for this. test gcc for this.
endmenu
...@@ -40,7 +40,6 @@ obj-$(CONFIG_STACKTRACE) += stacktrace.o ...@@ -40,7 +40,6 @@ obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-y += cpu/ obj-y += cpu/
obj-y += acpi/ obj-y += acpi/
obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o
obj-$(CONFIG_X86_64) += reboot.o
obj-$(CONFIG_MCA) += mca_32.o obj-$(CONFIG_MCA) += mca_32.o
obj-$(CONFIG_X86_MSR) += msr.o obj-$(CONFIG_X86_MSR) += msr.o
obj-$(CONFIG_X86_CPUID) += cpuid.o obj-$(CONFIG_X86_CPUID) += cpuid.o
......
...@@ -83,7 +83,7 @@ unsigned int read_apic_id(void) ...@@ -83,7 +83,7 @@ unsigned int read_apic_id(void)
{ {
unsigned int id; unsigned int id;
WARN_ON(preemptible()); WARN_ON(preemptible() && num_online_cpus() > 1);
id = apic_read(APIC_ID); id = apic_read(APIC_ID);
if (uv_system_type >= UV_X2APIC) if (uv_system_type >= UV_X2APIC)
id |= __get_cpu_var(x2apic_extra_bits); id |= __get_cpu_var(x2apic_extra_bits);
......
...@@ -656,15 +656,16 @@ int_msg: ...@@ -656,15 +656,16 @@ int_msg:
.asciz "Unknown interrupt or fault at EIP %p %p %p\n" .asciz "Unknown interrupt or fault at EIP %p %p %p\n"
fault_msg: fault_msg:
.asciz \ /* fault info: */
/* fault info: */ "BUG: Int %d: CR2 %p\n" \ .ascii "BUG: Int %d: CR2 %p\n"
/* pusha regs: */ " EDI %p ESI %p EBP %p ESP %p\n" \ /* pusha regs: */
" EBX %p EDX %p ECX %p EAX %p\n" \ .ascii " EDI %p ESI %p EBP %p ESP %p\n"
/* fault frame: */ " err %p EIP %p CS %p flg %p\n" \ .ascii " EBX %p EDX %p ECX %p EAX %p\n"
\ /* fault frame: */
"Stack: %p %p %p %p %p %p %p %p\n" \ .ascii " err %p EIP %p CS %p flg %p\n"
" %p %p %p %p %p %p %p %p\n" \ .ascii "Stack: %p %p %p %p %p %p %p %p\n"
" %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" #include "../../x86/xen/xen-head.S"
......
...@@ -137,9 +137,10 @@ static void hpet_reserve_platform_timers(unsigned long id) ...@@ -137,9 +137,10 @@ static void hpet_reserve_platform_timers(unsigned long id)
hd.hd_irq[0] = HPET_LEGACY_8254; hd.hd_irq[0] = HPET_LEGACY_8254;
hd.hd_irq[1] = HPET_LEGACY_RTC; hd.hd_irq[1] = HPET_LEGACY_RTC;
for (i = 2; i < nrtimers; timer++, i++) for (i = 2; i < nrtimers; timer++, i++) {
hd.hd_irq[i] = (timer->hpet_config & Tn_INT_ROUTE_CNF_MASK) >> hd.hd_irq[i] = (readl(&timer->hpet_config) & Tn_INT_ROUTE_CNF_MASK) >>
Tn_INT_ROUTE_CNF_SHIFT; Tn_INT_ROUTE_CNF_SHIFT;
}
hpet_alloc(&hd); hpet_alloc(&hd);
......
...@@ -14,7 +14,7 @@ EXPORT_SYMBOL(forbid_dac); ...@@ -14,7 +14,7 @@ EXPORT_SYMBOL(forbid_dac);
const struct dma_mapping_ops *dma_ops; const struct dma_mapping_ops *dma_ops;
EXPORT_SYMBOL(dma_ops); EXPORT_SYMBOL(dma_ops);
int iommu_sac_force __read_mostly = 0; static int iommu_sac_force __read_mostly;
#ifdef CONFIG_IOMMU_DEBUG #ifdef CONFIG_IOMMU_DEBUG
int panic_on_overflow __read_mostly = 1; int panic_on_overflow __read_mostly = 1;
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <asm/desc.h> #include <asm/desc.h>
#include <asm/hpet.h> #include <asm/hpet.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/proto.h>
#include <asm/reboot_fixups.h> #include <asm/reboot_fixups.h>
#include <asm/reboot.h> #include <asm/reboot.h>
......
...@@ -877,7 +877,7 @@ void __init voyager_cat_init(void) ...@@ -877,7 +877,7 @@ void __init voyager_cat_init(void)
request_resource(&iomem_resource, res); 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++) { for (j = 0; j < 4; j++) {
__u8 cpu; __u8 cpu;
......
...@@ -155,4 +155,3 @@ EXPORT_SYMBOL(kmap); ...@@ -155,4 +155,3 @@ EXPORT_SYMBOL(kmap);
EXPORT_SYMBOL(kunmap); EXPORT_SYMBOL(kunmap);
EXPORT_SYMBOL(kmap_atomic); EXPORT_SYMBOL(kmap_atomic);
EXPORT_SYMBOL(kunmap_atomic); EXPORT_SYMBOL(kunmap_atomic);
EXPORT_SYMBOL(kmap_atomic_to_page);
...@@ -149,7 +149,8 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr, ...@@ -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.. * Don't allow anybody to remap normal RAM that we're using..
*/ */
for (pfn = phys_addr >> PAGE_SHIFT; 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); int is_ram = page_is_ram(pfn);
...@@ -176,11 +177,11 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr, ...@@ -176,11 +177,11 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
/* /*
* Do not fallback to certain memory types with certain * Do not fallback to certain memory types with certain
* requested type: * requested type:
* - request is uncached, return cannot be write-back * - request is uc-, return cannot be write-back
* - request is uncached, return cannot be write-combine * - request is uc-, return cannot be write-combine
* - request is write-combine, return cannot be write-back * - 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_WB ||
new_prot_val == _PAGE_CACHE_WC)) || new_prot_val == _PAGE_CACHE_WC)) ||
(prot_val == _PAGE_CACHE_WC && (prot_val == _PAGE_CACHE_WC &&
...@@ -201,6 +202,9 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr, ...@@ -201,6 +202,9 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
default: default:
prot = PAGE_KERNEL_NOCACHE; prot = PAGE_KERNEL_NOCACHE;
break; break;
case _PAGE_CACHE_UC_MINUS:
prot = PAGE_KERNEL_UC_MINUS;
break;
case _PAGE_CACHE_WC: case _PAGE_CACHE_WC:
prot = PAGE_KERNEL_WC; prot = PAGE_KERNEL_WC;
break; break;
...@@ -255,7 +259,16 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr, ...@@ -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) 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)); __builtin_return_address(0));
} }
EXPORT_SYMBOL(ioremap_nocache); EXPORT_SYMBOL(ioremap_nocache);
......
...@@ -777,14 +777,20 @@ static inline int change_page_attr_clear(unsigned long addr, int numpages, ...@@ -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) 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, 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) 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, if (reserve_memtype(addr, addr + numpages * PAGE_SIZE,
_PAGE_CACHE_UC, NULL)) _PAGE_CACHE_UC_MINUS, NULL))
return -EINVAL; return -EINVAL;
return _set_memory_uc(addr, numpages); return _set_memory_uc(addr, numpages);
......
...@@ -9,8 +9,8 @@ pci-y := fixup.o ...@@ -9,8 +9,8 @@ pci-y := fixup.o
pci-$(CONFIG_ACPI) += acpi.o pci-$(CONFIG_ACPI) += acpi.o
pci-y += legacy.o irq.o pci-y += legacy.o irq.o
pci-$(CONFIG_X86_VISWS) := visws.o fixup.o pci-$(CONFIG_X86_VISWS) += visws.o fixup.o
pci-$(CONFIG_X86_NUMAQ) := numa.o irq.o pci-$(CONFIG_X86_NUMAQ) += numa.o irq.o
pci-$(CONFIG_NUMA) += mp_bus_to_node.o pci-$(CONFIG_NUMA) += mp_bus_to_node.o
obj-y += $(pci-y) common.o early.o obj-y += $(pci-y) common.o early.o
...@@ -301,6 +301,13 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, ...@@ -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); prot = pgprot_val(vma->vm_page_prot);
if (pat_wc_enabled && write_combine) if (pat_wc_enabled && write_combine)
prot |= _PAGE_CACHE_WC; 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) else if (boot_cpu_data.x86 > 3)
prot |= _PAGE_CACHE_UC; prot |= _PAGE_CACHE_UC;
...@@ -319,9 +326,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, ...@@ -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 uncached, return cannot be write-combine
* - request is write-combine, return cannot be write-back * - request is write-combine, return cannot be write-back
*/ */
if ((flags == _PAGE_CACHE_UC && if ((flags == _PAGE_CACHE_UC_MINUS &&
(new_flags == _PAGE_CACHE_WB || (new_flags == _PAGE_CACHE_WB)) ||
new_flags == _PAGE_CACHE_WC)) ||
(flags == _PAGE_CACHE_WC && (flags == _PAGE_CACHE_WC &&
new_flags == _PAGE_CACHE_WB)) { new_flags == _PAGE_CACHE_WB)) {
free_memtype(addr, addr+len); free_memtype(addr, addr+len);
......
...@@ -303,8 +303,6 @@ int __init sysenter_setup(void) ...@@ -303,8 +303,6 @@ int __init sysenter_setup(void)
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
gate_vma_init(); gate_vma_init();
printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO));
#endif #endif
if (!vdso32_sysenter()) { if (!vdso32_sysenter()) {
......
...@@ -426,7 +426,7 @@ static int tosh_probe(void) ...@@ -426,7 +426,7 @@ static int tosh_probe(void)
int i,major,minor,day,year,month,flag; int i,major,minor,day,year,month,flag;
unsigned char signature[7] = { 0x54,0x4f,0x53,0x48,0x49,0x42,0x41 }; unsigned char signature[7] = { 0x54,0x4f,0x53,0x48,0x49,0x42,0x41 };
SMMRegisters regs; SMMRegisters regs;
void __iomem *bios = ioremap(0xf0000, 0x10000); void __iomem *bios = ioremap_cache(0xf0000, 0x10000);
if (!bios) if (!bios)
return -ENOMEM; return -ENOMEM;
......
...@@ -109,13 +109,8 @@ static inline int cpu_to_logical_apicid(int cpu) ...@@ -109,13 +109,8 @@ static inline int cpu_to_logical_apicid(int cpu)
static inline int cpu_present_to_apicid(int mps_cpu) static inline int cpu_present_to_apicid(int mps_cpu)
{ {
#ifdef CONFIG_X86_64 if (mps_cpu < NR_CPUS && cpu_present(mps_cpu))
if (cpu_present(mps_cpu))
return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu);
#else
if (mps_cpu < get_physical_broadcast())
return mps_cpu;
#endif
else else
return BAD_APICID; return BAD_APICID;
} }
......
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
#include <asm/processor-flags.h> #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 */ /* Forward declaration, a strange C thing */
struct task_struct; struct task_struct;
struct mm_struct; struct mm_struct;
......
...@@ -20,7 +20,11 @@ extern void syscall32_cpu_init(void); ...@@ -20,7 +20,11 @@ extern void syscall32_cpu_init(void);
extern void check_efer(void); extern void check_efer(void);
#ifdef CONFIG_X86_BIOS_REBOOT
extern int reboot_force; 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); long do_arch_prctl(struct task_struct *task, int code, unsigned long addr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册