x86/mce changes for v3.1
Linus,
Please pull the latest x86-mce-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-mce-for-linus
Thanks,
Ingo
------------------>
Hidetoshi Seto (11):
x86, mce, severity: Make formatting a bit more readable x86, mce, severity: Cleanup severity table
x86, mce, severity: Clean up trivial coding style problems x86, mce: Replace MCE_SELF_VECTOR by irq_work x86, mce: Replace MCM_ with MCI_MISC_
x86, mce: Introduce mce_gather_info()
x86, mce: Check the result of ancient_init() x86, mce: Cleanup mce_create()/remove_device() x86, mce: Cleanup mce_read()
x86, mce: Use mce_chrdev_ prefix to group functions x86, mce: Use mce_sysdev_ prefix to group functions
Tony Luck (1):
x86, mce, severity: Fix two severities table signatures
arch/x86/include/asm/entry_arch.h | 4 - arch/x86/include/asm/hw_irq.h | 1 - arch/x86/include/asm/irq_vectors.h | 5 - arch/x86/include/asm/mce.h | 19 ++- arch/x86/kernel/cpu/mcheck/mce-severity.c | 152 ++++++++++------ arch/x86/kernel/cpu/mcheck/mce.c | 288 ++++++++++++++--------------- arch/x86/kernel/cpu/mcheck/mce_amd.c | 10 +- arch/x86/kernel/entry_64.S | 5 - arch/x86/kernel/irqinit.c | 3 - 9 files changed, 251 insertions(+), 236 deletions(-)
arch/x86/include/asm/entry_arch.h +0 -4
@@ -53,8 +53,4 @@ BUILD_INTERRUPT(thermal_interrupt,THERMAL_APIC_VECTOR) BUILD_INTERRUPT(threshold_interrupt,THRESHOLD_APIC_VECTOR)#endif -#ifdef CONFIG_X86_MCE -BUILD_INTERRUPT(mce_self_interrupt,MCE_SELF_VECTOR) -#endif -#endif
arch/x86/include/asm/hw_irq.h +0 -1
@@ -34,7 +34,6 @@ extern void irq_work_interrupt(void);extern void spurious_interrupt (void );extern void thermal_interrupt (void );extern void reschedule_interrupt (void ); -extern void mce_self_interrupt (void );extern void invalidate_interrupt (void );extern void invalidate_interrupt0 (void );
arch/x86/include/asm/irq_vectors.h +0 -5
@@ -109,11 +109,6 @@#define UV_BAU_MESSAGE 0xf5 -/* -* Self IPI vector for machine checks -*/ -#define MCE_SELF_VECTOR 0xf4 -/* Xen vector callback to receive events in a HVM domain */ #define XEN_HVM_EVTCHN_CALLBACK 0xf3
arch/x86/include/asm/mce.h +12 -7
@@ -8,6 +8,7 @@* Machine Check support for x86 */ +/* MCG_CAP register defines */ #define MCG_BANKCNT_MASK 0xff/* Number of Banks */ #define MCG_CTL_P (1ULL<<8)/* MCG_CTL register available */ #define MCG_EXT_P (1ULL<<9)/* Extended registers available */
@@ -17,10 +18,12 @@#define MCG_EXT_CNT (c) (((c) & MCG_EXT_CNT_MASK) >> MCG_EXT_CNT_SHIFT)#define MCG_SER_P (1ULL<<24)/* MCA recovery/new status bits */ +/* MCG_STATUS register defines */ #define MCG_STATUS_RIPV (1ULL<<0)/* restart ip valid */ #define MCG_STATUS_EIPV (1ULL<<1)/* ip points to correct instruction */ #define MCG_STATUS_MCIP (1ULL<<2)/* machine check in progress */ +/* MCi_STATUS register defines */ #define MCI_STATUS_VAL (1ULL<<63)/* valid error */ #define MCI_STATUS_OVER (1ULL<<62)/* previous errors lost */ #define MCI_STATUS_UC (1ULL<<61)/* uncorrected error */
@@ -31,12 +34,14 @@#define MCI_STATUS_S (1ULL<<56)/* Signaled machine check */ #define MCI_STATUS_AR (1ULL<<55)/* Action required */ -/* MISC register defines */ -#define MCM_ADDR_SEGOFF 0/* segment offset */ -#define MCM_ADDR_LINEAR 1/* linear address */ -#define MCM_ADDR_PHYS 2/* physical address */ -#define MCM_ADDR_MEM 3/* memory address */ -#define MCM_ADDR_GENERIC 7/* generic */ +/* MCi_MISC register defines */ +#define MCI_MISC_ADDR_LSB (m) ((m) & 0x3f) +#define MCI_MISC_ADDR_MODE (m) (((m) >> 6) & 7) +#define MCI_MISC_ADDR_SEGOFF 0/* segment offset */ +#define MCI_MISC_ADDR_LINEAR 1/* linear address */ +#define MCI_MISC_ADDR_PHYS 2/* physical address */ +#define MCI_MISC_ADDR_MEM 3/* memory address */ +#define MCI_MISC_ADDR_GENERIC 7/* generic */ /* CTL2 register defines */ #define MCI_CTL2_CMCI_EN (1ULL << 30)
@@ -144,7 +149,7 @@ static inline void enable_p5_mce(void) {}void mce_setup (struct mce *m);void mce_log (struct mce *m); -DECLARE_PER_CPU(struct sys_device, mce_dev); +DECLARE_PER_CPU(struct sys_device, mce_sysdev);/* * Maximum banks number.
arch/x86/kernel/cpu/mcheck/mce-severity.c +98 -54
193 lines not on this page · raw message
arch/x86/kernel/cpu/mcheck/mce.c +136 -152
605 lines not on this page · raw message
arch/x86/kernel/cpu/mcheck/mce_amd.c +5 -5
@@ -548,7 +548,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)if (!b) goto out; - err =sysfs_create_link (&per_cpu (mce_dev, cpu).kobj, + err =sysfs_create_link (&per_cpu (mce_sysdev, cpu).kobj, b->kobj, name);if (err) goto out;
@@ -571,7 +571,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) goto out; } - b->kobj =kobject_create_and_add (name, &per_cpu (mce_dev, cpu).kobj); + b->kobj =kobject_create_and_add (name, &per_cpu (mce_sysdev, cpu).kobj);if (!b->kobj) goto out_free;
@@ -591,7 +591,7 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank)if (i == cpu)continue ; - err =sysfs_create_link (&per_cpu (mce_dev, i).kobj, + err =sysfs_create_link (&per_cpu (mce_sysdev, i).kobj, b->kobj, name);if (err) goto out;
@@ -669,7 +669,7 @@ static void threshold_remove_bank(unsigned int cpu, int bank)#ifdef CONFIG_SMP /* sibling symlink */ if (shared_bank[bank] && b->blocks->cpu != cpu) { -sysfs_remove_link (&per_cpu (mce_dev, cpu).kobj, name); +sysfs_remove_link (&per_cpu (mce_sysdev, cpu).kobj, name);per_cpu (threshold_banks, cpu)[bank] =NULL ;return ;
@@ -681,7 +681,7 @@ static void threshold_remove_bank(unsigned int cpu, int bank)if (i == cpu)continue ; -sysfs_remove_link (&per_cpu (mce_dev, i).kobj, name); +sysfs_remove_link (&per_cpu (mce_sysdev, i).kobj, name);per_cpu (threshold_banks, i)[bank] =NULL ; }
arch/x86/kernel/entry_64.S +0 -5
@@ -991,11 +991,6 @@ apicinterrupt THRESHOLD_APIC_VECTOR \ apicinterrupt THERMAL_APIC_VECTOR \ thermal_interrupt smp_thermal_interrupt -#ifdef CONFIG_X86_MCE -apicinterrupt MCE_SELF_VECTOR \ - mce_self_interrupt smp_mce_self_interrupt -#endif - #ifdef CONFIG_SMP apicinterrupt CALL_FUNCTION_SINGLE_VECTOR \ call_function_single_interrupt smp_call_function_single_interrupt
arch/x86/kernel/irqinit.c +0 -3
@@ -272,9 +272,6 @@ static void __init apic_intr_init(void)#ifdef CONFIG_X86_MCE_THRESHOLD alloc_intr_gate (THRESHOLD_APIC_VECTOR , threshold_interrupt);#endif -#if defined(CONFIG_X86_MCE ) && defined(CONFIG_X86_LOCAL_APIC ) -alloc_intr_gate (MCE_SELF_VECTOR , mce_self_interrupt); -#endif #if defined(CONFIG_X86_64 ) || defined(CONFIG_X86_LOCAL_APIC )/* self generated IPI for local APIC timer */