diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/boot/flatdevtree_env.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/io_apic_32.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/mfgpt_32.c | 15 | ||||
-rw-r--r-- | arch/x86/kernel/nmi_32.c | 9 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 2 |
5 files changed, 14 insertions, 26 deletions
diff --git a/arch/powerpc/boot/flatdevtree_env.h b/arch/powerpc/boot/flatdevtree_env.h index ad0420da8921..66e0ebb1a364 100644 --- a/arch/powerpc/boot/flatdevtree_env.h +++ b/arch/powerpc/boot/flatdevtree_env.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * This file adds the header file glue so that the shared files | 2 | * This file adds the header file glue so that the shared files |
3 | * flatdevicetree.[ch] can compile and work in the powerpc bootwrapper. | 3 | * flatdevicetree.[ch] can compile and work in the powerpc bootwrapper. |
4 | * | 4 | * |
5 | * strncmp & strchr copied from <file:lib/strings.c> | 5 | * strncmp & strchr copied from <file:lib/string.c> |
6 | * Copyright (C) 1991, 1992 Linus Torvalds | 6 | * Copyright (C) 1991, 1992 Linus Torvalds |
7 | * | 7 | * |
8 | * Maintained by: Mark A. Greer <mgreer@mvista.com> | 8 | * Maintained by: Mark A. Greer <mgreer@mvista.com> |
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index c3a565bba106..a6b1490e00c4 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -2169,14 +2169,10 @@ static inline void __init check_timer(void) | |||
2169 | { | 2169 | { |
2170 | int apic1, pin1, apic2, pin2; | 2170 | int apic1, pin1, apic2, pin2; |
2171 | int vector; | 2171 | int vector; |
2172 | unsigned int ver; | ||
2173 | unsigned long flags; | 2172 | unsigned long flags; |
2174 | 2173 | ||
2175 | local_irq_save(flags); | 2174 | local_irq_save(flags); |
2176 | 2175 | ||
2177 | ver = apic_read(APIC_LVR); | ||
2178 | ver = GET_APIC_VERSION(ver); | ||
2179 | |||
2180 | /* | 2176 | /* |
2181 | * get/set the timer IRQ vector: | 2177 | * get/set the timer IRQ vector: |
2182 | */ | 2178 | */ |
@@ -2189,15 +2185,11 @@ static inline void __init check_timer(void) | |||
2189 | * mode for the 8259A whenever interrupts are routed | 2185 | * mode for the 8259A whenever interrupts are routed |
2190 | * through I/O APICs. Also IRQ0 has to be enabled in | 2186 | * through I/O APICs. Also IRQ0 has to be enabled in |
2191 | * the 8259A which implies the virtual wire has to be | 2187 | * the 8259A which implies the virtual wire has to be |
2192 | * disabled in the local APIC. Finally timer interrupts | 2188 | * disabled in the local APIC. |
2193 | * need to be acknowledged manually in the 8259A for | ||
2194 | * timer_interrupt() and for the i82489DX when using | ||
2195 | * the NMI watchdog. | ||
2196 | */ | 2189 | */ |
2197 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); | 2190 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); |
2198 | init_8259A(1); | 2191 | init_8259A(1); |
2199 | timer_ack = !cpu_has_tsc; | 2192 | timer_ack = 1; |
2200 | timer_ack |= (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); | ||
2201 | if (timer_over_8254 > 0) | 2193 | if (timer_over_8254 > 0) |
2202 | enable_8259A_irq(0); | 2194 | enable_8259A_irq(0); |
2203 | 2195 | ||
diff --git a/arch/x86/kernel/mfgpt_32.c b/arch/x86/kernel/mfgpt_32.c index 0ab680f2d9db..3960ab7e1497 100644 --- a/arch/x86/kernel/mfgpt_32.c +++ b/arch/x86/kernel/mfgpt_32.c | |||
@@ -278,12 +278,12 @@ static int mfgpt_next_event(unsigned long delta, struct clock_event_device *evt) | |||
278 | 278 | ||
279 | static irqreturn_t mfgpt_tick(int irq, void *dev_id) | 279 | static irqreturn_t mfgpt_tick(int irq, void *dev_id) |
280 | { | 280 | { |
281 | /* Turn off the clock (and clear the event) */ | ||
282 | mfgpt_disable_timer(mfgpt_event_clock); | ||
283 | |||
281 | if (mfgpt_tick_mode == CLOCK_EVT_MODE_SHUTDOWN) | 284 | if (mfgpt_tick_mode == CLOCK_EVT_MODE_SHUTDOWN) |
282 | return IRQ_HANDLED; | 285 | return IRQ_HANDLED; |
283 | 286 | ||
284 | /* Turn off the clock */ | ||
285 | mfgpt_disable_timer(mfgpt_event_clock); | ||
286 | |||
287 | /* Clear the counter */ | 287 | /* Clear the counter */ |
288 | geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_COUNTER, 0); | 288 | geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_COUNTER, 0); |
289 | 289 | ||
@@ -319,10 +319,6 @@ static int __init mfgpt_timer_setup(void) | |||
319 | } | 319 | } |
320 | 320 | ||
321 | mfgpt_event_clock = timer; | 321 | mfgpt_event_clock = timer; |
322 | /* Set the clock scale and enable the event mode for CMP2 */ | ||
323 | val = MFGPT_SCALE | (3 << 8); | ||
324 | |||
325 | geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP, val); | ||
326 | 322 | ||
327 | /* Set up the IRQ on the MFGPT side */ | 323 | /* Set up the IRQ on the MFGPT side */ |
328 | if (geode_mfgpt_setup_irq(mfgpt_event_clock, MFGPT_CMP2, irq)) { | 324 | if (geode_mfgpt_setup_irq(mfgpt_event_clock, MFGPT_CMP2, irq)) { |
@@ -339,6 +335,11 @@ static int __init mfgpt_timer_setup(void) | |||
339 | goto err; | 335 | goto err; |
340 | } | 336 | } |
341 | 337 | ||
338 | /* Set the clock scale and enable the event mode for CMP2 */ | ||
339 | val = MFGPT_SCALE | (3 << 8); | ||
340 | |||
341 | geode_mfgpt_write(mfgpt_event_clock, MFGPT_REG_SETUP, val); | ||
342 | |||
342 | /* Set up the clock event */ | 343 | /* Set up the clock event */ |
343 | mfgpt_clockevent.mult = div_sc(MFGPT_HZ, NSEC_PER_SEC, 32); | 344 | mfgpt_clockevent.mult = div_sc(MFGPT_HZ, NSEC_PER_SEC, 32); |
344 | mfgpt_clockevent.min_delta_ns = clockevent_delta2ns(0xF, | 345 | mfgpt_clockevent.min_delta_ns = clockevent_delta2ns(0xF, |
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c index 80ca72e5ac29..852db2906921 100644 --- a/arch/x86/kernel/nmi_32.c +++ b/arch/x86/kernel/nmi_32.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <asm/smp.h> | 26 | #include <asm/smp.h> |
27 | #include <asm/nmi.h> | 27 | #include <asm/nmi.h> |
28 | #include <asm/timer.h> | ||
29 | 28 | ||
30 | #include "mach_traps.h" | 29 | #include "mach_traps.h" |
31 | 30 | ||
@@ -84,7 +83,7 @@ static int __init check_nmi_watchdog(void) | |||
84 | 83 | ||
85 | prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); | 84 | prev_nmi_count = kmalloc(NR_CPUS * sizeof(int), GFP_KERNEL); |
86 | if (!prev_nmi_count) | 85 | if (!prev_nmi_count) |
87 | goto error; | 86 | return -1; |
88 | 87 | ||
89 | printk(KERN_INFO "Testing NMI watchdog ... "); | 88 | printk(KERN_INFO "Testing NMI watchdog ... "); |
90 | 89 | ||
@@ -119,7 +118,7 @@ static int __init check_nmi_watchdog(void) | |||
119 | if (!atomic_read(&nmi_active)) { | 118 | if (!atomic_read(&nmi_active)) { |
120 | kfree(prev_nmi_count); | 119 | kfree(prev_nmi_count); |
121 | atomic_set(&nmi_active, -1); | 120 | atomic_set(&nmi_active, -1); |
122 | goto error; | 121 | return -1; |
123 | } | 122 | } |
124 | printk("OK.\n"); | 123 | printk("OK.\n"); |
125 | 124 | ||
@@ -130,10 +129,6 @@ static int __init check_nmi_watchdog(void) | |||
130 | 129 | ||
131 | kfree(prev_nmi_count); | 130 | kfree(prev_nmi_count); |
132 | return 0; | 131 | return 0; |
133 | error: | ||
134 | timer_ack = !cpu_has_tsc; | ||
135 | |||
136 | return -1; | ||
137 | } | 132 | } |
138 | /* This needs to happen later in boot so counters are working */ | 133 | /* This needs to happen later in boot so counters are working */ |
139 | late_initcall(check_nmi_watchdog); | 134 | late_initcall(check_nmi_watchdog); |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index b6af3ea43c73..79ad15252150 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -95,7 +95,7 @@ struct shared_info *HYPERVISOR_shared_info = (void *)&dummy_shared_info; | |||
95 | * | 95 | * |
96 | * 0: not available, 1: available | 96 | * 0: not available, 1: available |
97 | */ | 97 | */ |
98 | static int have_vcpu_info_placement = 1; | 98 | static int have_vcpu_info_placement = 0; |
99 | 99 | ||
100 | static void __init xen_vcpu_setup(int cpu) | 100 | static void __init xen_vcpu_setup(int cpu) |
101 | { | 101 | { |