x86 fixes
Subsystems (4)
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
out-of-topic modifications in x86-fixes-for-linus:
--------------------------------------------------
.mailmap # 17c2297: mailmap: add Peter Oruba
Thanks,
Ingo
------------------>
Gary Hade (1):
x86: remove debug code from arch_add_memory()
Harvey Harrison (2):
x86: two trivial sparse annotations
x86: start annotating early ioremap pointers with __iomem
James Bottomley (5):
x86/voyager: fix boot breakage caused by x86: boot secondary cpus through initial_code
x86: use CONFIG_X86_SMP instead of CONFIG_SMP
x86/voyager: fix compile breakage casued by x86: move prefill_possible_map calling early x86/voyager: fix compile breakage caused by dc1e35c6e95e8923cf1d3510438b63c600fee1e2 x86/voyager: fix missing cpu_index initialisation
Jan Beulich (1):
i386/PAE: fix pud_page()
Joerg Roedel (1):
x86, gart: fix gart detection for Fam11h CPUs
Ken'ichi Ohmichi (1):
x86, kdump: fix invalid access on i386 sparsemem
Markus Metzger (1):
x86, bts: improve help text for BTS config
Mike Travis (1):
x86, uv: fix compile error in uv_hub.h
Peter Oruba (3):
mailmap: add Peter Oruba
x86: microcode patch loader author update
x86: AMD microcode patch loader author update
Ravikiran G Thirumalai (1):
x86: fix /dev/mem mmap breakage when PAT is disabled
Uwe Hermann (1):
doc/x86: fix doc subdirs
Yinghai Lu (3):
x86: fix APIC_DEBUG with inquire_remote_apic
x86: 64 bit print out absent pages num too
x86: fix init_memory_mapping for [dc000000 - e0000000) - v2
.mailmap | 2 + Documentation/00-INDEX | 4 +- Documentation/kernel-parameters.txt | 12 ++-- Documentation/lguest/lguest.c | 2 +- Documentation/x86/x86_64/boot-options.txt | 4 +- Documentation/x86/x86_64/fake-numa-for-cpusets | 2 +- arch/x86/Kconfig | 4 ++ arch/x86/Kconfig.cpu | 24 ++++---- arch/x86/include/asm/es7000/wakecpu.h | 9 ++-- arch/x86/include/asm/io.h | 6 +- arch/x86/include/asm/mach-default/mach_wakecpu.h | 9 ++-- arch/x86/include/asm/pgtable-3level.h | 4 +- arch/x86/include/asm/smp.h | 6 ++ arch/x86/include/asm/uv/uv_hub.h | 1 + arch/x86/kernel/cpu/addon_cpuid_features.c | 2 +- arch/x86/kernel/cpu/common.c | 4 +- arch/x86/kernel/k8.c | 1 - arch/x86/kernel/machine_kexec_32.c | 5 ++- arch/x86/kernel/microcode_amd.c | 2 +- arch/x86/kernel/microcode_core.c | 4 +- arch/x86/kernel/pci-gart_64.c | 2 +- arch/x86/kernel/tsc.c | 2 +- arch/x86/kernel/vsmp_64.c | 2 +- arch/x86/mach-voyager/voyager_smp.c | 12 ++++- arch/x86/mm/gup.c | 2 +- arch/x86/mm/init_64.c | 61 ++++++++++++++-------- arch/x86/mm/ioremap.c | 22 ++++---- arch/x86/mm/pat.c | 4 ++ 28 files changed, 131 insertions(+), 83 deletions(-)
.mailmap +2 -0
@@ -80,6 +80,8 @@ Nguyen Anh Quynh <[email protected]> Paolo 'Blaisorblade' Giarrusso <[email protected]> Patrick Mochel <[email protected]> Peter A Jonsson <[email protected]> +Peter Oruba <[email protected]> +Peter Oruba <[email protected]> Praveen BP <[email protected]> Rajesh Shah <[email protected]> Ralf Baechle <[email protected]>
Documentation/00-INDEX +2 -2
@@ -172,7 +172,7 @@ i2c/ - directory with info about the I2C bus/protocol (2 wire, kHz speed). i2o/ - directory with info about the Linux I2O subsystem. -i386/ +x86/i386/ - directory with info about Linux on Intel 32 bit architecture. ia64/ - directory with info about Linux on Intel 64 bit architecture.
@@ -382,7 +382,7 @@ w1/ - directory with documents regarding the 1-wire (w1) subsystem. watchdog/ - how to auto-reboot Linux if it has "fallen and can't get up". ;-) -x86_64/ +x86/x86_64/ - directory with info on Linux support for AMD x86-64 (Hammer) machines. zorro.txt - info on writing drivers for Zorro bus devices found on Amigas.
Documentation/kernel-parameters.txt +6 -6
@@ -100,7 +100,7 @@ parameter is applicable: X86-32 X86-32, aka i386 architecture is enabled. X86-64 X86-64 architecture is enabled. More X86-64 boot options can be found in - Documentation/x86_64/boot-options.txt . + Documentation/x86/x86_64/boot-options.txt . X86 Either 32bit or 64bit x86 (same as X86-32+X86-64) In addition, the following text indicates that the option:
@@ -112,10 +112,10 @@ In addition, the following text indicates that the option: Parameters denoted with BOOT are actually interpreted by the boot loader, and have no meaning to the kernel directly. Do not modify the syntax of boot loader parameters without extreme -need or coordination with <Documentation/i386/boot.txt>. +need or coordination with <Documentation/x86/i386/boot.txt>. There are also arch-specific kernel-parameters not documented here. -See for example <Documentation/x86_64/boot-options.txt>. +See for example <Documentation/x86/x86_64/boot-options.txt>. Note that ALL kernel parameters listed below are CASE SENSITIVE, and that a trailing = on the name of any parameter states that that parameter will
@@ -1222,7 +1222,7 @@ and is between 256 and 4096 characters. It is defined in the file mce [X86-32] Machine Check Exception - mce=option [X86-64] See Documentation/x86_64/boot-options.txt + mce=option [X86-64] See Documentation/x86/x86_64/boot-options.txt md= [HW] RAID subsystems devices and level See Documentation/md.txt.
@@ -1728,7 +1728,7 @@ and is between 256 and 4096 characters. It is defined in the file See Documentation/paride.txt. pirq= [SMP,APIC] Manual mp-table setup - See Documentation/i386/IO-APIC.txt. + See Documentation/x86/i386/IO-APIC.txt. plip= [PPT,NET] Parallel port network link Format: { parport<nr> | timid | 0 }
@@ -2343,7 +2343,7 @@ and is between 256 and 4096 characters. It is defined in the file See Documentation/fb/modedb.txt. vga= [BOOT,X86-32] Select a particular video mode - See Documentation/i386/boot.txt and + See Documentation/x86/i386/boot.txt and Documentation/svga.txt. Use vga=ask for menu. This is actually a boot loader parameter; the value is
Documentation/lguest/lguest.c +1 -1
@@ -402,7 +402,7 @@ static unsigned long load_bzimage(int fd)void *p =from_guest_phys (0x100000 );/* Go back to the start of the file and read the header. It should be -* a Linux boot header (see Documentation/i386/boot.txt) */ +* a Linux boot header (see Documentation/x86/i386/boot.txt) */ lseek (fd,0 ,SEEK_SET );read (fd, &boot,sizeof (boot));
Documentation/x86/x86_64/boot-options.txt +2 -2
@@ -35,7 +35,7 @@ APICs nolapic Don't use the local APIC (alias for i386 compatibility) - pirq=... See Documentation/i386/IO-APIC.txt + pirq=... See Documentation/x86/i386/IO-APIC.txt noapictimer Don't set up the APIC timer
@@ -139,7 +139,7 @@ Non Executable Mappings SMP additional_cpus=NUM Allow NUM more CPUs for hotplug - (defaults are specified by the BIOS, see Documentation/x86_64/cpu-hotplug-spec) + (defaults are specified by the BIOS, see Documentation/x86/x86_64/cpu-hotplug-spec) NUMA
Documentation/x86/x86_64/fake-numa-for-cpusets +1 -1
@@ -10,7 +10,7 @@ amount of system memory that are available to a certain class of tasks. For more information on the features of cpusets, see Documentation/cpusets.txt. There are a number of different configurations you can use for your needs. For more information on the numa=fake command line option and its various ways of -configuring fake nodes, see Documentation/x86_64/boot-options.txt. +configuring fake nodes, see Documentation/x86/x86_64/boot-options.txt. For the purposes of this introduction, we'll assume a very primitive NUMA emulation setup of "numa=fake=4*512,". This will split our system memory into
arch/x86/Kconfig +4 -0
@@ -231,6 +231,10 @@ config SMP If you don't know what to do here, say N. +config X86_HAS_BOOT_CPU_ID + def_bool y + depends on X86_VOYAGER + config X86_FIND_SMP_CONFIG def_bool y depends on X86_MPPARSE || X86_VOYAGER
arch/x86/Kconfig.cpu +12 -12
@@ -513,19 +513,19 @@ config CPU_SUP_UMC_32 If unsure, say N. config X86_DS - bool "Debug Store support" - default y - help - Add support for Debug Store. - This allows the kernel to provide a memory buffer to the hardware - to store various profiling and tracing events. + def_bool X86_PTRACE_BTS + depends on X86_DEBUGCTLMSR config X86_PTRACE_BTS - bool "ptrace interface to Branch Trace Store" + bool "Branch Trace Store" default y - depends on (X86_DS && X86_DEBUGCTLMSR) + depends on X86_DEBUGCTLMSR help - Add a ptrace interface to allow collecting an execution trace - of the traced task. - This collects control flow changes in a (cyclic) buffer and allows - debuggers to fill in the gaps and show an execution trace of the debuggee. + This adds a ptrace interface to the hardware's branch trace store. + + Debuggers may use it to collect an execution trace of the debugged + application in order to answer the question 'how did I get here?'. + Debuggers may trace user mode as well as kernel mode. + + Say Y unless there is no application development on this machine + and you want to save a small amount of code size.
arch/x86/include/asm/es7000/wakecpu.h +4 -5
@@ -50,10 +50,9 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) { } -#if APIC_DEBUG -#define inquire_remote_apic (apicid) __inquire_remote_apic(apicid) -#else -#define inquire_remote_apic (apicid) {} -#endif +#define inquire_remote_apic (apicid) do { \ + if (apic_verbosity >= APIC_DEBUG) \ + __inquire_remote_apic(apicid); \ + } while (0)#endif /* __ASM_MACH_WAKECPU_H */
arch/x86/include/asm/io.h +3 -3
@@ -82,9 +82,9 @@ extern void __iomem *ioremap_wc(unsigned long offset, unsigned long size);extern void early_ioremap_init (void );extern void early_ioremap_clear (void );extern void early_ioremap_reset (void ); -extern void *early_ioremap (unsigned long offset,unsigned long size); -extern void *early_memremap (unsigned long offset,unsigned long size); -extern void early_iounmap (void *addr,unsigned long size); +extern void __iomem *early_ioremap (unsigned long offset,unsigned long size); +extern void __iomem *early_memremap (unsigned long offset,unsigned long size); +extern void early_iounmap (void __iomem *addr,unsigned long size);extern void __iomem *fix_ioremap (unsigned idx,unsigned long phys);
arch/x86/include/asm/mach-default/mach_wakecpu.h +4 -5
@@ -33,10 +33,9 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) { } -#if APIC_DEBUG -#define inquire_remote_apic (apicid) __inquire_remote_apic(apicid) -#else -#define inquire_remote_apic (apicid) {} -#endif +#define inquire_remote_apic (apicid) do { \ + if (apic_verbosity >= APIC_DEBUG) \ + __inquire_remote_apic(apicid); \ + } while (0)#endif /* _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H */
arch/x86/include/asm/pgtable-3level.h +2 -2
@@ -120,13 +120,13 @@ static inline void pud_clear(pud_t *pudp)write_cr3 (pgd); } -#define pud_page (pud) ((struct page *) __va(pud_val(pud) & PTE_PFN_MASK)) +#define pud_page (pud) pfn_to_page(pud_val(pud) >> PAGE_SHIFT)#define pud_page_vaddr (pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK))/* Find an entry in the second-level page table.. */ -#define pmd_offset (pud, address) ((pmd_t *)pud_page(*(pud)) + \ +#define pmd_offset (pud, address) ((pmd_t *)pud_page_vaddr(*(pud)) + \ pmd_index(address))#ifdef CONFIG_SMP
arch/x86/include/asm/smp.h +6 -0
@@ -225,5 +225,11 @@ static inline int hard_smp_processor_id(void)#endif /* CONFIG_X86_LOCAL_APIC */ +#ifdef CONFIG_X86_HAS_BOOT_CPU_ID +extern unsigned char boot_cpu_id; +#else +#define boot_cpu_id 0 +#endif +#endif /* __ASSEMBLY__ */ #endif /* _ASM_X86_SMP_H */
arch/x86/include/asm/uv/uv_hub.h +1 -0
@@ -13,6 +13,7 @@#include <linux/numa.h> #include <linux/percpu.h> +#include <linux/timer.h> #include <asm/types.h> #include <asm/percpu.h>
arch/x86/kernel/cpu/addon_cpuid_features.c +1 -1
@@ -69,7 +69,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)*/ void __cpuinit detect_extended_topology (struct cpuinfo_x86 *c) { -#ifdef CONFIG_SMP +#ifdef CONFIG_X86_SMP unsigned int eax, ebx, ecx, edx, sub_index;unsigned int ht_mask_width, core_plus_mask_width;unsigned int core_select_mask, core_level_siblings;
arch/x86/kernel/cpu/common.c +3 -1
@@ -549,6 +549,8 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) this_cpu->c_early_init (c);validate_pat_support (c); + + c->cpu_index = boot_cpu_id; }void __init early_cpu_init (void )
@@ -1134,7 +1136,7 @@ void __cpuinit cpu_init(void)/* * Boot processor to setup the FP and extended state context info. */ -if (!smp_processor_id ()) +if (smp_processor_id () == boot_cpu_id)init_thread_xstate ();xsave_init ();
arch/x86/kernel/k8.c +0 -1
@@ -18,7 +18,6 @@ static u32 *flush_words;struct pci_device_id k8_nb_ids[] = { {PCI_DEVICE (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_K8_NB_MISC ) }, {PCI_DEVICE (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_10H_NB_MISC ) }, - {PCI_DEVICE (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_11H_NB_MISC ) }, {} };EXPORT_SYMBOL (k8_nb_ids);
arch/x86/kernel/machine_kexec_32.c +4 -1
@@ -162,7 +162,10 @@ void machine_kexec(struct kimage *image) page_list[VA_PTE_0 ] = (unsigned long )kexec_pte0; page_list[PA_PTE_1 ] =__pa (kexec_pte1); page_list[VA_PTE_1 ] = (unsigned long )kexec_pte1; - page_list[PA_SWAP_PAGE ] = (page_to_pfn (image->swap_page) <<PAGE_SHIFT ); + +if (image->type ==KEXEC_TYPE_DEFAULT ) + page_list[PA_SWAP_PAGE ] = (page_to_pfn (image->swap_page) + <<PAGE_SHIFT );/* The segment registers are funny things, they have both a * visible and an invisible part. Whenever the visible part is
arch/x86/kernel/microcode_amd.c +1 -1
@@ -39,7 +39,7 @@#include <asm/microcode.h> MODULE_DESCRIPTION ("AMD Microcode Update Driver" ); -MODULE_AUTHOR ("Peter Oruba <[email protected]>" ); +MODULE_AUTHOR ("Peter Oruba" );MODULE_LICENSE ("GPL v2" );#define UCODE_MAGIC 0x00414d44
arch/x86/kernel/microcode_core.c +2 -2
@@ -480,8 +480,8 @@ static int __init microcode_init(void)printk (KERN_INFO "Microcode Update Driver: v" MICROCODE_VERSION -" <[email protected]>" -" <[email protected]>\n" ); +" <[email protected]>," +" Peter Oruba\n" );return 0 ; }
arch/x86/kernel/pci-gart_64.c +1 -1
@@ -744,7 +744,7 @@ void __init gart_iommu_init(void)long i;if (cache_k8_northbridges () <0 || num_k8_northbridges ==0 ) { -printk (KERN_INFO "PCI-GART: No AMD northbridge found.\n" ); +printk (KERN_INFO "PCI-GART: No AMD GART found.\n" );return ; }
arch/x86/kernel/tsc.c +1 -1
@@ -759,7 +759,7 @@ __cpuinit int unsynchronized_tsc(void)if (!cpu_has_tsc || tsc_unstable)return 1 ; -#ifdef CONFIG_SMP +#ifdef CONFIG_X86_SMP if (apic_is_clustered_box ())return 1 ;#endif
arch/x86/kernel/vsmp_64.c +1 -1
@@ -78,7 +78,7 @@ static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf,static void __init set_vsmp_pv_ops (void ) { -void *address; +void __iomem *address;unsigned int cap, ctl, cfg;/* set vSMP magic bits to indicate vSMP capable kernel */
arch/x86/mach-voyager/voyager_smp.c +11 -1
@@ -90,6 +90,7 @@ static void ack_vic_irq(unsigned int irq);static void vic_enable_cpi (void );static void do_boot_cpu (__u8 cpuid);static void do_quad_bootstrap (void ); +static void initialize_secondary (void );int hard_smp_processor_id (void );int safe_smp_processor_id (void );
@@ -344,6 +345,12 @@ static void do_quad_bootstrap(void) } } +void prefill_possible_map (void ) +{ +/* This is empty on voyager because we need a much +* earlier detection which is done in find_smp_config */ +} +/* Set up all the basic stuff: read the SMP config and make all the * SMP information reflect only the boot cpu. All others will be * brought on-line later. */
@@ -413,6 +420,7 @@ void __init smp_store_cpu_info(int id)struct cpuinfo_x86 *c = &cpu_data (id); *c = boot_cpu_data; + c->cpu_index = id;identify_secondary_cpu (c); }
@@ -650,6 +658,8 @@ void __init smp_boot_cpus(void)smp_tune_scheduling(); */ smp_store_cpu_info (boot_cpu_id); +/* setup the jump vector */ + initial_code = (unsigned long )initialize_secondary;printk ("CPU%d: " , boot_cpu_id);print_cpu_info (&cpu_data (boot_cpu_id));
@@ -702,7 +712,7 @@ void __init smp_boot_cpus(void)/* Reload the secondary CPUs task structure (this function does not * return ) */ -void __init initialize_secondary (void ) +static void __init initialize_secondary (void ) {#if 0 // AC kernels only
arch/x86/mm/gup.c +1 -1
@@ -233,7 +233,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, len = (unsigned long ) nr_pages <<PAGE_SHIFT ; end = start + len;if (unlikely (!access_ok (write ?VERIFY_WRITE :VERIFY_READ , - start, len))) + (void __user *)start, len))) goto slow_irqon;/*
arch/x86/mm/init_64.c +40 -21
118 lines not on this page · raw message
arch/x86/mm/ioremap.c +11 -11
@@ -387,7 +387,7 @@ static void __iomem *ioremap_default(resource_size_t phys_addr, unsigned long size) {unsigned long flags; -void *ret; +void __iomem *ret;int err;/*
@@ -399,11 +399,11 @@ static void __iomem *ioremap_default(resource_size_t phys_addr,if (err <0 )return NULL ; - ret = (void *)__ioremap_caller (phys_addr, size, flags, -__builtin_return_address (0 )); + ret =__ioremap_caller (phys_addr, size, flags, +__builtin_return_address (0 ));free_memtype (phys_addr, phys_addr + size); -return (void __iomem *)ret; +return ret; } void __iomem *ioremap_prot(resource_size_t phys_addr, unsigned long size,
@@ -622,7 +622,7 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx)__early_set_fixmap (idx,0 ,__pgprot (0 )); } -static void *prev_map[FIX_BTMAPS_SLOTS ]__initdata ; +static void __iomem *prev_map[FIX_BTMAPS_SLOTS ]__initdata ;static unsigned long prev_size[FIX_BTMAPS_SLOTS ]__initdata ;static int __init check_early_ioremap_leak (void ) {
@@ -645,7 +645,7 @@ static int __init check_early_ioremap_leak(void) }late_initcall (check_early_ioremap_leak); -static void __init *__early_ioremap (unsigned long phys_addr,unsigned long size,pgprot_t prot) +static void __init __iomem *__early_ioremap (unsigned long phys_addr,unsigned long size,pgprot_t prot) {unsigned long offset, last_addr;unsigned int nrpages;
@@ -713,23 +713,23 @@ static void __init *__early_ioremap(unsigned long phys_addr, unsigned long size,if (early_ioremap_debug)printk (KERN_CONT "%08lx + %08lx\n" , offset,fix_to_virt (idx0)); - prev_map[slot] = (void *) (offset +fix_to_virt (idx0)); + prev_map[slot] = (void __iomem *)(offset +fix_to_virt (idx0));return prev_map[slot]; }/* Remap an IO device */ -void __init *early_ioremap (unsigned long phys_addr,unsigned long size) +void __init __iomem *early_ioremap (unsigned long phys_addr,unsigned long size) {return __early_ioremap (phys_addr, size,PAGE_KERNEL_IO ); }/* Remap memory */ -void __init *early_memremap (unsigned long phys_addr,unsigned long size) +void __init __iomem *early_memremap (unsigned long phys_addr,unsigned long size) {return __early_ioremap (phys_addr, size,PAGE_KERNEL ); } -void __init early_iounmap (void *addr,unsigned long size) +void __init early_iounmap (void __iomem *addr,unsigned long size) {unsigned long virt_addr;unsigned long offset;
@@ -779,7 +779,7 @@ void __init early_iounmap(void *addr, unsigned long size) --idx; --nrpages; } - prev_map[slot] =0 ; + prev_map[slot] =NULL ; }void __this_fixmap_does_not_exist (void )
arch/x86/mm/pat.c +4 -0
@@ -481,12 +481,16 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)return 1 ; }#else +/* This check is needed to avoid cache aliasing when PAT is enabled */ static inline int range_is_allowed (unsigned long pfn,unsigned long size) {u64 from = ((u64 )pfn) <<PAGE_SHIFT ;u64 to = from + size;u64 cursor = from; +if (!pat_enabled) +return 1 ; +while (cursor < to) {if (!devmem_is_allowed (pfn)) { printk(KERN_INFO
[git pull] x86 fixes, #2
[ sorry about this quick followup pull - a UP kernel build fix is
included below as well. ]
Linus,
Please pull the latest x86-fixes-for-linus-2 git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus-2
out-of-topic modifications in x86-fixes-for-linus-2:
----------------------------------------------------
.mailmap # 17c2297: mailmap: add Peter Oruba
Thanks,
Ingo
------------------>
Gary Hade (1):
x86: remove debug code from arch_add_memory()
Harvey Harrison (2):
x86: two trivial sparse annotations
x86: start annotating early ioremap pointers with __iomem
Ingo Molnar (1):
x86: cpu_index build fix
James Bottomley (5):
x86/voyager: fix boot breakage caused by x86: boot secondary cpus through initial_code
x86: use CONFIG_X86_SMP instead of CONFIG_SMP
x86/voyager: fix compile breakage casued by x86: move prefill_possible_map calling early x86/voyager: fix compile breakage caused by dc1e35c6e95e8923cf1d3510438b63c600fee1e2 x86/voyager: fix missing cpu_index initialisation
Jan Beulich (1):
i386/PAE: fix pud_page()
Joerg Roedel (1):
x86, gart: fix gart detection for Fam11h CPUs
Ken'ichi Ohmichi (1):
x86, kdump: fix invalid access on i386 sparsemem
Markus Metzger (1):
x86, bts: improve help text for BTS config
Mike Travis (1):
x86, uv: fix compile error in uv_hub.h
Peter Oruba (3):
mailmap: add Peter Oruba
x86: microcode patch loader author update
x86: AMD microcode patch loader author update
Ravikiran G Thirumalai (1):
x86: fix /dev/mem mmap breakage when PAT is disabled
Uwe Hermann (1):
doc/x86: fix doc subdirs
Yinghai Lu (3):
x86: fix APIC_DEBUG with inquire_remote_apic
x86: 64 bit print out absent pages num too
x86: fix init_memory_mapping for [dc000000 - e0000000) - v2
.mailmap | 2 + Documentation/00-INDEX | 4 +- Documentation/kernel-parameters.txt | 12 ++-- Documentation/lguest/lguest.c | 2 +- Documentation/x86/x86_64/boot-options.txt | 4 +- Documentation/x86/x86_64/fake-numa-for-cpusets | 2 +- arch/x86/Kconfig | 4 ++ arch/x86/Kconfig.cpu | 24 ++++---- arch/x86/include/asm/es7000/wakecpu.h | 9 ++-- arch/x86/include/asm/io.h | 6 +- arch/x86/include/asm/mach-default/mach_wakecpu.h | 9 ++-- arch/x86/include/asm/pgtable-3level.h | 4 +- arch/x86/include/asm/smp.h | 6 ++ arch/x86/include/asm/uv/uv_hub.h | 1 + arch/x86/kernel/cpu/addon_cpuid_features.c | 2 +- arch/x86/kernel/cpu/common.c | 6 ++- arch/x86/kernel/k8.c | 1 - arch/x86/kernel/machine_kexec_32.c | 5 ++- arch/x86/kernel/microcode_amd.c | 2 +- arch/x86/kernel/microcode_core.c | 4 +- arch/x86/kernel/pci-gart_64.c | 2 +- arch/x86/kernel/tsc.c | 2 +- arch/x86/kernel/vsmp_64.c | 2 +- arch/x86/mach-voyager/voyager_smp.c | 12 ++++- arch/x86/mm/gup.c | 2 +- arch/x86/mm/init_64.c | 61 ++++++++++++++-------- arch/x86/mm/ioremap.c | 22 ++++---- arch/x86/mm/pat.c | 4 ++ 28 files changed, 133 insertions(+), 83 deletions(-)
.mailmap +2 -0
@@ -80,6 +80,8 @@ Nguyen Anh Quynh <[email protected]> Paolo 'Blaisorblade' Giarrusso <[email protected]> Patrick Mochel <[email protected]> Peter A Jonsson <[email protected]> +Peter Oruba <[email protected]> +Peter Oruba <[email protected]> Praveen BP <[email protected]> Rajesh Shah <[email protected]> Ralf Baechle <[email protected]>
Documentation/00-INDEX +2 -2
@@ -172,7 +172,7 @@ i2c/ - directory with info about the I2C bus/protocol (2 wire, kHz speed). i2o/ - directory with info about the Linux I2O subsystem. -i386/ +x86/i386/ - directory with info about Linux on Intel 32 bit architecture. ia64/ - directory with info about Linux on Intel 64 bit architecture.
@@ -382,7 +382,7 @@ w1/ - directory with documents regarding the 1-wire (w1) subsystem. watchdog/ - how to auto-reboot Linux if it has "fallen and can't get up". ;-) -x86_64/ +x86/x86_64/ - directory with info on Linux support for AMD x86-64 (Hammer) machines. zorro.txt - info on writing drivers for Zorro bus devices found on Amigas.
Documentation/kernel-parameters.txt +6 -6
@@ -100,7 +100,7 @@ parameter is applicable: X86-32 X86-32, aka i386 architecture is enabled. X86-64 X86-64 architecture is enabled. More X86-64 boot options can be found in - Documentation/x86_64/boot-options.txt . + Documentation/x86/x86_64/boot-options.txt . X86 Either 32bit or 64bit x86 (same as X86-32+X86-64) In addition, the following text indicates that the option:
@@ -112,10 +112,10 @@ In addition, the following text indicates that the option: Parameters denoted with BOOT are actually interpreted by the boot loader, and have no meaning to the kernel directly. Do not modify the syntax of boot loader parameters without extreme -need or coordination with <Documentation/i386/boot.txt>. +need or coordination with <Documentation/x86/i386/boot.txt>. There are also arch-specific kernel-parameters not documented here. -See for example <Documentation/x86_64/boot-options.txt>. +See for example <Documentation/x86/x86_64/boot-options.txt>. Note that ALL kernel parameters listed below are CASE SENSITIVE, and that a trailing = on the name of any parameter states that that parameter will
@@ -1222,7 +1222,7 @@ and is between 256 and 4096 characters. It is defined in the file mce [X86-32] Machine Check Exception - mce=option [X86-64] See Documentation/x86_64/boot-options.txt + mce=option [X86-64] See Documentation/x86/x86_64/boot-options.txt md= [HW] RAID subsystems devices and level See Documentation/md.txt.
@@ -1728,7 +1728,7 @@ and is between 256 and 4096 characters. It is defined in the file See Documentation/paride.txt. pirq= [SMP,APIC] Manual mp-table setup - See Documentation/i386/IO-APIC.txt. + See Documentation/x86/i386/IO-APIC.txt. plip= [PPT,NET] Parallel port network link Format: { parport<nr> | timid | 0 }
@@ -2343,7 +2343,7 @@ and is between 256 and 4096 characters. It is defined in the file See Documentation/fb/modedb.txt. vga= [BOOT,X86-32] Select a particular video mode - See Documentation/i386/boot.txt and + See Documentation/x86/i386/boot.txt and Documentation/svga.txt. Use vga=ask for menu. This is actually a boot loader parameter; the value is
Documentation/lguest/lguest.c +1 -1
@@ -402,7 +402,7 @@ static unsigned long load_bzimage(int fd)void *p =from_guest_phys (0x100000 );/* Go back to the start of the file and read the header. It should be -* a Linux boot header (see Documentation/i386/boot.txt) */ +* a Linux boot header (see Documentation/x86/i386/boot.txt) */ lseek (fd,0 ,SEEK_SET );read (fd, &boot,sizeof (boot));
Documentation/x86/x86_64/boot-options.txt +2 -2
@@ -35,7 +35,7 @@ APICs nolapic Don't use the local APIC (alias for i386 compatibility) - pirq=... See Documentation/i386/IO-APIC.txt + pirq=... See Documentation/x86/i386/IO-APIC.txt noapictimer Don't set up the APIC timer
@@ -139,7 +139,7 @@ Non Executable Mappings SMP additional_cpus=NUM Allow NUM more CPUs for hotplug - (defaults are specified by the BIOS, see Documentation/x86_64/cpu-hotplug-spec) + (defaults are specified by the BIOS, see Documentation/x86/x86_64/cpu-hotplug-spec) NUMA
Documentation/x86/x86_64/fake-numa-for-cpusets +1 -1
@@ -10,7 +10,7 @@ amount of system memory that are available to a certain class of tasks. For more information on the features of cpusets, see Documentation/cpusets.txt. There are a number of different configurations you can use for your needs. For more information on the numa=fake command line option and its various ways of -configuring fake nodes, see Documentation/x86_64/boot-options.txt. +configuring fake nodes, see Documentation/x86/x86_64/boot-options.txt. For the purposes of this introduction, we'll assume a very primitive NUMA emulation setup of "numa=fake=4*512,". This will split our system memory into
arch/x86/Kconfig +4 -0
@@ -231,6 +231,10 @@ config SMP If you don't know what to do here, say N. +config X86_HAS_BOOT_CPU_ID + def_bool y + depends on X86_VOYAGER + config X86_FIND_SMP_CONFIG def_bool y depends on X86_MPPARSE || X86_VOYAGER
arch/x86/Kconfig.cpu +12 -12
@@ -513,19 +513,19 @@ config CPU_SUP_UMC_32 If unsure, say N. config X86_DS - bool "Debug Store support" - default y - help - Add support for Debug Store. - This allows the kernel to provide a memory buffer to the hardware - to store various profiling and tracing events. + def_bool X86_PTRACE_BTS + depends on X86_DEBUGCTLMSR config X86_PTRACE_BTS - bool "ptrace interface to Branch Trace Store" + bool "Branch Trace Store" default y - depends on (X86_DS && X86_DEBUGCTLMSR) + depends on X86_DEBUGCTLMSR help - Add a ptrace interface to allow collecting an execution trace - of the traced task. - This collects control flow changes in a (cyclic) buffer and allows - debuggers to fill in the gaps and show an execution trace of the debuggee. + This adds a ptrace interface to the hardware's branch trace store. + + Debuggers may use it to collect an execution trace of the debugged + application in order to answer the question 'how did I get here?'. + Debuggers may trace user mode as well as kernel mode. + + Say Y unless there is no application development on this machine + and you want to save a small amount of code size.
arch/x86/include/asm/es7000/wakecpu.h +4 -5
@@ -50,10 +50,9 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) { } -#if APIC_DEBUG -#define inquire_remote_apic (apicid) __inquire_remote_apic(apicid) -#else -#define inquire_remote_apic (apicid) {} -#endif +#define inquire_remote_apic (apicid) do { \ + if (apic_verbosity >= APIC_DEBUG) \ + __inquire_remote_apic(apicid); \ + } while (0)#endif /* __ASM_MACH_WAKECPU_H */
arch/x86/include/asm/io.h +3 -3
@@ -82,9 +82,9 @@ extern void __iomem *ioremap_wc(unsigned long offset, unsigned long size);extern void early_ioremap_init (void );extern void early_ioremap_clear (void );extern void early_ioremap_reset (void ); -extern void *early_ioremap (unsigned long offset,unsigned long size); -extern void *early_memremap (unsigned long offset,unsigned long size); -extern void early_iounmap (void *addr,unsigned long size); +extern void __iomem *early_ioremap (unsigned long offset,unsigned long size); +extern void __iomem *early_memremap (unsigned long offset,unsigned long size); +extern void early_iounmap (void __iomem *addr,unsigned long size);extern void __iomem *fix_ioremap (unsigned idx,unsigned long phys);
arch/x86/include/asm/mach-default/mach_wakecpu.h +4 -5
@@ -33,10 +33,9 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) { } -#if APIC_DEBUG -#define inquire_remote_apic (apicid) __inquire_remote_apic(apicid) -#else -#define inquire_remote_apic (apicid) {} -#endif +#define inquire_remote_apic (apicid) do { \ + if (apic_verbosity >= APIC_DEBUG) \ + __inquire_remote_apic(apicid); \ + } while (0)#endif /* _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H */
arch/x86/include/asm/pgtable-3level.h +2 -2
@@ -120,13 +120,13 @@ static inline void pud_clear(pud_t *pudp)write_cr3 (pgd); } -#define pud_page (pud) ((struct page *) __va(pud_val(pud) & PTE_PFN_MASK)) +#define pud_page (pud) pfn_to_page(pud_val(pud) >> PAGE_SHIFT)#define pud_page_vaddr (pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK))/* Find an entry in the second-level page table.. */ -#define pmd_offset (pud, address) ((pmd_t *)pud_page(*(pud)) + \ +#define pmd_offset (pud, address) ((pmd_t *)pud_page_vaddr(*(pud)) + \ pmd_index(address))#ifdef CONFIG_SMP
arch/x86/include/asm/smp.h +6 -0
@@ -225,5 +225,11 @@ static inline int hard_smp_processor_id(void)#endif /* CONFIG_X86_LOCAL_APIC */ +#ifdef CONFIG_X86_HAS_BOOT_CPU_ID +extern unsigned char boot_cpu_id; +#else +#define boot_cpu_id 0 +#endif +#endif /* __ASSEMBLY__ */ #endif /* _ASM_X86_SMP_H */
arch/x86/include/asm/uv/uv_hub.h +1 -0
@@ -13,6 +13,7 @@#include <linux/numa.h> #include <linux/percpu.h> +#include <linux/timer.h> #include <asm/types.h> #include <asm/percpu.h>
arch/x86/kernel/cpu/addon_cpuid_features.c +1 -1
@@ -69,7 +69,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)*/ void __cpuinit detect_extended_topology (struct cpuinfo_x86 *c) { -#ifdef CONFIG_SMP +#ifdef CONFIG_X86_SMP unsigned int eax, ebx, ecx, edx, sub_index;unsigned int ht_mask_width, core_plus_mask_width;unsigned int core_select_mask, core_level_siblings;
arch/x86/kernel/cpu/common.c +5 -1
@@ -549,6 +549,10 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) this_cpu->c_early_init (c);validate_pat_support (c); + +#ifdef CONFIG_SMP + c->cpu_index = boot_cpu_id; +#endif }void __init early_cpu_init (void )
@@ -1134,7 +1138,7 @@ void __cpuinit cpu_init(void)/* * Boot processor to setup the FP and extended state context info. */ -if (!smp_processor_id ()) +if (smp_processor_id () == boot_cpu_id)init_thread_xstate ();xsave_init ();
arch/x86/kernel/k8.c +0 -1
@@ -18,7 +18,6 @@ static u32 *flush_words;struct pci_device_id k8_nb_ids[] = { {PCI_DEVICE (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_K8_NB_MISC ) }, {PCI_DEVICE (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_10H_NB_MISC ) }, - {PCI_DEVICE (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_11H_NB_MISC ) }, {} };EXPORT_SYMBOL (k8_nb_ids);
arch/x86/kernel/machine_kexec_32.c +4 -1
@@ -162,7 +162,10 @@ void machine_kexec(struct kimage *image) page_list[VA_PTE_0 ] = (unsigned long )kexec_pte0; page_list[PA_PTE_1 ] =__pa (kexec_pte1); page_list[VA_PTE_1 ] = (unsigned long )kexec_pte1; - page_list[PA_SWAP_PAGE ] = (page_to_pfn (image->swap_page) <<PAGE_SHIFT ); + +if (image->type ==KEXEC_TYPE_DEFAULT ) + page_list[PA_SWAP_PAGE ] = (page_to_pfn (image->swap_page) + <<PAGE_SHIFT );/* The segment registers are funny things, they have both a * visible and an invisible part. Whenever the visible part is
arch/x86/kernel/microcode_amd.c +1 -1
@@ -39,7 +39,7 @@#include <asm/microcode.h> MODULE_DESCRIPTION ("AMD Microcode Update Driver" ); -MODULE_AUTHOR ("Peter Oruba <[email protected]>" ); +MODULE_AUTHOR ("Peter Oruba" );MODULE_LICENSE ("GPL v2" );#define UCODE_MAGIC 0x00414d44
arch/x86/kernel/microcode_core.c +2 -2
@@ -480,8 +480,8 @@ static int __init microcode_init(void)printk (KERN_INFO "Microcode Update Driver: v" MICROCODE_VERSION -" <[email protected]>" -" <[email protected]>\n" ); +" <[email protected]>," +" Peter Oruba\n" );return 0 ; }
arch/x86/kernel/pci-gart_64.c +1 -1
@@ -744,7 +744,7 @@ void __init gart_iommu_init(void)long i;if (cache_k8_northbridges () <0 || num_k8_northbridges ==0 ) { -printk (KERN_INFO "PCI-GART: No AMD northbridge found.\n" ); +printk (KERN_INFO "PCI-GART: No AMD GART found.\n" );return ; }
arch/x86/kernel/tsc.c +1 -1
@@ -759,7 +759,7 @@ __cpuinit int unsynchronized_tsc(void)if (!cpu_has_tsc || tsc_unstable)return 1 ; -#ifdef CONFIG_SMP +#ifdef CONFIG_X86_SMP if (apic_is_clustered_box ())return 1 ;#endif
arch/x86/kernel/vsmp_64.c +1 -1
@@ -78,7 +78,7 @@ static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf,static void __init set_vsmp_pv_ops (void ) { -void *address; +void __iomem *address;unsigned int cap, ctl, cfg;/* set vSMP magic bits to indicate vSMP capable kernel */
arch/x86/mach-voyager/voyager_smp.c +11 -1
@@ -90,6 +90,7 @@ static void ack_vic_irq(unsigned int irq);static void vic_enable_cpi (void );static void do_boot_cpu (__u8 cpuid);static void do_quad_bootstrap (void ); +static void initialize_secondary (void );int hard_smp_processor_id (void );int safe_smp_processor_id (void );
@@ -344,6 +345,12 @@ static void do_quad_bootstrap(void) } } +void prefill_possible_map (void ) +{ +/* This is empty on voyager because we need a much +* earlier detection which is done in find_smp_config */ +} +/* Set up all the basic stuff: read the SMP config and make all the * SMP information reflect only the boot cpu. All others will be * brought on-line later. */
@@ -413,6 +420,7 @@ void __init smp_store_cpu_info(int id)struct cpuinfo_x86 *c = &cpu_data (id); *c = boot_cpu_data; + c->cpu_index = id;identify_secondary_cpu (c); }
@@ -650,6 +658,8 @@ void __init smp_boot_cpus(void)smp_tune_scheduling(); */ smp_store_cpu_info (boot_cpu_id); +/* setup the jump vector */ + initial_code = (unsigned long )initialize_secondary;printk ("CPU%d: " , boot_cpu_id);print_cpu_info (&cpu_data (boot_cpu_id));
@@ -702,7 +712,7 @@ void __init smp_boot_cpus(void)/* Reload the secondary CPUs task structure (this function does not * return ) */ -void __init initialize_secondary (void ) +static void __init initialize_secondary (void ) {#if 0 // AC kernels only
arch/x86/mm/gup.c +1 -1
@@ -233,7 +233,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, len = (unsigned long ) nr_pages <<PAGE_SHIFT ; end = start + len;if (unlikely (!access_ok (write ?VERIFY_WRITE :VERIFY_READ , - start, len))) + (void __user *)start, len))) goto slow_irqon;/*
arch/x86/mm/init_64.c +40 -21
118 lines not on this page · raw message
arch/x86/mm/ioremap.c +11 -11
@@ -387,7 +387,7 @@ static void __iomem *ioremap_default(resource_size_t phys_addr, unsigned long size) {unsigned long flags; -void *ret; +void __iomem *ret;int err;/*
@@ -399,11 +399,11 @@ static void __iomem *ioremap_default(resource_size_t phys_addr,if (err <0 )return NULL ; - ret = (void *)__ioremap_caller (phys_addr, size, flags, -__builtin_return_address (0 )); + ret =__ioremap_caller (phys_addr, size, flags, +__builtin_return_address (0 ));free_memtype (phys_addr, phys_addr + size); -return (void __iomem *)ret; +return ret; } void __iomem *ioremap_prot(resource_size_t phys_addr, unsigned long size,
@@ -622,7 +622,7 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx)__early_set_fixmap (idx,0 ,__pgprot (0 )); } -static void *prev_map[FIX_BTMAPS_SLOTS ]__initdata ; +static void __iomem *prev_map[FIX_BTMAPS_SLOTS ]__initdata ;static unsigned long prev_size[FIX_BTMAPS_SLOTS ]__initdata ;static int __init check_early_ioremap_leak (void ) {
@@ -645,7 +645,7 @@ static int __init check_early_ioremap_leak(void) }late_initcall (check_early_ioremap_leak); -static void __init *__early_ioremap (unsigned long phys_addr,unsigned long size,pgprot_t prot) +static void __init __iomem *__early_ioremap (unsigned long phys_addr,unsigned long size,pgprot_t prot) {unsigned long offset, last_addr;unsigned int nrpages;
@@ -713,23 +713,23 @@ static void __init *__early_ioremap(unsigned long phys_addr, unsigned long size,if (early_ioremap_debug)printk (KERN_CONT "%08lx + %08lx\n" , offset,fix_to_virt (idx0)); - prev_map[slot] = (void *) (offset +fix_to_virt (idx0)); + prev_map[slot] = (void __iomem *)(offset +fix_to_virt (idx0));return prev_map[slot]; }/* Remap an IO device */ -void __init *early_ioremap (unsigned long phys_addr,unsigned long size) +void __init __iomem *early_ioremap (unsigned long phys_addr,unsigned long size) {return __early_ioremap (phys_addr, size,PAGE_KERNEL_IO ); }/* Remap memory */ -void __init *early_memremap (unsigned long phys_addr,unsigned long size) +void __init __iomem *early_memremap (unsigned long phys_addr,unsigned long size) {return __early_ioremap (phys_addr, size,PAGE_KERNEL ); } -void __init early_iounmap (void *addr,unsigned long size) +void __init early_iounmap (void __iomem *addr,unsigned long size) {unsigned long virt_addr;unsigned long offset;
@@ -779,7 +779,7 @@ void __init early_iounmap(void *addr, unsigned long size) --idx; --nrpages; } - prev_map[slot] =0 ; + prev_map[slot] =NULL ; }void __this_fixmap_does_not_exist (void )
arch/x86/mm/pat.c +4 -0
@@ -481,12 +481,16 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)return 1 ; }#else +/* This check is needed to avoid cache aliasing when PAT is enabled */ static inline int range_is_allowed (unsigned long pfn,unsigned long size) {u64 from = ((u64 )pfn) <<PAGE_SHIFT ;u64 to = from + size;u64 cursor = from; +if (!pat_enabled) +return 1 ; +while (cursor < to) {if (!devmem_is_allowed (pfn)) { printk(KERN_INFO