LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [BUG][RFC] [GENERIC IRQ] irq_chip_set_defaults shutdown / disable
@ 2008-02-18 16:58 Hennerich, Michael
  2008-02-18 17:49 ` Thomas Gleixner
  0 siblings, 1 reply; 10+ messages in thread
From: Hennerich, Michael @ 2008-02-18 16:58 UTC (permalink / raw)
  To: tglx, mingo; +Cc: linux-kernel

RESENT: Add Maintainers 

free_irq() does not disable/mask the irq, in case disable or shutdown in struct irq_chip is left uninitilazied.

/**
 * struct irq_chip - hardware interrupt chip descriptor
 *
 * @name:	name for /proc/interrupts
 * @startup:	start up the interrupt (defaults to ->enable if NULL)
 * @shutdown:	shut down the interrupt (defaults to ->disable if NULL)
 * @enable:		enable the interrupt (defaults to chip->unmask if NULL)
 * @disable:	disable the interrupt (defaults to chip->mask if NULL)


According to linux/irq.h struct irq_chip information,
chip->disable should default to chip->mask if NULL.
However irq_chip_set_defaults(struct irq_chip *chip) will set it to default_disable an empty function.

In earlier kernel versions such as 2.6.19 default_disable called chip->mask.
In 2.6.22 and 2.6.24 default_disable is an empty function.

Looking through various architectures, it's still pretty common that disable and shutdown is NULL.

Do I miss something here?

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>

Index: irq/chip.c
===================================================================
--- irq/chip.c  (revision 4276)
+++ irq/chip.c  (working copy)
@@ -233,6 +233,10 @@
  */
 static void default_disable(unsigned int irq)  {
+       struct irq_desc *desc = irq_desc + irq;
+
+       desc->chip->mask(irq);
+       desc->status |= IRQ_MASKED;
 }

 /*

Best regards,
Michael

------------------------------------------------------------------
********* Analog Devices GmbH         michael.hennerich@analog.com
**  *****                                      Systems Engineering
**     ** Wilhelm-Wagenfeld-Strasse 6       
**  ***** D-80807 Munich                      
********* Germany                          
Registergericht München HRB 40368,  Geschäftsführer:  Thomas Wessel,  Vincent Roche,  Joseph E. McDonough

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

end of thread, other threads:[~2008-02-19 11:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-18 16:58 [BUG][RFC] [GENERIC IRQ] irq_chip_set_defaults shutdown / disable Hennerich, Michael
2008-02-18 17:49 ` Thomas Gleixner
2008-02-18 18:04   ` Hennerich, Michael
2008-02-18 20:37     ` Thomas Gleixner
2008-02-19  8:58       ` Hennerich, Michael
2008-02-19  9:12         ` Thomas Gleixner
2008-02-18 20:47     ` Thomas Gleixner
2008-02-19 10:25       ` [BUG][RFC][GENERIC IRQ] linux-2.6.24 (delayed) disable IRQ feature not functional for handle_simple_irq Hennerich, Michael
2008-02-19 10:49         ` Thomas Gleixner
2008-02-19 11:51           ` Hennerich, Michael

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).