x86 updates
Subsystems (5)
Linus,
Please pull the latest x86 git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus
Cleanups and fixlets - and the change that makes FRAME_POINTERS more prominent on x86. (this also touches lib/Kconfig.debug)
Thanks,
Ingo
------------------>
Alan Cox (1):
x86: update Alan Cox's email addresses
Baodong Chen (1):
Documentation/x86/boot.txt: payload length was changed to payload_length
Huang Weiyi (1):
x86: remove duplicated #include's
Ingo Molnar (1):
x86: offer frame pointers in all build modes
Jaswinder Singh Rajput (28):
x86: rename mp_config_table to mpc_table
x86: rename mpc_config_bus to mpc_bus
x86: rename mpc_config_processor to mpc_cpu
x86: rename mpc_config_ioapic to mpc_ioapic
x86: rename mpc_config_intsrc to mpc_intsrc
x86: rename mpc_config_lintsrc to mpc_lintsrc
x86: rename mpc_config_oemtable to mpc_oemtable
x86: apic.c fix style problems
x86: process_32.c fix style problems
x86: traps.c fix style problems
x86: irq.c fix style problems
x86: irq_64.c fix style problems
x86: time_32.c fix style problems
x86: time_64.c fix style problems
x86: ioport.c fix style problems
x86: irq_32.c fix style problems
x86: i8259.c fix style problems
x86: irqinit_32.c fix style problems
x86: irqinit_64.c fix style problems
x86: setup_percpu.c fix style problems
x86: irqinit_64.c init_ISA_irqs should be static
x86: rename all fields of mpc_iopic mpc_X to X
x86: rename all fields of mpc_lintsrc mpc_X to X
x86: rename all fields of mpc_intsrc mpc_X to X
x86: rename all fields of mpc_cpu mpc_X to X
x86: rename all fields of mpc_bus mpc_X to X
x86: rename all fields of mpc_oemtable oem_X to X
x86: rename all fields of mpc_table mpc_X to X
Jiri Slaby (1):
x86: fix RIP printout in early_idt_handler
Leonardo Potenza (1):
x86: fix section mismatch warnings in mcheck/mce_amd_64.c
Markus Trippelsdorf (1):
x86: remove debug printks (io_apic.c)
Yinghai Lu (1):
x86: k8 numa register active regions later
Documentation/x86/boot.txt | 2 +- arch/x86/Kconfig | 1 + arch/x86/include/asm/es7000/mpparse.h | 3 +- arch/x86/include/asm/genapic_32.h | 8 +- arch/x86/include/asm/mach-default/mach_mpparse.h | 4 +- arch/x86/include/asm/mach-generic/mach_mpparse.h | 5 +- arch/x86/include/asm/mach-generic/mach_mpspec.h | 4 +- arch/x86/include/asm/mpspec_def.h | 102 ++++---- arch/x86/include/asm/numaq/mpparse.h | 3 +- arch/x86/include/asm/setup.h | 14 +- arch/x86/include/asm/summit/mpparse.h | 2 +- arch/x86/kernel/apic.c | 14 +- arch/x86/kernel/apm_32.c | 4 +- arch/x86/kernel/cpu/mcheck/mce_32.c | 2 +- arch/x86/kernel/cpu/mcheck/mce_amd_64.c | 2 +- arch/x86/kernel/cpu/mcheck/p5.c | 2 +- arch/x86/kernel/cpu/mcheck/p6.c | 2 +- arch/x86/kernel/cpu/mcheck/winchip.c | 2 +- arch/x86/kernel/head_64.S | 2 +- arch/x86/kernel/i8259.c | 8 +- arch/x86/kernel/io_apic.c | 2 - arch/x86/kernel/ioport.c | 4 +- arch/x86/kernel/irq.c | 2 +- arch/x86/kernel/irq_32.c | 10 +- arch/x86/kernel/irq_64.c | 22 +- arch/x86/kernel/irqinit_32.c | 12 +- arch/x86/kernel/irqinit_64.c | 8 +- arch/x86/kernel/mpparse.c | 350 +++++++++++----------- arch/x86/kernel/nmi.c | 1 - arch/x86/kernel/numaq_32.c | 38 ++-- arch/x86/kernel/process_32.c | 19 +- arch/x86/kernel/setup_percpu.c | 11 +- arch/x86/kernel/smp.c | 2 +- arch/x86/kernel/smpboot.c | 2 +- arch/x86/kernel/time_32.c | 4 +- arch/x86/kernel/time_64.c | 2 +- arch/x86/kernel/traps.c | 3 - arch/x86/kernel/visws_quirks.c | 32 +- arch/x86/mach-generic/es7000.c | 10 +- arch/x86/mach-generic/numaq.c | 3 +- arch/x86/mach-generic/probe.c | 3 +- arch/x86/mm/k8topology_64.c | 20 +- lib/Kconfig.debug | 16 +- 43 files changed, 363 insertions(+), 399 deletions(-)
Documentation/x86/boot.txt +1 -1
@@ -44,7 +44,7 @@ Protocol 2.07: (Kernel 2.6.24) Added paravirtualised boot protocol. and KEEP_SEGMENTS flag in load_flags. Protocol 2.08: (Kernel 2.6.26) Added crc32 checksum and ELF format - payload. Introduced payload_offset and payload length + payload. Introduced payload_offset and payload_length fields to aid in locating the payload. Protocol 2.09: (Kernel 2.6.26) Added a field of 64-bit physical
arch/x86/Kconfig +1 -0
@@ -27,6 +27,7 @@ config X86 select HAVE_IOREMAP_PROT select HAVE_KPROBES select ARCH_WANT_OPTIONAL_GPIOLIB + select ARCH_WANT_FRAME_POINTERS select HAVE_KRETPROBES select HAVE_FTRACE_MCOUNT_RECORD select HAVE_DYNAMIC_FTRACE
arch/x86/include/asm/es7000/mpparse.h +1 -2
@@ -10,8 +10,7 @@ extern void setup_unisys(void);#ifndef CONFIG_X86_GENERICARCH extern int acpi_madt_oem_check (char *oem_id,char *oem_table_id); -extern int mps_oem_check (struct mp_config_table *mpc,char *oem, -char *productid); +extern int mps_oem_check (struct mpc_table *mpc,char *oem,char *productid);#endif #ifdef CONFIG_ACPI
arch/x86/include/asm/genapic_32.h +4 -4
@@ -15,9 +15,9 @@* Copyright 2003 Andi Kleen, SuSE Labs. */ -struct mpc_config_bus ; -struct mp_config_table ; -struct mpc_config_processor ; +struct mpc_bus ; +struct mpc_table ; +struct mpc_cpu ;struct genapic {char *name;
@@ -51,7 +51,7 @@ struct genapic {/* When one of the next two hooks returns 1 the genapic is switched to this. Essentially they are additional probe functions. */ -int (*mps_oem_check)(struct mp_config_table *mpc,char *oem, +int (*mps_oem_check)(struct mpc_table *mpc,char *oem,char *productid);int (*acpi_madt_oem_check)(char *oem_id,char *oem_table_id);
arch/x86/include/asm/mach-default/mach_mpparse.h +2 -2
@@ -1,8 +1,8 @@#ifndef _ASM_X86_MACH_DEFAULT_MACH_MPPARSE_H#define _ASM_X86_MACH_DEFAULT_MACH_MPPARSE_H -static inline int mps_oem_check (struct mp_config_table *mpc,char *oem, -char *productid) +static inline int +mps_oem_check (struct mpc_table *mpc,char *oem,char *productid) {return 0 ; }
arch/x86/include/asm/mach-generic/mach_mpparse.h +2 -3
@@ -2,9 +2,8 @@#define _ASM_X86_MACH_GENERIC_MACH_MPPARSE_H -extern int mps_oem_check (struct mp_config_table *mpc,char *oem, -char *productid); +extern int mps_oem_check (struct mpc_table *,char *,char *); -extern int acpi_madt_oem_check (char *oem_id,char *oem_table_id); +extern int acpi_madt_oem_check (char *,char *);#endif /* _ASM_X86_MACH_GENERIC_MACH_MPPARSE_H */
arch/x86/include/asm/mach-generic/mach_mpspec.h +2 -2
@@ -7,6 +7,6 @@/* Maximum 256 PCI busses, plus 1 ISA bus in each of 4 cabinets. */ #define MAX_MP_BUSSES 260 -extern void numaq_mps_oem_check (struct mp_config_table *mpc,char *oem, -char *productid); +extern void numaq_mps_oem_check (struct mpc_table *,char *,char *); +#endif /* _ASM_X86_MACH_GENERIC_MACH_MPSPEC_H */
arch/x86/include/asm/mpspec_def.h +51 -51
134 lines not on this page · raw message
arch/x86/include/asm/numaq/mpparse.h +1 -2
@@ -1,7 +1,6 @@#ifndef __ASM_NUMAQ_MPPARSE_H#define __ASM_NUMAQ_MPPARSE_H -extern void numaq_mps_oem_check (struct mp_config_table *mpc,char *oem, -char *productid); +extern void numaq_mps_oem_check (struct mpc_table *,char *,char *);#endif /* __ASM_NUMAQ_MPPARSE_H */
arch/x86/include/asm/setup.h +7 -7
@@ -25,9 +25,9 @@ extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);/* * Any setup quirks to be performed? */ -struct mpc_config_processor ; -struct mpc_config_bus ; -struct mp_config_oemtable ; +struct mpc_cpu ; +struct mpc_bus ; +struct mpc_oemtable ;struct x86_quirks {int (*arch_pre_time_init)(void );int (*arch_time_init)(void );
@@ -39,10 +39,10 @@ struct x86_quirks {int (*mach_find_smp_config)(unsigned int reserve);int *mpc_record; -int (*mpc_apic_id)(struct mpc_config_processor *m); -void (*mpc_oem_bus_info)(struct mpc_config_bus *m,char *name); -void (*mpc_oem_pci_bus)(struct mpc_config_bus *m); -void (*smp_read_mpc_oem)(struct mp_config_oemtable *oemtable, +int (*mpc_apic_id)(struct mpc_cpu *m); +void (*mpc_oem_bus_info)(struct mpc_bus *m,char *name); +void (*mpc_oem_pci_bus)(struct mpc_bus *m); +void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable,unsigned short oemsize);int (*setup_ioapic_ids)(void );int (*update_genapic)(void );
arch/x86/include/asm/summit/mpparse.h +1 -1
@@ -11,7 +11,7 @@ extern void setup_summit(void);#define setup_summit () {}#endif -static inline int mps_oem_check (struct mp_config_table *mpc,char *oem, +static inline int mps_oem_check (struct mpc_table *mpc,char *oem,char *productid) { if (!strncmp(oem, "IBM ENSW", 8) &&
arch/x86/kernel/apic.c +6 -8
@@ -31,9 +31,11 @@#include <linux/dmi.h> #include <linux/dmar.h> #include <linux/ftrace.h> +#include <linux/smp.h> +#include <linux/nmi.h> +#include <linux/timex.h> #include <asm/atomic.h> -#include <asm/smp.h> #include <asm/mtrr.h> #include <asm/mpspec.h> #include <asm/desc.h>
@@ -41,10 +43,8 @@#include <asm/hpet.h> #include <asm/pgalloc.h> #include <asm/i8253.h> -#include <asm/nmi.h> #include <asm/idle.h> #include <asm/proto.h> -#include <asm/timex.h> #include <asm/apic.h> #include <asm/i8259.h>
@@ -687,7 +687,7 @@ static int __init calibrate_APIC_clock(void)local_irq_enable ();if (levt->features &CLOCK_EVT_FEAT_DUMMY ) { -pr_warning ("APIC timer disabled due to verification failure.\n" ); +pr_warning ("APIC timer disabled due to verification failure\n" );return -1 ; }
@@ -2087,14 +2087,12 @@ __cpuinit int apic_is_clustered_box(void)/* are we being called early in kernel startup? */ if (bios_cpu_apicid) { id = bios_cpu_apicid[i]; - } -else if (i < nr_cpu_ids) { + }else if (i < nr_cpu_ids) {if (cpu_present (i)) id =per_cpu (x86_bios_cpu_apicid, i);else continue ; - } -else + }else break ;if (id !=BAD_APICID )
arch/x86/kernel/apm_32.c +2 -2
@@ -160,9 +160,9 @@* Work around byte swap bug in one of the Vaio's BIOS's * (Marc Boucher <[email protected]>). * Exposed the disable flag to dmi so that we can handle known -* broken APM (Alan Cox <[email protected]>). +* broken APM (Alan Cox <[email protected]>). * 1.14ac: If the BIOS says "I slowed the CPU down" then don't spin -* calling it - instead idle. (Alan Cox <[email protected]>) +* calling it - instead idle. (Alan Cox <[email protected]>) * If an APM idle fails log it and idle sensibly * 1.15: Don't queue events to clients who open the device O_WRONLY. * Don't expect replies from clients who open the device O_RDONLY.
arch/x86/kernel/cpu/mcheck/mce_32.c +1 -1
@@ -1,6 +1,6 @@/* * mce.c - x86 Machine Check Exception Reporting -* (c) 2002 Alan Cox <[email protected]>, Dave Jones <[email protected]> +* (c) 2002 Alan Cox <[email protected]>, Dave Jones <[email protected]> */ #include <linux/init.h>
arch/x86/kernel/cpu/mcheck/mce_amd_64.c +1 -1
@@ -462,7 +462,7 @@ out_free:return err; } -static long local_allocate_threshold_blocks (void *_bank) +static __cpuinit long local_allocate_threshold_blocks (void *_bank) {unsigned int *bank = _bank;
arch/x86/kernel/cpu/mcheck/p5.c +1 -1
@@ -1,6 +1,6 @@/* * P5 specific Machine Check Exception Reporting -* (C) Copyright 2002 Alan Cox <[email protected]> +* (C) Copyright 2002 Alan Cox <[email protected]> */ #include <linux/init.h>
arch/x86/kernel/cpu/mcheck/p6.c +1 -1
@@ -1,6 +1,6 @@/* * P6 specific Machine Check Exception Reporting -* (C) Copyright 2002 Alan Cox <[email protected]> +* (C) Copyright 2002 Alan Cox <[email protected]> */ #include <linux/init.h>
arch/x86/kernel/cpu/mcheck/winchip.c +1 -1
@@ -1,6 +1,6 @@/* * IDT Winchip specific Machine Check Exception Reporting -* (C) Copyright 2002 Alan Cox <[email protected]> +* (C) Copyright 2002 Alan Cox <[email protected]> */ #include <linux/init.h>
arch/x86/kernel/head_64.S +1 -1
@@ -305,7 +305,7 @@ ENTRY(early_idt_handler) call dump_stack #ifdef CONFIG_KALLSYMS leaq early_idt_ripmsg(%rip),%rdi - movq 8(%rsp),%rsi # get rip again + movq 0(%rsp),%rsi # get rip again call __print_symbol #endif #endif /* EARLY_PRINTK */
arch/x86/kernel/i8259.c +4 -4
@@ -11,15 +11,15 @@#include <linux/kernel_stat.h> #include <linux/sysdev.h> #include <linux/bitops.h> +#include <linux/acpi.h> +#include <linux/io.h> +#include <linux/delay.h> -#include <asm/acpi.h> #include <asm/atomic.h> #include <asm/system.h> -#include <asm/io.h> #include <asm/timer.h> #include <asm/hw_irq.h> #include <asm/pgtable.h> -#include <asm/delay.h> #include <asm/desc.h> #include <asm/apic.h> #include <asm/arch_hooks.h>
@@ -323,7 +323,7 @@ void init_8259A(int auto_eoi)outb_pic (0x11 ,PIC_MASTER_CMD );/* ICW1: select 8259A-1 init */ /* ICW2: 8259A-1 IR0-7 mapped to 0x30-0x37 on x86-64, -to 0x20-0x27 on i386 */ +to 0x20-0x27 on i386 */ outb_pic (IRQ0_VECTOR ,PIC_MASTER_IMR );/* 8259A-1 (the master) has a slave on IR2 */
arch/x86/kernel/io_apic.c +0 -2
@@ -129,7 +129,6 @@ static struct irq_pin_list *get_one_free_irq_2_pin(int cpu) node =cpu_to_node (cpu); pin =kzalloc_node (sizeof (*pin),GFP_ATOMIC , node); -printk (KERN_DEBUG " alloc irq_2_pin on cpu %d node %d\n" , cpu, node);return pin; }
@@ -227,7 +226,6 @@ static struct irq_cfg *get_one_free_irq_cfg(int cpu)cpumask_clear (cfg->old_domain); } } -printk (KERN_DEBUG " alloc irq_cfg on cpu %d node %d\n" , cpu, node);return cfg; }
arch/x86/kernel/ioport.c +2 -2
@@ -35,8 +35,8 @@ static void set_bitmap(unsigned long *bitmap, unsigned int base,*/ asmlinkage long sys_ioperm (unsigned long from,unsigned long num,int turn_on) { -struct thread_struct * t = ¤t->thread; -struct tss_struct * tss; +struct thread_struct *t = ¤t->thread; +struct tss_struct *tss;unsigned int i, max_long, bytes, bytes_updated;if ((from + num <= from) || (from + num >IO_BITMAP_BITS ))
arch/x86/kernel/irq.c +1 -1
@@ -5,10 +5,10 @@#include <linux/interrupt.h> #include <linux/kernel_stat.h> #include <linux/seq_file.h> +#include <linux/smp.h> #include <asm/apic.h> #include <asm/io_apic.h> -#include <asm/smp.h> #include <asm/irq.h> atomic_t irq_err_count;
arch/x86/kernel/irq_32.c +5 -5
@@ -15,9 +15,9 @@#include <linux/notifier.h> #include <linux/cpu.h> #include <linux/delay.h> +#include <linux/uaccess.h> #include <asm/apic.h> -#include <asm/uaccess.h> DEFINE_PER_CPU_SHARED_ALIGNED (irq_cpustat_t, irq_stat);EXPORT_PER_CPU_SYMBOL (irq_stat);
@@ -93,7 +93,7 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)return 0 ;/* build the stack frame on the IRQ stack */ - isp = (u32 *) ((char *)irqctx +sizeof (*irqctx)); + isp = (u32 *) ((char *)irqctx +sizeof (*irqctx)); irqctx->tinfo.task = curctx->tinfo.task; irqctx->tinfo.previous_esp = current_stack_pointer;
@@ -137,7 +137,7 @@ void __cpuinit irq_ctx_init(int cpu) hardirq_ctx[cpu] = irqctx; - irqctx = (union irq_ctx *) &softirq_stack[cpu*THREAD_SIZE ]; + irqctx = (union irq_ctx *) &softirq_stack[cpu*THREAD_SIZE ]; irqctx->tinfo.task =NULL ; irqctx->tinfo.exec_domain =NULL ; irqctx->tinfo.cpu = cpu;
@@ -147,7 +147,7 @@ void __cpuinit irq_ctx_init(int cpu) softirq_ctx[cpu] = irqctx;printk (KERN_DEBUG "CPU %u irqstacks, hard=%p soft=%p\n" , - cpu,hardirq_ctx[cpu],softirq_ctx[cpu]); + cpu, hardirq_ctx[cpu], softirq_ctx[cpu]); }void irq_ctx_exit (int cpu)
@@ -174,7 +174,7 @@ asmlinkage void do_softirq(void) irqctx->tinfo.previous_esp = current_stack_pointer;/* build the stack frame on the softirq stack */ - isp = (u32 *) ((char *)irqctx +sizeof (*irqctx)); + isp = (u32 *) ((char *)irqctx +sizeof (*irqctx));call_on_stack (__do_softirq, isp);/*
arch/x86/kernel/irq_64.c +11 -11
@@ -14,10 +14,10 @@#include <linux/module.h> #include <linux/delay.h> #include <linux/ftrace.h> -#include <asm/uaccess.h> +#include <linux/uaccess.h> +#include <linux/smp.h> #include <asm/io_apic.h> #include <asm/idle.h> -#include <asm/smp.h> /* * Probabilistic stack overflow check:
@@ -142,18 +142,18 @@ extern void call_softirq(void); asmlinkage void do_softirq(void) { -__u32 pending; -unsigned long flags; +__u32 pending; +unsigned long flags; -if (in_interrupt ()) -return ; +if (in_interrupt ()) +return ; -local_irq_save (flags); - pending =local_softirq_pending (); -/* Switch to interrupt stack */ -if (pending) { +local_irq_save (flags); + pending =local_softirq_pending (); +/* Switch to interrupt stack */ +if (pending) {call_softirq ();WARN_ON_ONCE (softirq_count ()); } -local_irq_restore (flags); +local_irq_restore (flags); }
arch/x86/kernel/irqinit_32.c +5 -7
@@ -9,18 +9,18 @@#include <linux/kernel_stat.h> #include <linux/sysdev.h> #include <linux/bitops.h> +#include <linux/io.h> +#include <linux/delay.h> #include <asm/atomic.h> #include <asm/system.h> -#include <asm/io.h> #include <asm/timer.h> #include <asm/pgtable.h> -#include <asm/delay.h> #include <asm/desc.h> #include <asm/apic.h> #include <asm/arch_hooks.h> #include <asm/i8259.h> - +#include <asm/traps.h> /*
@@ -34,12 +34,10 @@* leads to races. IBM designers who came up with it should * be shot. */ -static irqreturn_t math_error_irq (int cpl,void *dev_id) { -extern void math_error (void __user *); -outb (0 ,0xF0 ); +outb (0 ,0xF0 );if (ignore_fpu_irq || !boot_cpu_data.hard_math)return IRQ_NONE ;math_error ((void __user *)get_irq_regs ()->ip);
@@ -56,7 +54,7 @@ static struct irqaction fpu_irq = { .name = "fpu", }; -void __init init_ISA_irqs (void ) +void __init init_ISA_irqs (void ) {int i;
arch/x86/kernel/irqinit_64.c +4 -4
@@ -11,14 +11,14 @@#include <linux/kernel_stat.h> #include <linux/sysdev.h> #include <linux/bitops.h> +#include <linux/acpi.h> +#include <linux/io.h> +#include <linux/delay.h> -#include <asm/acpi.h> #include <asm/atomic.h> #include <asm/system.h> -#include <asm/io.h> #include <asm/hw_irq.h> #include <asm/pgtable.h> -#include <asm/delay.h> #include <asm/desc.h> #include <asm/apic.h> #include <asm/i8259.h>
@@ -81,7 +81,7 @@ int vector_used_by_percpu_irq(unsigned int vector)return 0 ; } -void __init init_ISA_irqs (void ) +static void __init init_ISA_irqs (void ) {int i;
arch/x86/kernel/mpparse.c +168 -182
737 lines not on this page · raw message
arch/x86/kernel/nmi.c +0 -1
@@ -26,7 +26,6 @@#include <linux/kernel_stat.h> #include <linux/kdebug.h> #include <linux/smp.h> -#include <linux/nmi.h> #include <asm/i8259.h> #include <asm/io_apic.h>
arch/x86/kernel/numaq_32.c +18 -20
@@ -117,16 +117,15 @@ static inline int generate_logical_apicid(int quad, int phys_apicid) }/* x86_quirks member */ -static int mpc_apic_id (struct mpc_config_processor *m) +static int mpc_apic_id (struct mpc_cpu *m) {int quad = translation_table[mpc_record]->trans_quad; -int logical_apicid =generate_logical_apicid (quad, m->mpc_apicid); +int logical_apicid =generate_logical_apicid (quad, m->apicid);printk (KERN_DEBUG "Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n" , - m->mpc_apicid, - (m->mpc_cpufeature &CPU_FAMILY_MASK ) >>8 , - (m->mpc_cpufeature &CPU_MODEL_MASK ) >>4 , - m->mpc_apicver, quad, logical_apicid); + m->apicid, (m->cpufeature &CPU_FAMILY_MASK ) >>8 , + (m->cpufeature &CPU_MODEL_MASK ) >>4 , + m->apicver, quad, logical_apicid);return logical_apicid; }
@@ -135,26 +134,26 @@ int mp_bus_id_to_node[MAX_MP_BUSSES];int mp_bus_id_to_local[MAX_MP_BUSSES ];/* x86_quirks member */ -static void mpc_oem_bus_info (struct mpc_config_bus *m,char *name) +static void mpc_oem_bus_info (struct mpc_bus *m,char *name) {int quad = translation_table[mpc_record]->trans_quad;int local = translation_table[mpc_record]->trans_local; - mp_bus_id_to_node[m->mpc_busid] = quad; - mp_bus_id_to_local[m->mpc_busid] = local; + mp_bus_id_to_node[m->busid] = quad; + mp_bus_id_to_local[m->busid] = local;printk (KERN_INFO "Bus #%d is %s (node %d)\n" , - m->mpc_busid, name, quad); + m->busid, name, quad); }int quad_local_to_mp_bus_id [NR_CPUS /4 ][4 ];/* x86_quirks member */ -static void mpc_oem_pci_bus (struct mpc_config_bus *m) +static void mpc_oem_pci_bus (struct mpc_bus *m) {int quad = translation_table[mpc_record]->trans_quad;int local = translation_table[mpc_record]->trans_local; - quad_local_to_mp_bus_id[quad][local] = m->mpc_busid; + quad_local_to_mp_bus_id[quad][local] = m->busid; }static void __init MP_translation_info (struct mpc_config_translation *m)
@@ -186,7 +185,7 @@ static int __init mpf_checksum(unsigned char *mp, int len)* Read/parse the MPC oem tables */ -static void __init smp_read_mpc_oem (struct mp_config_oemtable *oemtable, +static void __init smp_read_mpc_oem (struct mpc_oemtable *oemtable,unsigned short oemsize) {int count =sizeof (*oemtable);/* the header size */
@@ -195,18 +194,18 @@ static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable, mpc_record =0 ;printk (KERN_INFO "Found an OEM MPC table at %8p - parsing it ... \n" , oemtable); -if (memcmp (oemtable->oem_signature,MPC_OEM_SIGNATURE ,4 )) { +if (memcmp (oemtable->signature,MPC_OEM_SIGNATURE ,4 )) {printk (KERN_WARNING "SMP mpc oemtable: bad signature [%c%c%c%c]!\n" , - oemtable->oem_signature[0 ], oemtable->oem_signature[1 ], - oemtable->oem_signature[2 ], oemtable->oem_signature[3 ]); + oemtable->signature[0 ], oemtable->signature[1 ], + oemtable->signature[2 ], oemtable->signature[3 ]);return ; } -if (mpf_checksum ((unsigned char *)oemtable, oemtable->oem_length)) { +if (mpf_checksum ((unsigned char *)oemtable, oemtable->length)) {printk (KERN_WARNING "SMP oem mptable: checksum error!\n" );return ; } -while (count < oemtable->oem_length) { +while (count < oemtable->length) {switch (*oemptr) {case MP_TRANSLATION : {
@@ -260,8 +259,7 @@ static struct x86_quirks numaq_x86_quirks __initdata = { .update_genapic = numaq_update_genapic, }; -void numaq_mps_oem_check (struct mp_config_table *mpc,char *oem, -char *productid) +void numaq_mps_oem_check (struct mpc_table *mpc,char *oem,char *productid) {if (strncmp (oem,"IBM NUMA" ,8 ))printk ("Warning! Not a NUMA-Q system!\n" );
arch/x86/kernel/process_32.c +9 -10
@@ -39,11 +39,12 @@#include <linux/prctl.h> #include <linux/dmi.h> #include <linux/ftrace.h> +#include <linux/uaccess.h> +#include <linux/io.h> +#include <linux/kdebug.h> -#include <asm/uaccess.h> #include <asm/pgtable.h> #include <asm/system.h> -#include <asm/io.h> #include <asm/ldt.h> #include <asm/processor.h> #include <asm/i387.h>
@@ -56,10 +57,8 @@#include <asm/tlbflush.h> #include <asm/cpu.h> -#include <asm/kdebug.h> #include <asm/idle.h> #include <asm/syscalls.h> -#include <asm/smp.h> #include <asm/ds.h> asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
@@ -205,7 +204,7 @@ extern void kernel_thread_helper(void);/* * Create a kernel thread */ -int kernel_thread (int (*fn)(void *),void * arg,unsigned long flags) +int kernel_thread (int (*fn)(void *),void *arg,unsigned long flags) {struct pt_regs regs;
@@ -266,7 +265,7 @@ void flush_thread(void) tsk->thread.debugreg3 =0 ; tsk->thread.debugreg6 =0 ; tsk->thread.debugreg7 =0 ; -memset (tsk->thread.tls_array,0 ,sizeof (tsk->thread.tls_array)); +memset (tsk->thread.tls_array,0 ,sizeof (tsk->thread.tls_array));clear_tsk_thread_flag (tsk,TIF_DEBUG );/* * Forget coprocessor state..
@@ -293,9 +292,9 @@ void prepare_to_copy(struct task_struct *tsk)int copy_thread (int nr,unsigned long clone_flags,unsigned long sp,unsigned long unused, -struct task_struct * p,struct pt_regs * regs) +struct task_struct *p,struct pt_regs *regs) { -struct pt_regs * childregs; +struct pt_regs *childregs;struct task_struct *tsk;int err;
@@ -347,7 +346,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,void start_thread (struct pt_regs *regs,unsigned long new_ip,unsigned long new_sp) { - __asm__("movl %0, %%gs" ::"r" (0 )); + __asm__("movl %0, %%gs" : :"r" (0 )); regs->fs =0 ;set_fs (USER_DS ); regs->ds = __USER_DS;
@@ -638,7 +637,7 @@ asmlinkage int sys_vfork(struct pt_regs regs) asmlinkage int sys_execve(struct pt_regs regs) {int error; -char * filename; +char *filename; filename =getname ((char __user *) regs.bx); error =PTR_ERR (filename);
arch/x86/kernel/setup_percpu.c +5 -6
@@ -5,12 +5,11 @@#include <linux/percpu.h> #include <linux/kexec.h> #include <linux/crash_dump.h> -#include <asm/smp.h> -#include <asm/percpu.h> +#include <linux/smp.h> +#include <linux/topology.h> #include <asm/sections.h> #include <asm/processor.h> #include <asm/setup.h> -#include <asm/topology.h> #include <asm/mpspec.h> #include <asm/apicdef.h> #include <asm/highmem.h>
@@ -20,8 +19,8 @@ unsigned int num_processors;unsigned disabled_cpus__cpuinitdata ;/* Processor that is doing the boot up */ unsigned int boot_cpu_physical_apicid =-1U ; -unsigned int max_physical_apicid;EXPORT_SYMBOL (boot_cpu_physical_apicid); +unsigned int max_physical_apicid;/* Bitmask of physically existing CPUs */ physid_mask_t phys_cpu_present_map;
@@ -280,8 +279,8 @@ static void __cpuinit numa_set_cpumask(int cpu, int enable)cpulist_scnprintf (buf,sizeof (buf), mask);printk (KERN_DEBUG "%s cpu %d node %d: mask now %s\n" , - enable?"numa_add_cpu" :"numa_remove_cpu" , cpu, node, buf); - } + enable ?"numa_add_cpu" :"numa_remove_cpu" , cpu, node, buf); +}void __cpuinit numa_add_cpu (int cpu) {
arch/x86/kernel/smp.c +1 -1
@@ -1,7 +1,7 @@/* * Intel SMP support routines. * -* (c) 1995 Alan Cox, Building #3 <[email protected]> +* (c) 1995 Alan Cox, Building #3 <[email protected]> * (c) 1998-99, 2000 Ingo Molnar <[email protected]> * (c) 2002,2003 Andi Kleen, SuSE Labs. *
arch/x86/kernel/smpboot.c +1 -1
@@ -1,7 +1,7 @@/* * x86 SMP booting functions * -* (c) 1995 Alan Cox, Building #3 <[email protected]> +* (c) 1995 Alan Cox, Building #3 <[email protected]> * (c) 1998, 1999, 2000 Ingo Molnar <[email protected]> * Copyright 2001 Andi Kleen, SuSE Labs. *
arch/x86/kernel/time_32.c +2 -2
@@ -105,8 +105,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)high bit of the PPI port B (0x61). Note that some PS/2s, notably the 55SX, work fine if this is removed. */ -u8 irq_v =inb_p (0x61 );/* read the current state */ - outb_p( irq_v|0x80, 0x61 ); /* reset the IRQ */ +u8 irq_v =inb_p (0x61 );/* read the current state */ + outb_p(irq_v | 0x80, 0x61); /* reset the IRQ */ }#endif
arch/x86/kernel/time_64.c +1 -1
@@ -17,10 +17,10 @@#include <linux/module.h> #include <linux/time.h> #include <linux/mca.h> +#include <linux/nmi.h> #include <asm/i8253.h> #include <asm/hpet.h> -#include <asm/nmi.h> #include <asm/vgtod.h> #include <asm/time.h> #include <asm/timer.h>
arch/x86/kernel/traps.c +0 -3
@@ -65,9 +65,6 @@#else #include <asm/processor-flags.h> #include <asm/arch_hooks.h> -#include <asm/nmi.h> -#include <asm/smp.h> -#include <asm/io.h> #include <asm/traps.h> #include "cpu/mcheck/mce.h"
arch/x86/kernel/visws_quirks.c +15 -17
@@ -176,33 +176,31 @@ static int __init visws_get_smp_config(unsigned int early)* No problem for Linux. */ -static void __init MP_processor_info (struct mpc_config_processor *m) +static void __init MP_processor_info (struct mpc_cpu *m) {int ver, logical_apicid;physid_mask_t apic_cpus; -if (!(m->mpc_cpuflag &CPU_ENABLED )) +if (!(m->cpuflag &CPU_ENABLED ))return ; - logical_apicid = m->mpc_apicid; + logical_apicid = m->apicid;printk (KERN_INFO "%sCPU #%d %u:%u APIC version %d\n" , - m->mpc_cpuflag &CPU_BOOTPROCESSOR ?"Bootup " :"" , - m->mpc_apicid, - (m->mpc_cpufeature &CPU_FAMILY_MASK ) >>8 , - (m->mpc_cpufeature &CPU_MODEL_MASK ) >>4 , - m->mpc_apicver); + m->cpuflag &CPU_BOOTPROCESSOR ?"Bootup " :"" , + m->apicid, (m->cpufeature &CPU_FAMILY_MASK ) >>8 , + (m->cpufeature &CPU_MODEL_MASK ) >>4 , m->apicver); -if (m->mpc_cpuflag &CPU_BOOTPROCESSOR ) - boot_cpu_physical_apicid = m->mpc_apicid; +if (m->cpuflag &CPU_BOOTPROCESSOR ) + boot_cpu_physical_apicid = m->apicid; - ver = m->mpc_apicver; -if ((ver >=0x14 && m->mpc_apicid >=0xff ) || m->mpc_apicid >=0xf ) { + ver = m->apicver; +if ((ver >=0x14 && m->apicid >=0xff ) || m->apicid >=0xf ) {printk (KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n" , - m->mpc_apicid,MAX_APICS ); + m->apicid,MAX_APICS );return ; } - apic_cpus =apicid_to_cpu_present (m->mpc_apicid); + apic_cpus =apicid_to_cpu_present (m->apicid);physids_or (phys_cpu_present_map, phys_cpu_present_map, apic_cpus);/* * Validate version
@@ -210,15 +208,15 @@ static void __init MP_processor_info(struct mpc_config_processor *m)if (ver ==0x0 ) {printk (KERN_ERR "BIOS bug, APIC version is 0 for CPU#%d! " "fixing up to 0x10. (tell your hw vendor)\n" , - m->mpc_apicid); + m->apicid); ver =0x10 ; } - apic_version[m->mpc_apicid] = ver; + apic_version[m->apicid] = ver; }static int __init visws_find_smp_config (unsigned int reserve) { -struct mpc_config_processor *mp =phys_to_virt (CO_CPU_TAB_PHYS ); +struct mpc_cpu *mp =phys_to_virt (CO_CPU_TAB_PHYS );unsigned short ncpus =readw (phys_to_virt (CO_CPU_NUM_PHYS ));if (ncpus >CO_CPU_MAX ) {
arch/x86/mach-generic/es7000.c +5 -5
@@ -43,12 +43,12 @@ static void __init enable_apic_mode(void)return ; } -static __init int mps_oem_check (struct mp_config_table *mpc,char *oem, -char *productid) +static __init int +mps_oem_check (struct mpc_table *mpc,char *oem,char *productid) { -if (mpc->mpc_oemptr) { -struct mp_config_oemtable *oem_table = - (struct mp_config_oemtable *)mpc->mpc_oemptr; +if (mpc->oemptr) { +struct mpc_oemtable *oem_table = + (struct mpc_oemtable *)mpc->oemptr;if (!strncmp (oem,"UNISYS" ,6 ))return parse_unisys_oem ((char *)oem_table); }
arch/x86/mach-generic/numaq.c +1 -2
@@ -19,8 +19,7 @@#include <asm/numaq/wakecpu.h> #include <asm/numaq.h> -static int mps_oem_check (struct mp_config_table *mpc,char *oem, -char *productid) +static int mps_oem_check (struct mpc_table *mpc,char *oem,char *productid) {numaq_mps_oem_check (mpc, oem, productid);return found_numaq;
arch/x86/mach-generic/probe.c +1 -2
@@ -110,8 +110,7 @@ void __init generic_apic_probe(void)/* These functions can switch the APIC even after the initial ->probe() */ -int __init mps_oem_check (struct mp_config_table *mpc,char *oem, -char *productid) +int __init mps_oem_check (struct mpc_table *mpc,char *oem,char *productid) {int i;for (i =0 ; apic_probe[i]; ++i) {
arch/x86/mm/k8topology_64.c +9 -11
@@ -81,7 +81,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end)unsigned numnodes, cores, bits, apicid_base;unsigned long prevbase;struct bootnode nodes[8 ]; -unsigned char nodeids[8 ];int i, j, nb, found =0 ;u32 nodeid, reg;
@@ -110,7 +109,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) limit =read_pci_config (0 , nb,1 ,0x44 + i*8 ); nodeid = limit &7 ; - nodeids[i] = nodeid;if ((base &3 ) ==0 ) {if (i < numnodes)printk ("Skipping disabled node %d\n" , i);
@@ -179,9 +177,6 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) nodes[nodeid].start = base; nodes[nodeid].end = limit; -e820_register_active_regions (nodeid, - nodes[nodeid].start >>PAGE_SHIFT , - nodes[nodeid].end >>PAGE_SHIFT ); prevbase = base;
@@ -211,12 +206,15 @@ int __init k8_scan_nodes(unsigned long start, unsigned long end) }for (i =0 ; i <8 ; i++) { -if (nodes[i].start != nodes[i].end) { - nodeid = nodeids[i]; -for (j = apicid_base; j < cores + apicid_base; j++) - apicid_to_node[(nodeid << bits) + j] = i; -setup_node_bootmem (i, nodes[i].start, nodes[i].end); - } +if (nodes[i].start == nodes[i].end) +continue ; + +e820_register_active_regions (i, + nodes[i].start >>PAGE_SHIFT , + nodes[i].end >>PAGE_SHIFT ); +for (j = apicid_base; j < cores + apicid_base; j++) + apicid_to_node[(i << bits) + j] = i; +setup_node_bootmem (i, nodes[i].start, nodes[i].end); }numa_init_array ();
lib/Kconfig.debug +8 -8
@@ -566,14 +566,14 @@ config DEBUG_NOTIFIERS config FRAME_POINTER bool "Compile the kernel with frame pointers" depends on DEBUG_KERNEL && \ - (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ - AVR32 || SUPERH || BLACKFIN || MN10300) - default y if DEBUG_INFO && UML - help - If you say Y here the resulting kernel image will be slightly larger - and slower, but it might give very useful debugging information on - some architectures or if you use external debuggers. - If you don't debug the kernel, you can say N. + (CRIS || M68K || M68KNOMMU || FRV || UML || S390 || \ + AVR32 || SUPERH || BLACKFIN || MN10300) || \ + ARCH_WANT_FRAME_POINTERS + default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS + help + If you say Y here the resulting kernel image will be slightly + larger and slower, but it gives very useful debugging information + in case of kernel bugs. (precise oopses/stacktraces/warnings) config BOOT_PRINTK_DELAY bool "Delay each boot printk message by N milliseconds"