[Top] [All Lists]

Re: [patch 3/5] MIPS: Octeon: Simplify irq_cpu_on/offline irq chip funct

To: Thomas Gleixner <>
Subject: Re: [patch 3/5] MIPS: Octeon: Simplify irq_cpu_on/offline irq chip functions
From: David Daney <>
Date: Sun, 27 Mar 2011 17:12:23 -0700
Cc: Ralf Baechle <>, David Daney <>,
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=y5d/q84vUAxr39JMF+UunogMkCdFFng+Ew5qB1o06hs=; b=gZikCx1E0S1NmPUWcM8QKOSDwNOGQYzzBYpU7oq2MuPGW7Wg9gI5r5FGjfnGIrlrnT OqxGupeExoiBccbN+xb4ExB2p/z05J0nMmMFJQlTjC5hSplbKitq8AeecQcBrYJKWGro 62j7/7M1wpBJfoU70jCWWE4s/Lc1xFKP80tkY=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=wAi5FOiEu6LfyBRPzSuV/GAsOcSjpnN46VQYa5djyuDaJqriZ608/epdyXVCgjQutn EcYmp1XFU0EhANfVapU7Toil/gW925vxzfImUZqjsBZCLbP/SXoGluU1ukMIKSFUnNdt tn9+LYv9LpKxypUoJaO/NE6/fTAPazfSXosKo=
In-reply-to: <alpine.LFD.2.00.1103272337260.31464@localhost6.localdomain6>
Original-recipient: rfc822;
References: <> <> <> <alpine.LFD.2.00.1103272326270.31464@localhost6.localdomain6> <alpine.LFD.2.00.1103272337260.31464@localhost6.localdomain6>
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110307 Fedora/3.1.9-0.38.b3pre.fc13 Thunderbird/3.1.9
On 03/27/2011 02:41 PM, Thomas Gleixner wrote:
On Sun, 27 Mar 2011, Thomas Gleixner wrote:
On Sun, 27 Mar 2011, David Daney wrote:

On 03/27/2011 09:22 AM, Thomas Gleixner wrote:
Make use of the IRQCHIP_ONOFFLINE_ENABLED flag and remove the
wrappers. Use irqd_irq_disabled() instead of desc->status, which will
go away.

I rewrote my patch set and was testing it.  Interesting that I came up with a
function with almost the same name and purpose.

However my function told us if the irq was masked *or* disabled.  The idea
being a function that returns true if the irq could fire.  We cannot be
enabling the interrupt in the controller if it is masked.

For example I need to test this when adjusting affinity, and taking CPUs on
and off line.

I don't think your genirq changes can tell the me information I really need in
their current state.  I think we need to consider how the masked state
interacts with IRQCHIP_ONOFFLINE_ENABLED and irqd_irq_disabled().
So you want to know whether the core code masked the interrupt or
not. In your case that's equivivalent to the irqd_irq_disabled check
simply because you provide a irq_disable() callback which prevents the
lazy disable mechanism.

     CPU1                                                 CPU2

enable the irq on some CPU1.

         interrupt fires again (incorrectly)

In my set affinity code I want to know if it is masked, so I don't inadvertently re-enable it.

David Daney

<Prev in Thread] Current Thread [Next in Thread>