From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: Baruch Siach <baruch@tkos.co.il>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [BUG] irq_dispose_mapping after irq request failure
Date: Tue, 12 Feb 2013 19:53:37 +1100 [thread overview]
Message-ID: <1360659217.2035.5.camel@pasglop> (raw)
In-Reply-To: <20130212061822.GA8977@concordia>
On Tue, 2013-02-12 at 17:18 +1100, Michael Ellerman wrote:
>
> I don't think you can, "active" is not well defined. Other code may have
> done nothing other than create the mapping and remembered the virq,
> which will break if you destroy the mapping. Or?
Active as in "requested". Yes there's a potential problems with multiple
requests for mappings & shared interrupts. This is not a problem for PCI
on powerpc because we don't free those mappings afaik.
> I agree refcounting is not fun. It'll end up with the same mess as
> of_node_get/put() where practically every 2nd piece of code leaks
> references.
>
> I guess we can't go the other way, and say that mapping the same hwirq
> twice is an error.
Might be worth it, and force the sharing case to be handled at some kind
of upper level (bus or platform).
Ben.
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: Grant Likely <grant.likely@secretlab.ca>,
Baruch Siach <baruch@tkos.co.il>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [BUG] irq_dispose_mapping after irq request failure
Date: Tue, 12 Feb 2013 19:53:37 +1100 [thread overview]
Message-ID: <1360659217.2035.5.camel@pasglop> (raw)
In-Reply-To: <20130212061822.GA8977@concordia>
On Tue, 2013-02-12 at 17:18 +1100, Michael Ellerman wrote:
>
> I don't think you can, "active" is not well defined. Other code may have
> done nothing other than create the mapping and remembered the virq,
> which will break if you destroy the mapping. Or?
Active as in "requested". Yes there's a potential problems with multiple
requests for mappings & shared interrupts. This is not a problem for PCI
on powerpc because we don't free those mappings afaik.
> I agree refcounting is not fun. It'll end up with the same mess as
> of_node_get/put() where practically every 2nd piece of code leaks
> references.
>
> I guess we can't go the other way, and say that mapping the same hwirq
> twice is an error.
Might be worth it, and force the sharing case to be handled at some kind
of upper level (bus or platform).
Ben.
next prev parent reply other threads:[~2013-02-12 8:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-11 5:31 [BUG] irq_dispose_mapping after irq request failure Baruch Siach
2013-02-11 6:19 ` Michael Ellerman
2013-02-11 6:19 ` Michael Ellerman
2013-02-11 6:44 ` Baruch Siach
2013-02-11 6:44 ` Baruch Siach
2013-02-11 20:52 ` Grant Likely
2013-02-11 20:52 ` Grant Likely
2013-02-12 0:51 ` Benjamin Herrenschmidt
2013-02-12 0:51 ` Benjamin Herrenschmidt
2013-02-12 6:18 ` Michael Ellerman
2013-02-12 6:18 ` Michael Ellerman
2013-02-12 8:53 ` Benjamin Herrenschmidt [this message]
2013-02-12 8:53 ` Benjamin Herrenschmidt
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=1360659217.2035.5.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=baruch@tkos.co.il \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=michael@ellerman.id.au \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.