LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH x86] i8259A_32: Remove redundant irq_desc[NR_IRQ] initialization
@ 2008-02-17 22:59 Ahmed S. Darwish
2008-02-18 2:35 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Ahmed S. Darwish @ 2008-02-17 22:59 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin; +Cc: LKML
Hi all,
Remove redundant irq_desc[NR_IRQS] element initialization in
init_ISA_irqs(). irq_desc[NR_IRQS] is already statically
initialized with the same values in kernel/irq/handle.c .
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
---
i8259_32.c | 26 ++++++--------------------
1 file changed, 6 insertions(+), 20 deletions(-)
Tested only on a UP machine with an i8259A PIC.
diff --git a/arch/x86/kernel/i8259_32.c b/arch/x86/kernel/i8259_32.c
index 2d25b77..0fea87d 100644
--- a/arch/x86/kernel/i8259_32.c
+++ b/arch/x86/kernel/i8259_32.c
@@ -26,8 +26,6 @@
* present in the majority of PC/AT boxes.
* plus some generic x86 specific things if generic specifics makes
* any sense at all.
- * this file should become arch/i386/kernel/irq.c when the old irq.c
- * moves to arch independent land
*/
static int i8259A_auto_eoi;
@@ -362,24 +360,12 @@ void __init init_ISA_irqs (void)
#endif
init_8259A(0);
- for (i = 0; i < NR_IRQS; i++) {
- irq_desc[i].status = IRQ_DISABLED;
- irq_desc[i].action = NULL;
- irq_desc[i].depth = 1;
-
- if (i < 16) {
- /*
- * 16 old-style INTA-cycle interrupts:
- */
- set_irq_chip_and_handler_name(i, &i8259A_chip,
- handle_level_irq, "XT");
- } else {
- /*
- * 'high' PCI IRQs filled in on demand
- */
- irq_desc[i].chip = &no_irq_chip;
- }
- }
+ /*
+ * 16 old-style INTA-cycle interrupts:
+ */
+ for (i = 0; i < 16; i++)
+ set_irq_chip_and_handler_name(i, &i8259A_chip,
+ handle_level_irq, "XT");
}
/* Overridden in paravirt.c */
Regards,
--
Ahmed S. Darwish
Homepage: http://darwish.07.googlepages.com
Blog: http://darwish-07.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH x86] i8259A_32: Remove redundant irq_desc[NR_IRQ] initialization
2008-02-17 22:59 [PATCH x86] i8259A_32: Remove redundant irq_desc[NR_IRQ] initialization Ahmed S. Darwish
@ 2008-02-18 2:35 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-02-18 2:35 UTC (permalink / raw)
To: Ahmed S. Darwish; +Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, LKML
* Ahmed S. Darwish <darwish.07@gmail.com> wrote:
> Remove redundant irq_desc[NR_IRQS] element initialization in
> init_ISA_irqs(). irq_desc[NR_IRQS] is already statically initialized
> with the same values in kernel/irq/handle.c .
nice catch - applied. This also saves a few bytes of image space:
text data bss dec hex filename
1389 356 14 1759 6df i8259_32.o.before
1325 356 14 1695 69f i8259_32.o.after
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-18 2:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-17 22:59 [PATCH x86] i8259A_32: Remove redundant irq_desc[NR_IRQ] initialization Ahmed S. Darwish
2008-02-18 2:35 ` Ingo Molnar
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).