aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/kernel/Makefile2
-rw-r--r--arch/i386/kernel/acpi/Makefile2
-rw-r--r--arch/i386/kernel/acpi/boot.c3
-rw-r--r--arch/i386/kernel/acpi/earlyquirk.c8
-rw-r--r--arch/i386/kernel/cpu/common.c4
-rw-r--r--arch/i386/kernel/efi.c14
-rw-r--r--arch/i386/kernel/io_apic.c19
-rw-r--r--arch/i386/kernel/machine_kexec.c14
-rw-r--r--arch/i386/kernel/nmi.c4
-rw-r--r--arch/i386/kernel/setup.c4
-rw-r--r--arch/i386/kernel/time.c4
11 files changed, 53 insertions, 25 deletions
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 53bb9a79e274..65656c033d70 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -11,7 +11,7 @@ obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \
11 11
12obj-y += cpu/ 12obj-y += cpu/
13obj-y += timers/ 13obj-y += timers/
14obj-$(CONFIG_ACPI) += acpi/ 14obj-y += acpi/
15obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o 15obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o
16obj-$(CONFIG_MCA) += mca.o 16obj-$(CONFIG_MCA) += mca.o
17obj-$(CONFIG_X86_MSR) += msr.o 17obj-$(CONFIG_X86_MSR) += msr.o
diff --git a/arch/i386/kernel/acpi/Makefile b/arch/i386/kernel/acpi/Makefile
index d51c7313cae8..7e9ac99354f4 100644
--- a/arch/i386/kernel/acpi/Makefile
+++ b/arch/i386/kernel/acpi/Makefile
@@ -1,4 +1,4 @@
1obj-y := boot.o 1obj-$(CONFIG_ACPI) += boot.o
2obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o 2obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o
3obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o 3obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o
4 4
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index 79577f0ace98..f1a21945963d 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -1111,9 +1111,6 @@ int __init acpi_boot_table_init(void)
1111 disable_acpi(); 1111 disable_acpi();
1112 return error; 1112 return error;
1113 } 1113 }
1114#ifdef __i386__
1115 check_acpi_pci();
1116#endif
1117 1114
1118 acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); 1115 acpi_table_parse(ACPI_BOOT, acpi_parse_sbf);
1119 1116
diff --git a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c
index f1b9d2a46dab..2e3b643a4dc4 100644
--- a/arch/i386/kernel/acpi/earlyquirk.c
+++ b/arch/i386/kernel/acpi/earlyquirk.c
@@ -7,14 +7,22 @@
7#include <linux/pci.h> 7#include <linux/pci.h>
8#include <asm/pci-direct.h> 8#include <asm/pci-direct.h>
9#include <asm/acpi.h> 9#include <asm/acpi.h>
10#include <asm/apic.h>
10 11
11static int __init check_bridge(int vendor, int device) 12static int __init check_bridge(int vendor, int device)
12{ 13{
14#ifdef CONFIG_ACPI
13 /* According to Nvidia all timer overrides are bogus. Just ignore 15 /* According to Nvidia all timer overrides are bogus. Just ignore
14 them all. */ 16 them all. */
15 if (vendor == PCI_VENDOR_ID_NVIDIA) { 17 if (vendor == PCI_VENDOR_ID_NVIDIA) {
16 acpi_skip_timer_override = 1; 18 acpi_skip_timer_override = 1;
17 } 19 }
20#endif
21 if (vendor == PCI_VENDOR_ID_ATI && timer_over_8254 == 1) {
22 timer_over_8254 = 0;
23 printk(KERN_INFO "ATI board detected. Disabling timer routing "
24 "over 8254.\n");
25 }
18 return 0; 26 return 0;
19} 27}
20 28
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
index 4ecd4b326ded..e6bd095ae108 100644
--- a/arch/i386/kernel/cpu/common.c
+++ b/arch/i386/kernel/cpu/common.c
@@ -278,10 +278,10 @@ void __devinit generic_identify(struct cpuinfo_x86 * c)
278 c->x86_capability[4] = excap; 278 c->x86_capability[4] = excap;
279 c->x86 = (tfms >> 8) & 15; 279 c->x86 = (tfms >> 8) & 15;
280 c->x86_model = (tfms >> 4) & 15; 280 c->x86_model = (tfms >> 4) & 15;
281 if (c->x86 == 0xf) { 281 if (c->x86 == 0xf)
282 c->x86 += (tfms >> 20) & 0xff; 282 c->x86 += (tfms >> 20) & 0xff;
283 if (c->x86 >= 0x6)
283 c->x86_model += ((tfms >> 16) & 0xF) << 4; 284 c->x86_model += ((tfms >> 16) & 0xF) << 4;
284 }
285 c->x86_mask = tfms & 15; 285 c->x86_mask = tfms & 15;
286 } else { 286 } else {
287 /* Have CPUID level 0 only - unheard of */ 287 /* Have CPUID level 0 only - unheard of */
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index e3e42fd62401..c9cad7ba0d2d 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -70,10 +70,13 @@ static void efi_call_phys_prelog(void)
70{ 70{
71 unsigned long cr4; 71 unsigned long cr4;
72 unsigned long temp; 72 unsigned long temp;
73 struct Xgt_desc_struct *cpu_gdt_descr;
73 74
74 spin_lock(&efi_rt_lock); 75 spin_lock(&efi_rt_lock);
75 local_irq_save(efi_rt_eflags); 76 local_irq_save(efi_rt_eflags);
76 77
78 cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0);
79
77 /* 80 /*
78 * If I don't have PSE, I should just duplicate two entries in page 81 * If I don't have PSE, I should just duplicate two entries in page
79 * directory. If I have PSE, I just need to duplicate one entry in 82 * directory. If I have PSE, I just need to duplicate one entry in
@@ -103,18 +106,17 @@ static void efi_call_phys_prelog(void)
103 */ 106 */
104 local_flush_tlb(); 107 local_flush_tlb();
105 108
106 per_cpu(cpu_gdt_descr, 0).address = 109 cpu_gdt_descr->address = __pa(cpu_gdt_descr->address);
107 __pa(per_cpu(cpu_gdt_descr, 0).address); 110 load_gdt(cpu_gdt_descr);
108 load_gdt((struct Xgt_desc_struct *)__pa(&per_cpu(cpu_gdt_descr, 0)));
109} 111}
110 112
111static void efi_call_phys_epilog(void) 113static void efi_call_phys_epilog(void)
112{ 114{
113 unsigned long cr4; 115 unsigned long cr4;
116 struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, 0);
114 117
115 per_cpu(cpu_gdt_descr, 0).address = 118 cpu_gdt_descr->address = __va(cpu_gdt_descr->address);
116 (unsigned long)__va(per_cpu(cpu_gdt_descr, 0).address); 119 load_gdt(cpu_gdt_descr);
117 load_gdt((struct Xgt_desc_struct *)__va(&per_cpu(cpu_gdt_descr, 0)));
118 120
119 cr4 = read_cr4(); 121 cr4 = read_cr4();
120 122
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 235822b3f41b..39d9a5fa907e 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -51,6 +51,8 @@ static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
51 51
52static DEFINE_SPINLOCK(ioapic_lock); 52static DEFINE_SPINLOCK(ioapic_lock);
53 53
54int timer_over_8254 __initdata = 1;
55
54/* 56/*
55 * Is the SiS APIC rmw bug present ? 57 * Is the SiS APIC rmw bug present ?
56 * -1 = don't know, 0 = no, 1 = yes 58 * -1 = don't know, 0 = no, 1 = yes
@@ -2267,7 +2269,8 @@ static inline void check_timer(void)
2267 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); 2269 apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
2268 init_8259A(1); 2270 init_8259A(1);
2269 timer_ack = 1; 2271 timer_ack = 1;
2270 enable_8259A_irq(0); 2272 if (timer_over_8254 > 0)
2273 enable_8259A_irq(0);
2271 2274
2272 pin1 = find_isa_irq_pin(0, mp_INT); 2275 pin1 = find_isa_irq_pin(0, mp_INT);
2273 apic1 = find_isa_irq_apic(0, mp_INT); 2276 apic1 = find_isa_irq_apic(0, mp_INT);
@@ -2392,6 +2395,20 @@ void __init setup_IO_APIC(void)
2392 print_IO_APIC(); 2395 print_IO_APIC();
2393} 2396}
2394 2397
2398static int __init setup_disable_8254_timer(char *s)
2399{
2400 timer_over_8254 = -1;
2401 return 1;
2402}
2403static int __init setup_enable_8254_timer(char *s)
2404{
2405 timer_over_8254 = 2;
2406 return 1;
2407}
2408
2409__setup("disable_8254_timer", setup_disable_8254_timer);
2410__setup("enable_8254_timer", setup_enable_8254_timer);
2411
2395/* 2412/*
2396 * Called after all the initialization is done. If we didnt find any 2413 * Called after all the initialization is done. If we didnt find any
2397 * APIC bugs then we can allow the modify fast path 2414 * APIC bugs then we can allow the modify fast path
diff --git a/arch/i386/kernel/machine_kexec.c b/arch/i386/kernel/machine_kexec.c
index a912fed48482..f73d7374a2ba 100644
--- a/arch/i386/kernel/machine_kexec.c
+++ b/arch/i386/kernel/machine_kexec.c
@@ -116,13 +116,13 @@ static void load_segments(void)
116 __asm__ __volatile__ ( 116 __asm__ __volatile__ (
117 "\tljmp $"STR(__KERNEL_CS)",$1f\n" 117 "\tljmp $"STR(__KERNEL_CS)",$1f\n"
118 "\t1:\n" 118 "\t1:\n"
119 "\tmovl $"STR(__KERNEL_DS)",%eax\n" 119 "\tmovl $"STR(__KERNEL_DS)",%%eax\n"
120 "\tmovl %eax,%ds\n" 120 "\tmovl %%eax,%%ds\n"
121 "\tmovl %eax,%es\n" 121 "\tmovl %%eax,%%es\n"
122 "\tmovl %eax,%fs\n" 122 "\tmovl %%eax,%%fs\n"
123 "\tmovl %eax,%gs\n" 123 "\tmovl %%eax,%%gs\n"
124 "\tmovl %eax,%ss\n" 124 "\tmovl %%eax,%%ss\n"
125 ); 125 ::: "eax", "memory");
126#undef STR 126#undef STR
127#undef __STR 127#undef __STR
128} 128}
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index 63f39a7e2c96..be87c5e2ee95 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -357,7 +357,7 @@ static void clear_msr_range(unsigned int base, unsigned int n)
357 wrmsr(base+i, 0, 0); 357 wrmsr(base+i, 0, 0);
358} 358}
359 359
360static inline void write_watchdog_counter(const char *descr) 360static void write_watchdog_counter(const char *descr)
361{ 361{
362 u64 count = (u64)cpu_khz * 1000; 362 u64 count = (u64)cpu_khz * 1000;
363 363
@@ -544,7 +544,7 @@ void nmi_watchdog_tick (struct pt_regs * regs)
544 * die_nmi will return ONLY if NOTIFY_STOP happens.. 544 * die_nmi will return ONLY if NOTIFY_STOP happens..
545 */ 545 */
546 die_nmi(regs, "NMI Watchdog detected LOCKUP"); 546 die_nmi(regs, "NMI Watchdog detected LOCKUP");
547 547 } else {
548 last_irq_sums[cpu] = sum; 548 last_irq_sums[cpu] = sum;
549 alert_counter[cpu] = 0; 549 alert_counter[cpu] = 0;
550 } 550 }
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 51e513b4f72d..ab62a9f4701e 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -1599,6 +1599,10 @@ void __init setup_arch(char **cmdline_p)
1599 if (efi_enabled) 1599 if (efi_enabled)
1600 efi_map_memmap(); 1600 efi_map_memmap();
1601 1601
1602#ifdef CONFIG_X86_IO_APIC
1603 check_acpi_pci(); /* Checks more than just ACPI actually */
1604#endif
1605
1602#ifdef CONFIG_ACPI 1606#ifdef CONFIG_ACPI
1603 /* 1607 /*
1604 * Parse the ACPI tables for possible boot-time SMP configuration. 1608 * Parse the ACPI tables for possible boot-time SMP configuration.
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
index a14d594bfbeb..9d3074759856 100644
--- a/arch/i386/kernel/time.c
+++ b/arch/i386/kernel/time.c
@@ -412,9 +412,9 @@ static int timer_resume(struct sys_device *dev)
412 write_seqlock_irqsave(&xtime_lock, flags); 412 write_seqlock_irqsave(&xtime_lock, flags);
413 xtime.tv_sec = sec; 413 xtime.tv_sec = sec;
414 xtime.tv_nsec = 0; 414 xtime.tv_nsec = 0;
415 write_sequnlock_irqrestore(&xtime_lock, flags); 415 jiffies_64 += sleep_length;
416 jiffies += sleep_length;
417 wall_jiffies += sleep_length; 416 wall_jiffies += sleep_length;
417 write_sequnlock_irqrestore(&xtime_lock, flags);
418 if (last_timer->resume) 418 if (last_timer->resume)
419 last_timer->resume(); 419 last_timer->resume();
420 cur_timer = last_timer; 420 cur_timer = last_timer;