LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Hennerich, Michael" <Michael.Hennerich@analog.com>
To: "Thomas Gleixner" <tglx@linutronix.de>,
	"Hennerich, Michael" <Michael.Hennerich@analog.com>
Cc: <mingo@elte.hu>, <linux-kernel@vger.kernel.org>
Subject: RE: [BUG][RFC] [GENERIC IRQ] irq_chip_set_defaults shutdown / disable
Date: Tue, 19 Feb 2008 08:58:34 -0000	[thread overview]
Message-ID: <600D5CB4DFD93545BF61FF01473D11AC125CC945@limkexm2.ad.analog.com> (raw)
In-Reply-To: <alpine.LFD.1.00.0802182135580.7583@apollo.tec.linutronix.de>

>From: Thomas Gleixner Montag, 18. Februar 2008 21:38
>
>On Mon, 18 Feb 2008, Hennerich, Michael wrote:
>> >The patch below fixes the shutdown case and keeps the delayed
disable
>> >logic intact.
>>
>> >How did you notice ? I guess you got spurious interrupts after
calling
>> >free_irq(), right ?
>>
>> Exactly
>
>Can you please confirm, whether my version of the fix works for you as
>well.
>
>Thanks,
>
>	tglx

Thomas,

Works - no problems.
There was another typo 

>+			chip_disable : default_shutdown;
Should be better:
+                       chip->disable : default_shutdown;

Best regards,
Michael

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

Index: kernel/irq/chip.c
===================================================================
--- kernel/irq/chip.c   (revision 4270)
+++ kernel/irq/chip.c   (working copy)
@@ -245,7 +245,20 @@
        return 0;
 }

+
 /*
+ * default shutdown function
+ */
+static void default_shutdown(unsigned int irq)
+{
+       struct irq_desc *desc = irq_desc + irq;
+
+       desc->chip->mask(irq);
+       desc->status |= IRQ_MASKED;
+}
+
+
+/*
  * Fixup enable/disable function pointers
  */
 void irq_chip_set_defaults(struct irq_chip *chip)
@@ -257,7 +270,8 @@
        if (!chip->startup)
                chip->startup = default_startup;
        if (!chip->shutdown)
-               chip->shutdown = chip->disable;
+               chip->shutdown = chip->disable != default_disable ?
+                       chip->disable : default_shutdown;
        if (!chip->name)
                chip->name = chip->typename;
        if (!chip->end)

  reply	other threads:[~2008-02-19  8:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-18 16:58 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=600D5CB4DFD93545BF61FF01473D11AC125CC945@limkexm2.ad.analog.com \
    --to=michael.hennerich@analog.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --subject='RE: [BUG][RFC] [GENERIC IRQ] irq_chip_set_defaults shutdown / disable' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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