LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [irq: Remove set_native_irq_info] !CONFIG_SMP regression
@ 2007-02-26 22:59 Simon Arlott
  2007-02-26 23:50 ` Eric W. Biederman
  2007-02-27  7:27 ` [PATCH] x86_64/i386 irq: Fix !CONFIG_SMP compilation Eric W. Biederman
  0 siblings, 2 replies; 3+ messages in thread
From: Simon Arlott @ 2007-02-26 22:59 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: ebiederm

[-- Attachment #1: Type: text/plain, Size: 936 bytes --]

9f0a5ba5508143731dc63235de19659be20d26dc is first bad commit
commit 9f0a5ba5508143731dc63235de19659be20d26dc
Author: Eric W. Biederman <ebiederm@xmission.com>
Date:   Fri Feb 23 04:13:55 2007 -0700

    [PATCH] irq: Remove set_native_irq_info

    This patch replaces all instances of "set_native_irq_info(irq, mask)"
    with "irq_desc[irq].affinity = mask".  The latter form is clearer
    uses fewer abstractions, and makes access to this field uniform
    accross different architectures.



arch/i386/kernel/io_apic.c: In function `setup_IO_APIC_irqs':
arch/i386/kernel/io_apic.c:1357: error: structure has no member named `affinity'
arch/i386/kernel/io_apic.c: In function `io_apic_set_pci_routing':
arch/i386/kernel/io_apic.c:2878: error: structure has no member named `affinity'


The original version was an empty function if !CONFIG_SMP, struct irq_desc only has 'affinity' on SMP.

-- 
Simon Arlott


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 829 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [irq: Remove set_native_irq_info] !CONFIG_SMP regression
  2007-02-26 22:59 [irq: Remove set_native_irq_info] !CONFIG_SMP regression Simon Arlott
@ 2007-02-26 23:50 ` Eric W. Biederman
  2007-02-27  7:27 ` [PATCH] x86_64/i386 irq: Fix !CONFIG_SMP compilation Eric W. Biederman
  1 sibling, 0 replies; 3+ messages in thread
From: Eric W. Biederman @ 2007-02-26 23:50 UTC (permalink / raw)
  To: Simon Arlott; +Cc: Linux Kernel Mailing List

Simon Arlott <simon@arlott.org> writes:

> 9f0a5ba5508143731dc63235de19659be20d26dc is first bad commit
> commit 9f0a5ba5508143731dc63235de19659be20d26dc
> Author: Eric W. Biederman <ebiederm@xmission.com>
> Date:   Fri Feb 23 04:13:55 2007 -0700
>
>     [PATCH] irq: Remove set_native_irq_info
>
>     This patch replaces all instances of "set_native_irq_info(irq, mask)"
>     with "irq_desc[irq].affinity = mask".  The latter form is clearer
>     uses fewer abstractions, and makes access to this field uniform
>     accross different architectures.
>
>
>
> arch/i386/kernel/io_apic.c: In function `setup_IO_APIC_irqs':
> arch/i386/kernel/io_apic.c:1357: error: structure has no member named `affinity'
> arch/i386/kernel/io_apic.c: In function `io_apic_set_pci_routing':
> arch/i386/kernel/io_apic.c:2878: error: structure has no member named `affinity'
>
>
> The original version was an empty function if !CONFIG_SMP, struct irq_desc only
> has 'affinity' on SMP.

Yep.

Give me a bit. I think we can just kill those lines.

Eric

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] x86_64/i386 irq:  Fix !CONFIG_SMP compilation
  2007-02-26 22:59 [irq: Remove set_native_irq_info] !CONFIG_SMP regression Simon Arlott
  2007-02-26 23:50 ` Eric W. Biederman
@ 2007-02-27  7:27 ` Eric W. Biederman
  1 sibling, 0 replies; 3+ messages in thread
From: Eric W. Biederman @ 2007-02-27  7:27 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List, Simon Arlott


When removing set_native_irq I missed the fact that it was
called in a couple of places that were compiled even when
SMP support is disabled.  And since the irq_desc[].affinity
field only exists in SMP things broke.

Thanks to Simon Arlott <simon@arlott.org> for spotting this.

There are a couple of ways to fix this but the simplest one
is to just remove the assignments.  The affinity field is only
used to display a value to the user, and nothing on either i386
or x86_64 reads it or depends on it being any particlua value,
so skipping the assignment is safe.  The assignment that
is being removed is just for the initial affinity value before
the user explicitly sets it.  The irq_desc array initializes
this field to CPU_MASK_ALL so the field is initialized to
a reasonable value in the SMP case without being set.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 arch/i386/kernel/io_apic.c   |    2 --
 arch/x86_64/kernel/io_apic.c |    4 ----
 2 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 6fec4da..e4408ff 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -1354,7 +1354,6 @@ static void __init setup_IO_APIC_irqs(void)
 		}
 		spin_lock_irqsave(&ioapic_lock, flags);
 		__ioapic_write_entry(apic, pin, entry);
-		irq_desc[irq].affinity = TARGET_CPUS;
 		spin_unlock_irqrestore(&ioapic_lock, flags);
 	}
 	}
@@ -2875,7 +2874,6 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
 
 	spin_lock_irqsave(&ioapic_lock, flags);
 	__ioapic_write_entry(ioapic, pin, entry);
-	irq_desc[irq].affinity = TARGET_CPUS;
 	spin_unlock_irqrestore(&ioapic_lock, flags);
 
 	return 0;
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index 48593f6..0a91368 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -830,10 +830,6 @@ static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq,
 		disable_8259A_irq(irq);
 
 	ioapic_write_entry(apic, pin, entry);
-
-	spin_lock_irqsave(&ioapic_lock, flags);
-	irq_desc[irq].affinity = TARGET_CPUS;
-	spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
 static void __init setup_IO_APIC_irqs(void)
-- 
1.5.0.g53756


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-27  7:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-26 22:59 [irq: Remove set_native_irq_info] !CONFIG_SMP regression Simon Arlott
2007-02-26 23:50 ` Eric W. Biederman
2007-02-27  7:27 ` [PATCH] x86_64/i386 irq: Fix !CONFIG_SMP compilation Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).