Re: [PATCH] Remove unnecessary irq disabling



On Tue, May 01, 2007 at 07:59:21PM -0400, Mark Lord wrote:
Glauber de Oliveira Costa wrote:
RR asks us if it is really necessary to disable interrupts in
setup_secondary_APIC_clock(). The answer is no, since setup_APIC_timer()
starts by saving irq flags, which also disables them.

Signed-off-by: Glauber de Oliveira Costa <gcosta@xxxxxxxxxx>

--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -875,9 +875,7 @@ void __init setup_boot_APIC_clock (void)

void __cpuinit setup_secondary_APIC_clock(void)
{
- local_irq_disable(); /* FIXME: Do we need this? --RR */
setup_APIC_timer(calibration_result);
- local_irq_enable();
}

void disable_APIC_timer(void)

Okay, I'll bite: before the patch, this code would exit
with interrupts *enabled*, always. Now it does not.

yeah, you have a point. The disable is unnecessary, but maybe
the enable is not. However,

What does that break, or was it already broken and this fixes it?
I think neither. This function is only called at early bootup,
(start_secondary() ), and most of its callees have interrupts off anyway.
But maybe we do lose something. Andi, do you have a word on this?

--
Glauber de Oliveira Costa
Red Hat Inc.
"Free as in Freedom"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: 2.6.21-rc5-mm4
    ... It enables interrupts for the call into the page allocator ... and then disables them again. ... but not enough to boot:( ... starting cpu hw idx 0000000000000002... ...
    (Linux-Kernel)
  • Re: Regression from 2.6.26: Hibernation (possibly suspend) broken on Toshiba R500 (bisected)
    ... Greg, Jesse, can you think about and look at the USB PCI resume ordering? ... how to disable it (ie the kernel also disables it by writing 0x00f0 to the ... Anyway, the bridge reprogramming itself all looks correct, and the only ... it seems to imply that interrupts are enabled on ...
    (Linux-Kernel)
  • [RFC PATCH] Fair rwlock
    ... I have hit this problem when tying to implement a better rwlock design ... like a list of pending writers, so that you can drop interrupts on one ... This "fair" rwlock locks out the threads first, then disables softirqs, ... * protects against writers. ...
    (Linux-Kernel)
  • Re: [PATCH] PM: suspend_device_irqs(): dont disable wakeup IRQs
    ... should not be disabled for suspend. ... I'd be interested in hearing why wakeup interrupts should be disabled ... your suspend_device_irqsfunction disables all IRQs at the ...
    (Linux-Kernel)
  • Re: [PATCH] PM: suspend_device_irqs(): dont disable wakeup IRQs
    ... should not be disabled for suspend. ... I'd be interested in hearing why wakeup interrupts should be disabled ... your suspend_device_irqsfunction disables all IRQs at the ...
    (Linux-Kernel)