diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/amd.c | 14 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_amd.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/microcode_amd.c | 4 | ||||
-rw-r--r-- | arch/x86/pci/ce4100.c | 13 | ||||
-rw-r--r-- | arch/x86/platform/ce4100/ce4100.c | 24 |
5 files changed, 54 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index f7e98a2c0d12..1b7d1656a042 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -631,6 +631,20 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
631 | } | 631 | } |
632 | } | 632 | } |
633 | 633 | ||
634 | /* | ||
635 | * The way access filter has a performance penalty on some workloads. | ||
636 | * Disable it on the affected CPUs. | ||
637 | */ | ||
638 | if ((c->x86 == 0x15) && | ||
639 | (c->x86_model >= 0x02) && (c->x86_model < 0x20)) { | ||
640 | u64 val; | ||
641 | |||
642 | if (!rdmsrl_safe(0xc0011021, &val) && !(val & 0x1E)) { | ||
643 | val |= 0x1E; | ||
644 | wrmsrl_safe(0xc0011021, val); | ||
645 | } | ||
646 | } | ||
647 | |||
634 | cpu_detect_cache_sizes(c); | 648 | cpu_detect_cache_sizes(c); |
635 | 649 | ||
636 | /* Multi core CPU? */ | 650 | /* Multi core CPU? */ |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 698b6ec12e0f..1ac581f38dfa 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | * Written by Jacob Shin - AMD, Inc. | 7 | * Written by Jacob Shin - AMD, Inc. |
8 | * | 8 | * |
9 | * Support: borislav.petkov@amd.com | 9 | * Maintained by: Borislav Petkov <bp@alien8.de> |
10 | * | 10 | * |
11 | * April 2006 | 11 | * April 2006 |
12 | * - added support for AMD Family 0x10 processors | 12 | * - added support for AMD Family 0x10 processors |
diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 7720ff5a9ee2..b3e67ba55b77 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c | |||
@@ -8,8 +8,8 @@ | |||
8 | * Tigran Aivazian <tigran@aivazian.fsnet.co.uk> | 8 | * Tigran Aivazian <tigran@aivazian.fsnet.co.uk> |
9 | * | 9 | * |
10 | * Maintainers: | 10 | * Maintainers: |
11 | * Andreas Herrmann <andreas.herrmann3@amd.com> | 11 | * Andreas Herrmann <herrmann.der.user@googlemail.com> |
12 | * Borislav Petkov <borislav.petkov@amd.com> | 12 | * Borislav Petkov <bp@alien8.de> |
13 | * | 13 | * |
14 | * This driver allows to upgrade microcode on F10h AMD | 14 | * This driver allows to upgrade microcode on F10h AMD |
15 | * CPUs and later. | 15 | * CPUs and later. |
diff --git a/arch/x86/pci/ce4100.c b/arch/x86/pci/ce4100.c index 41bd2a2d2c50..b914e20b5a00 100644 --- a/arch/x86/pci/ce4100.c +++ b/arch/x86/pci/ce4100.c | |||
@@ -115,6 +115,16 @@ static void sata_revid_read(struct sim_dev_reg *reg, u32 *value) | |||
115 | reg_read(reg, value); | 115 | reg_read(reg, value); |
116 | } | 116 | } |
117 | 117 | ||
118 | static void reg_noirq_read(struct sim_dev_reg *reg, u32 *value) | ||
119 | { | ||
120 | unsigned long flags; | ||
121 | |||
122 | raw_spin_lock_irqsave(&pci_config_lock, flags); | ||
123 | /* force interrupt pin value to 0 */ | ||
124 | *value = reg->sim_reg.value & 0xfff00ff; | ||
125 | raw_spin_unlock_irqrestore(&pci_config_lock, flags); | ||
126 | } | ||
127 | |||
118 | static struct sim_dev_reg bus1_fixups[] = { | 128 | static struct sim_dev_reg bus1_fixups[] = { |
119 | DEFINE_REG(2, 0, 0x10, (16*MB), reg_init, reg_read, reg_write) | 129 | DEFINE_REG(2, 0, 0x10, (16*MB), reg_init, reg_read, reg_write) |
120 | DEFINE_REG(2, 0, 0x14, (256), reg_init, reg_read, reg_write) | 130 | DEFINE_REG(2, 0, 0x14, (256), reg_init, reg_read, reg_write) |
@@ -144,6 +154,7 @@ static struct sim_dev_reg bus1_fixups[] = { | |||
144 | DEFINE_REG(11, 5, 0x10, (64*KB), reg_init, reg_read, reg_write) | 154 | DEFINE_REG(11, 5, 0x10, (64*KB), reg_init, reg_read, reg_write) |
145 | DEFINE_REG(11, 6, 0x10, (256), reg_init, reg_read, reg_write) | 155 | DEFINE_REG(11, 6, 0x10, (256), reg_init, reg_read, reg_write) |
146 | DEFINE_REG(11, 7, 0x10, (64*KB), reg_init, reg_read, reg_write) | 156 | DEFINE_REG(11, 7, 0x10, (64*KB), reg_init, reg_read, reg_write) |
157 | DEFINE_REG(11, 7, 0x3c, 256, reg_init, reg_noirq_read, reg_write) | ||
147 | DEFINE_REG(12, 0, 0x10, (128*KB), reg_init, reg_read, reg_write) | 158 | DEFINE_REG(12, 0, 0x10, (128*KB), reg_init, reg_read, reg_write) |
148 | DEFINE_REG(12, 0, 0x14, (256), reg_init, reg_read, reg_write) | 159 | DEFINE_REG(12, 0, 0x14, (256), reg_init, reg_read, reg_write) |
149 | DEFINE_REG(12, 1, 0x10, (1024), reg_init, reg_read, reg_write) | 160 | DEFINE_REG(12, 1, 0x10, (1024), reg_init, reg_read, reg_write) |
@@ -161,8 +172,10 @@ static struct sim_dev_reg bus1_fixups[] = { | |||
161 | DEFINE_REG(16, 0, 0x10, (64*KB), reg_init, reg_read, reg_write) | 172 | DEFINE_REG(16, 0, 0x10, (64*KB), reg_init, reg_read, reg_write) |
162 | DEFINE_REG(16, 0, 0x14, (64*MB), reg_init, reg_read, reg_write) | 173 | DEFINE_REG(16, 0, 0x14, (64*MB), reg_init, reg_read, reg_write) |
163 | DEFINE_REG(16, 0, 0x18, (64*MB), reg_init, reg_read, reg_write) | 174 | DEFINE_REG(16, 0, 0x18, (64*MB), reg_init, reg_read, reg_write) |
175 | DEFINE_REG(16, 0, 0x3c, 256, reg_init, reg_noirq_read, reg_write) | ||
164 | DEFINE_REG(17, 0, 0x10, (128*KB), reg_init, reg_read, reg_write) | 176 | DEFINE_REG(17, 0, 0x10, (128*KB), reg_init, reg_read, reg_write) |
165 | DEFINE_REG(18, 0, 0x10, (1*KB), reg_init, reg_read, reg_write) | 177 | DEFINE_REG(18, 0, 0x10, (1*KB), reg_init, reg_read, reg_write) |
178 | DEFINE_REG(18, 0, 0x3c, 256, reg_init, reg_noirq_read, reg_write) | ||
166 | }; | 179 | }; |
167 | 180 | ||
168 | static void __init init_sim_regs(void) | 181 | static void __init init_sim_regs(void) |
diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c index 4c61b52191eb..92525cb8e54c 100644 --- a/arch/x86/platform/ce4100/ce4100.c +++ b/arch/x86/platform/ce4100/ce4100.c | |||
@@ -21,12 +21,25 @@ | |||
21 | #include <asm/i8259.h> | 21 | #include <asm/i8259.h> |
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | #include <asm/io_apic.h> | 23 | #include <asm/io_apic.h> |
24 | #include <asm/emergency-restart.h> | ||
24 | 25 | ||
25 | static int ce4100_i8042_detect(void) | 26 | static int ce4100_i8042_detect(void) |
26 | { | 27 | { |
27 | return 0; | 28 | return 0; |
28 | } | 29 | } |
29 | 30 | ||
31 | /* | ||
32 | * The CE4100 platform has an internal 8051 Microcontroller which is | ||
33 | * responsible for signaling to the external Power Management Unit the | ||
34 | * intention to reset, reboot or power off the system. This 8051 device has | ||
35 | * its command register mapped at I/O port 0xcf9 and the value 0x4 is used | ||
36 | * to power off the system. | ||
37 | */ | ||
38 | static void ce4100_power_off(void) | ||
39 | { | ||
40 | outb(0x4, 0xcf9); | ||
41 | } | ||
42 | |||
30 | #ifdef CONFIG_SERIAL_8250 | 43 | #ifdef CONFIG_SERIAL_8250 |
31 | 44 | ||
32 | static unsigned int mem_serial_in(struct uart_port *p, int offset) | 45 | static unsigned int mem_serial_in(struct uart_port *p, int offset) |
@@ -139,8 +152,19 @@ void __init x86_ce4100_early_setup(void) | |||
139 | x86_init.mpparse.find_smp_config = x86_init_noop; | 152 | x86_init.mpparse.find_smp_config = x86_init_noop; |
140 | x86_init.pci.init = ce4100_pci_init; | 153 | x86_init.pci.init = ce4100_pci_init; |
141 | 154 | ||
155 | /* | ||
156 | * By default, the reboot method is ACPI which is supported by the | ||
157 | * CE4100 bootloader CEFDK using FADT.ResetReg Address and ResetValue | ||
158 | * the bootloader will however issue a system power off instead of | ||
159 | * reboot. By using BOOT_KBD we ensure proper system reboot as | ||
160 | * expected. | ||
161 | */ | ||
162 | reboot_type = BOOT_KBD; | ||
163 | |||
142 | #ifdef CONFIG_X86_IO_APIC | 164 | #ifdef CONFIG_X86_IO_APIC |
143 | x86_init.pci.init_irq = sdv_pci_init; | 165 | x86_init.pci.init_irq = sdv_pci_init; |
144 | x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc_nocheck; | 166 | x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc_nocheck; |
145 | #endif | 167 | #endif |
168 | |||
169 | pm_power_off = ce4100_power_off; | ||
146 | } | 170 | } |