x86 fixes for 3.7
Subsystems (4)
Linus,
please pull the latest x86-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-urgent-for-linus
* Fix problem in CMCI rediscovery code that was illegally migrating worker threads to other cpus.
* Disable way access filter on AMD Piledriver (performance regression)
* A few CE4100 platform fixes
* A few mail address changes (also in drivers/edac/)
Thanks,
tglx
------------------>
Andre Przywara (1):
x86, amd: Disable way access filter on Piledriver CPUs
Andreas Herrmann (1):
x86, microcode_amd: Change email addresses, MAINTAINERS entry
Borislav Petkov (3):
x86, AMD: Change Boris' email address
EDAC: Change Boris' email address
MAINTAINERS: Change Boris' email address
Florian Fainelli (1):
x86/ce4100: Fix pm_poweroff
Maxime Bizon (2):
x86/ce4100: Fix reboot by forcing the reboot method to be KBD x86/ce4100: Fix PCI configuration register access for devices without interrupts
Robert Richter (1):
MAINTAINERS: Update email address for Robert Richter
Tang Chen (1):
x86/mce: Do not change worker's running cpu in cmci_rediscover().
MAINTAINERS | 14 +++++++------- arch/x86/kernel/cpu/amd.c | 14 ++++++++++++++ arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 +- arch/x86/kernel/cpu/mcheck/mce_intel.c | 31 ++++++++++++++++++------------- arch/x86/kernel/microcode_amd.c | 4 ++-- arch/x86/pci/ce4100.c | 13 +++++++++++++ arch/x86/platform/ce4100/ce4100.c | 24 ++++++++++++++++++++++++ drivers/edac/amd64_edac.h | 2 +- drivers/edac/edac_stub.c | 2 +- drivers/edac/mce_amd_inj.c | 4 ++-- 10 files changed, 83 insertions(+), 27 deletions(-)
MAINTAINERS +7 -7
@@ -534,9 +534,9 @@ F: drivers/iommu/amd_iommu*.[ch] F: include/linux/amd-iommu.h AMD MICROCODE UPDATE SUPPORT -M: Andreas Herrmann <[email protected]> +M: Andreas Herrmann <[email protected]> L: [email protected] -S: Supported +S: Maintained F: arch/x86/kernel/microcode_amd.c AMS (Apple Motion Sensor) DRIVER
@@ -2707,10 +2707,10 @@ F: include/linux/edac.h EDAC-AMD64 M: Doug Thompson <[email protected]> -M: Borislav Petkov <[email protected]> +M: Borislav Petkov <[email protected]> L: [email protected] W: bluesmoke.sourceforge.net -S: Supported +S: Maintained F: drivers/edac/amd64_edac* EDAC-E752X
@@ -3703,7 +3703,7 @@ S: Maintained F: drivers/platform/x86/ideapad-laptop.c IDE/ATAPI DRIVERS -M: Borislav Petkov <[email protected]> +M: Borislav Petkov <[email protected]> L: [email protected] S: Maintained F: Documentation/cdrom/ide-cd
@@ -5363,7 +5363,7 @@ S: Maintained F: sound/drivers/opl4/ OPROFILE -M: Robert Richter <[email protected]> +M: Robert Richter <[email protected]> L: [email protected] S: Maintained F: arch/*/include/asm/oprofile*.h
@@ -8147,7 +8147,7 @@ F: drivers/platform/x86 X86 MCE INFRASTRUCTURE M: Tony Luck <[email protected]> -M: Borislav Petkov <[email protected]> +M: Borislav Petkov <[email protected]> L: [email protected] S: Maintained F: arch/x86/kernel/cpu/mcheck/*
arch/x86/kernel/cpu/amd.c +14 -0
@@ -631,6 +631,20 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) } } +/* +* The way access filter has a performance penalty on some workloads. +* Disable it on the affected CPUs. +*/ +if ((c->x86 ==0x15 ) && + (c->x86_model >=0x02 ) && (c->x86_model <0x20 )) { +u64 val; + +if (!rdmsrl_safe (0xc0011021 , &val) && !(val &0x1E )) { + val |=0x1E ; +wrmsrl_safe (0xc0011021 , val); + } + } +cpu_detect_cache_sizes (c);/* Multi core CPU? */
arch/x86/kernel/cpu/mcheck/mce_amd.c +1 -1
@@ -6,7 +6,7 @@* * Written by Jacob Shin - AMD, Inc. * -* Support: [email protected] +* Maintained by: Borislav Petkov <[email protected]> * * April 2006 * - added support for AMD Family 0x10 processors
arch/x86/kernel/cpu/mcheck/mce_intel.c +18 -13
@@ -285,34 +285,39 @@ void cmci_clear(void)raw_spin_unlock_irqrestore (&cmci_discover_lock, flags); } +static long cmci_rediscover_work_func (void *arg) +{ +int banks; + +/* Recheck banks in case CPUs don't all have the same */ +if (cmci_supported (&banks)) +cmci_discover (banks); + +return 0 ; +} +/* * After a CPU went down cycle through all the others and rediscover * Must run in process context. */ void cmci_rediscover (int dying) { -int banks; -int cpu; -cpumask_var_t old; +int cpu, banks;if (!cmci_supported (&banks))return ; -if (!alloc_cpumask_var (&old,GFP_KERNEL )) -return ; -cpumask_copy (old, ¤t->cpus_allowed);for_each_online_cpu (cpu) {if (cpu == dying)continue ; -if (set_cpus_allowed_ptr (current,cpumask_of (cpu))) + +if (cpu ==smp_processor_id ()) { +cmci_rediscover_work_func (NULL );continue ; -/* Recheck banks in case CPUs don't all have the same */ -if (cmci_supported (&banks)) -cmci_discover (banks); - } + } -set_cpus_allowed_ptr (current, old); -free_cpumask_var (old); +work_on_cpu (cpu, cmci_rediscover_work_func,NULL ); + } }/*
arch/x86/kernel/microcode_amd.c +2 -2
@@ -8,8 +8,8 @@* Tigran Aivazian <[email protected]> * * Maintainers: -* Andreas Herrmann <[email protected]> -* Borislav Petkov <[email protected]> +* Andreas Herrmann <[email protected]> +* Borislav Petkov <[email protected]> * * This driver allows to upgrade microcode on F10h AMD * CPUs and later.
arch/x86/pci/ce4100.c +13 -0
@@ -115,6 +115,16 @@ static void sata_revid_read(struct sim_dev_reg *reg, u32 *value)reg_read (reg, value); } +static void reg_noirq_read (struct sim_dev_reg *reg,u32 *value) +{ +unsigned long flags; + +raw_spin_lock_irqsave (&pci_config_lock, flags); +/* force interrupt pin value to 0 */ + *value = reg->sim_reg.value &0xfff00ff ; +raw_spin_unlock_irqrestore (&pci_config_lock, flags); +} +static struct sim_dev_reg bus1_fixups[] = { DEFINE_REG(2, 0, 0x10, (16*MB), reg_init, reg_read, reg_write)DEFINE_REG (2 ,0 ,0x14 , (256 ), reg_init, reg_read, reg_write)
@@ -144,6 +154,7 @@ static struct sim_dev_reg bus1_fixups[] = { DEFINE_REG(11, 5, 0x10, (64*KB), reg_init, reg_read, reg_write) DEFINE_REG(11, 6, 0x10, (256), reg_init, reg_read, reg_write) DEFINE_REG(11, 7, 0x10, (64*KB), reg_init, reg_read, reg_write) + DEFINE_REG(11, 7, 0x3c, 256, reg_init, reg_noirq_read, reg_write) DEFINE_REG(12, 0, 0x10, (128*KB), reg_init, reg_read, reg_write) DEFINE_REG(12, 0, 0x14, (256), reg_init, reg_read, reg_write)DEFINE_REG (12 ,1 ,0x10 , (1024 ), reg_init, reg_read, reg_write)
@@ -161,8 +172,10 @@ static struct sim_dev_reg bus1_fixups[] = { DEFINE_REG(16, 0, 0x10, (64*KB), reg_init, reg_read, reg_write) DEFINE_REG(16, 0, 0x14, (64*MB), reg_init, reg_read, reg_write) DEFINE_REG(16, 0, 0x18, (64*MB), reg_init, reg_read, reg_write) + DEFINE_REG(16, 0, 0x3c, 256, reg_init, reg_noirq_read, reg_write) DEFINE_REG(17, 0, 0x10, (128*KB), reg_init, reg_read, reg_write) DEFINE_REG(18, 0, 0x10, (1*KB), reg_init, reg_read, reg_write) + DEFINE_REG(18, 0, 0x3c, 256, reg_init, reg_noirq_read, reg_write) };static void __init init_sim_regs (void )
arch/x86/platform/ce4100/ce4100.c +24 -0
@@ -21,12 +21,25 @@#include <asm/i8259.h> #include <asm/io.h> #include <asm/io_apic.h> +#include <asm/emergency-restart.h> static int ce4100_i8042_detect (void ) {return 0 ; } +/* +* The CE4100 platform has an internal 8051 Microcontroller which is +* responsible for signaling to the external Power Management Unit the +* intention to reset, reboot or power off the system. This 8051 device has +* its command register mapped at I/O port 0xcf9 and the value 0x4 is used +* to power off the system. +*/ +static void ce4100_power_off (void ) +{ +outb (0x4 ,0xcf9 ); +} +#ifdef CONFIG_SERIAL_8250 static unsigned int mem_serial_in (struct uart_port *p,int offset)
@@ -139,8 +152,19 @@ void __init x86_ce4100_early_setup(void) x86_init.mpparse.find_smp_config = x86_init_noop; x86_init.pci.init = ce4100_pci_init; +/* +* By default, the reboot method is ACPI which is supported by the +* CE4100 bootloader CEFDK using FADT.ResetReg Address and ResetValue +* the bootloader will however issue a system power off instead of +* reboot. By using BOOT_KBD we ensure proper system reboot as +* expected. +*/ + reboot_type =BOOT_KBD ; +#ifdef CONFIG_X86_IO_APIC x86_init.pci.init_irq = sdv_pci_init; x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc_nocheck;#endif + + pm_power_off = ce4100_power_off; }
drivers/edac/amd64_edac.h +1 -1
@@ -33,7 +33,7 @@* detection. The mods to Rev F required more family * information detection. * -* Changes/Fixes by Borislav Petkov <[email protected]>: +* Changes/Fixes by Borislav Petkov <[email protected]>: * - misc fixes and code cleanups * * This module is based on the following documents
drivers/edac/edac_stub.c +1 -1
@@ -5,7 +5,7 @@* * 2007 (c) MontaVista Software, Inc. * 2010 (c) Advanced Micro Devices Inc. -* Borislav Petkov <[email protected]> +* Borislav Petkov <[email protected]> * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any
drivers/edac/mce_amd_inj.c +2 -2
@@ -6,7 +6,7 @@* This file may be distributed under the terms of the GNU General Public * License version 2. * -* Copyright (c) 2010: Borislav Petkov <[email protected]> +* Copyright (c) 2010: Borislav Petkov <[email protected]> * Advanced Micro Devices Inc. */
@@ -168,6 +168,6 @@ module_init(edac_init_mce_inject);module_exit (edac_exit_mce_inject);MODULE_LICENSE ("GPL" ); -MODULE_AUTHOR ("Borislav Petkov <[email protected]>" ); +MODULE_AUTHOR ("Borislav Petkov <[email protected]>" );MODULE_AUTHOR ("AMD Inc." );MODULE_DESCRIPTION ("MCE injection facility for testing MCE decoding" );