LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@elte.hu>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [patch 6/8] arm: ns9xxx: Remove private irq flow handler
Date: Thu, 3 Feb 2011 08:56:23 +0100	[thread overview]
Message-ID: <20110203075623.GB30452@pengutronix.de> (raw)
In-Reply-To: <20110202212552.299898447@linutronix.de>

Hi Thomas,

On Wed, Feb 02, 2011 at 09:41:27PM -0000, Thomas Gleixner wrote:
> handle_prio_irq is almost identical with handle_fasteoi_irq. The
> subtle differences are
> 
> 1) The handler checks for IRQ_DISABLED after the device handler has
>    been called. In case it's set it masks the interrupt.
> 
> 2) When the handler sees IRQ_DISABLED on entry it masks the interupt
>    in the same way as handle_fastoei_irq, but does not set the
>    IRQ_PENDING flag.
> 
> 3) Instead of gracefully handling a recursive interrupt it crashes the
>    kernel.
> 
> #1 is just relevant when a device handler calls disable_irq_nosync()
>    and it does not matter whether we mask the interrupt right away or
>    not. We handle lazy masking for disable_irq anyway, so there is no
>    real reason to have this extra mask in place.
> 
> #2 will prevent the resend of a pending interrupt, which can result in
>    lost interrupts for edge type interrupts. For level type interrupts
>    the resend is a noop in the generic code. According to the
>    datasheet all interrupts are level type, so marking them as such
>    will result in the exact same behaviour as the private
>    handle_prio_irq implementation.
> 
> #3 is just stupid. Crashing the kernel instead of handling a problem
>    gracefully is just wrong. With the current semantics- all handlers
>    run with interrupts disabled - this is even more wrong.
> 
> Rename ack to eoi, remove the unused mask_ack, switch to
> handle_fasteoi_irq and remove the private function.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
> Cc: linux-arm-kernel@lists.infradead.org
I have no access to a ns9xxx machine, but this looks sane.

Acked-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2011-02-03  7:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02 21:41 [patch 0/8] genirq: Further cleanups for .39 Thomas Gleixner
2011-02-02 21:41 ` [patch 1/8] genirq: Remove bogus conditional Thomas Gleixner
2011-02-19 12:22   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2011-02-02 21:41 ` [patch 2/8] genirq: Consolidate startup/shutdown of interrupts Thomas Gleixner
2011-02-19 12:22   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2011-02-02 21:41 ` [patch 3/8] genirq: Do not fiddle with IRQ_MASKED in handle_edge_irq() Thomas Gleixner
2011-02-19 12:24   ` [tip:irq/core] " tip-bot for Thomas Gleixner
2011-02-02 21:41 ` [patch 4/8] genirq: Introduce IRQ_EDGE_EOI flag Thomas Gleixner
2011-02-02 21:41 ` [patch 5/8] powerpc: cell: Use handle_edge_irq Thomas Gleixner
2011-02-02 21:41 ` [patch 6/8] arm: ns9xxx: Remove private irq flow handler Thomas Gleixner
2011-02-03  7:56   ` Uwe Kleine-König [this message]
2011-03-28 17:13   ` [tip:irq/urgent] arm: Ns9xxx: " tip-bot for Thomas Gleixner
2011-02-02 21:41 ` [patch 7/8] m68knommu: 5772: Replace " Thomas Gleixner
2011-02-02 22:27   ` Greg Ungerer
2011-02-02 22:37     ` Thomas Gleixner
2011-02-02 22:41       ` Greg Ungerer
2011-02-02 21:41 ` [patch 8/8] genirq: Make handle_IRQ_event private to the core code Thomas Gleixner

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=20110203075623.GB30452@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --subject='Re: [patch 6/8] arm: ns9xxx: Remove private irq flow handler' \
    /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).