x86 fixes
Subsystems (3)
Linus,
Please pull the latest x86-fixes-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus
( An item that might look a bit out of place is the old-binutils
compatibility fix to the linker script. It's a tad large IMO, but pretty much unavoidable and the revert to .30 would be huge. I left it last, easy to re-route, in case you think we should do this differently. )
Thanks,
Ingo
------------------>
Amerigo Wang (1):
x86: Fix an incorrect argument of reserve_bootmem()
Jan Beulich (3):
i386: Fix section mismatches for init code with !HOTPLUG_CPU
x86: add vmlinux.lds to targets in arch/x86/boot/compressed/Makefile
x86: Fix build with older binutils and consolidate linker script
Jeremy Fitzhardinge (2):
x86: make sure load_percpu_segment has no stackprotector
xen: rearrange things to fix stackprotector
Suresh Siddha (1):
x86, pat: Allow ISA memory range uncacheable mapping requests
arch/x86/boot/compressed/Makefile | 2 +- arch/x86/include/asm/pgtable.h | 12 +++- arch/x86/kernel/cpu/Makefile | 4 + arch/x86/kernel/head_32.S | 8 +-- arch/x86/kernel/vmlinux.lds.S | 126 ++++++++++++++----------------------- arch/x86/mm/init_64.c | 2 +- arch/x86/mm/pat.c | 3 +- arch/x86/xen/Makefile | 4 + arch/x86/xen/enlighten.c | 22 +++---- 9 files changed, 80 insertions(+), 103 deletions(-)
arch/x86/boot/compressed/Makefile +1 -1
@@ -4,7 +4,7 @@ # create a compressed vmlinux image from the original vmlinux # -targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o +targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma head_$(BITS).o misc.o piggy.o KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2 KBUILD_CFLAGS += -fno-strict-aliasing -fPIC
arch/x86/include/asm/pgtable.h +10 -2
@@ -2,6 +2,7 @@#define _ASM_X86_PGTABLE_H#include <asm/page.h> +#include <asm/e820.h> #include <asm/pgtable_types.h>
@@ -269,10 +270,17 @@ static inline pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot)#define canon_pgprot (p) __pgprot(massage_pgprot(p)) -static inline int is_new_memtype_allowed (unsigned long flags, -unsigned long new_flags) +static inline int is_new_memtype_allowed (u64 paddr,unsigned long size, +unsigned long flags, +unsigned long new_flags) {/* +* PAT type is always WB for ISA. So no need to check. +*/ +if (is_ISA_range (paddr, paddr + size -1 )) +return 1 ; + +/* * Certain new memtypes are not allowed with certain * requested memtype: * - request is uncached, return cannot be write-back
arch/x86/kernel/cpu/Makefile +4 -0
@@ -7,6 +7,10 @@ ifdef CONFIG_FUNCTION_TRACER CFLAGS_REMOVE_common.o = -pg endif +# Make sure load_percpu_segment has no stackprotector +nostackp := $(call cc-option, -fno-stack-protector) +CFLAGS_common.o := $(nostackp) + obj-y := intel_cacheinfo.o addon_cpuid_features.o obj-y += proc.o capflags.o powerflags.o common.o obj-y += vmware.o hypervisor.o
arch/x86/kernel/head_32.S +1 -7
@@ -261,9 +261,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20); * which will be freed later */ -#ifndef CONFIG_HOTPLUG_CPU -.section .init.text,"ax",@progbits -#endif +__CPUINIT #ifdef CONFIG_SMP ENTRY(startup_32_smp)
@@ -602,11 +600,7 @@ ignore_int: #endif iret -#ifndef CONFIG_HOTPLUG_CPU - __CPUINITDATA -#else __REFDATA -#endif .align 4 ENTRY(initial_code) .long i386_start_kernel
arch/x86/kernel/vmlinux.lds.S +47 -79
190 lines not on this page · raw message
arch/x86/mm/init_64.c +1 -1
@@ -796,7 +796,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,return ret;#else -reserve_bootmem (phys, len,BOOTMEM_DEFAULT ); +reserve_bootmem (phys, len, flags);#endif if (phys+len <=MAX_DMA_PFN *PAGE_SIZE ) {
arch/x86/mm/pat.c +2 -1
@@ -623,7 +623,8 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot,return ret;if (flags != want_flags) { -if (strict_prot || !is_new_memtype_allowed (want_flags, flags)) { +if (strict_prot || + !is_new_memtype_allowed (paddr, size, want_flags, flags)) {free_memtype (paddr, paddr + size); printk(KERN_ERR "%s:%d map pfn expected mapping type %s" " for %Lx-%Lx, got %s\n",
arch/x86/xen/Makefile +4 -0
@@ -5,6 +5,10 @@ CFLAGS_REMOVE_time.o = -pg CFLAGS_REMOVE_irq.o = -pg endif +# Make sure early boot has no stackprotector +nostackp := $(call cc-option, -fno-stack-protector) +CFLAGS_enlighten.o := $(nostackp) + obj-y := enlighten.o setup.o multicalls.o mmu.o irq.o \ time.o xen-asm.o xen-asm_$(BITS).o \ grant-table.o suspend.o
arch/x86/xen/enlighten.c +10 -12
@@ -974,10 +974,6 @@ asmlinkage void __init xen_start_kernel(void) xen_domain_type =XEN_PV_DOMAIN ; -BUG_ON (memcmp (xen_start_info->magic,"xen-3" ,5 ) !=0 ); - -xen_setup_features (); -/* Install Xen paravirt ops */ pv_info = xen_info; pv_init_ops = xen_init_ops;
@@ -986,8 +982,15 @@ asmlinkage void __init xen_start_kernel(void) pv_apic_ops = xen_apic_ops; pv_mmu_ops = xen_mmu_ops; -xen_init_irq_ops (); +#ifdef CONFIG_X86_64 +/* +* Setup percpu state. We only need to do this for 64-bit +* because 32-bit already has %fs set properly. +*/ +load_percpu_segment (0 ); +#endif +xen_init_irq_ops ();xen_init_cpuid_mask ();#ifdef CONFIG_X86_LOCAL_APIC
@@ -997,6 +1000,8 @@ asmlinkage void __init xen_start_kernel(void)set_xen_basic_apic_ops ();#endif +xen_setup_features (); +if (xen_feature (XENFEAT_mmu_pt_update_preserve_ad)) { pv_mmu_ops.ptep_modify_prot_start = xen_ptep_modify_prot_start; pv_mmu_ops.ptep_modify_prot_commit = xen_ptep_modify_prot_commit;
@@ -1004,13 +1009,6 @@ asmlinkage void __init xen_start_kernel(void) machine_ops = xen_machine_ops; -#ifdef CONFIG_X86_64 -/* -* Setup percpu state. We only need to do this for 64-bit -* because 32-bit already has %fs set properly. -*/ -load_percpu_segment (0 ); -#endif /* * The only reliable way to retain the initial address of the * percpu gdt_page is to remember it here, so we can go and