From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: jgchunter@gmail.com, Rob Herring <rob.herring@calxeda.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Thomas Gleixner <tglx@linutronix.de>,
devicetree-discuss@lists.ozlabs.org,
Benoit Cousson <b-cousson@ti.com>,
Tony Lindgren <tony@atomide.com>,
Stephen Warren <swarren@nvidia.com>,
linux-omap <linux-omap@vger.kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/1] of/irq: store IRQ trigger/level in struct resource flags
Date: Thu, 06 Jun 2013 10:47:55 +0200 [thread overview]
Message-ID: <51B04CBB.1000405@collabora.co.uk> (raw)
In-Reply-To: <20130605233422.3D6DE3E10E4@localhost>
On 06/06/2013 01:34 AM, Grant Likely wrote:
> On Fri, 5 Apr 2013 09:48:08 +0200, Javier Martinez Canillas <javier.martinez@collabora.co.uk> wrote:
> [...]
>> irq_of_parse_and_map() calls to irq_create_of_mapping() which calls to
>> the correct xlate function handler according to "#interrupt-cells"
>> (irq_domain_xlate_onecell or irq_domain_xlate_twocell) and to
>> irq_set_irq_type() to set the IRQ type.
>>
>> But the type is never returned so it can't be saved on the IRQ struct
>> resource flags member.
>>
>> This means that drivers that need the IRQ type/level flags defined in
>> the DT won't be able to get it.
>>
>> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> [...]
>> diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
>> index 535cecf..98aec57 100644
>> --- a/include/linux/of_irq.h
>> +++ b/include/linux/of_irq.h
>> @@ -66,6 +66,10 @@ extern int of_irq_map_one(struct device_node *device, int index,
>> extern unsigned int irq_create_of_mapping(struct device_node *controller,
>> const u32 *intspec,
>> unsigned int intsize);
>> +extern unsigned int irq_create_of_mapping_type(struct device_node *controller,
>> + const u32 *intspec,
>> + unsigned int intsize,
>> + unsigned int *otype);
Hi Grant, thanks a lot for your feedback.
>
> I count 11 users of irq_create_of_mapping(). That's a managable number
> to update.
Yes, but since of_irq_to_resource() doesn't call irq_create_of_mapping()
directly but it does though irq_of_parse_and_map(), then this function signature
has to be modified too.
I'm counting 223 users of irq_of_parse_and_map() so the change is not that small
anymore. Another approach is to call of_irq_map_one() and
irq_create_of_mapping() directly from of_irq_to_resource() instead of using
irq_of_parse_and_map() but I don't like that...
> Instead of creating a new function, please modify the
> existing one and split it off into a separate patch.
But that won't break git bisect-ability? or do you mean to first just change the
functions signatures by adding an argument and update its users and then in a
separate patch do the actual change to the functions to store the IRQ?
> Otherwise the patch looks fine to me.
>
> g.
>
Best regards,
Javier
WARNING: multiple messages have this Message-ID (diff)
From: javier.martinez@collabora.co.uk (Javier Martinez Canillas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] of/irq: store IRQ trigger/level in struct resource flags
Date: Thu, 06 Jun 2013 10:47:55 +0200 [thread overview]
Message-ID: <51B04CBB.1000405@collabora.co.uk> (raw)
In-Reply-To: <20130605233422.3D6DE3E10E4@localhost>
On 06/06/2013 01:34 AM, Grant Likely wrote:
> On Fri, 5 Apr 2013 09:48:08 +0200, Javier Martinez Canillas <javier.martinez@collabora.co.uk> wrote:
> [...]
>> irq_of_parse_and_map() calls to irq_create_of_mapping() which calls to
>> the correct xlate function handler according to "#interrupt-cells"
>> (irq_domain_xlate_onecell or irq_domain_xlate_twocell) and to
>> irq_set_irq_type() to set the IRQ type.
>>
>> But the type is never returned so it can't be saved on the IRQ struct
>> resource flags member.
>>
>> This means that drivers that need the IRQ type/level flags defined in
>> the DT won't be able to get it.
>>
>> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> [...]
>> diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h
>> index 535cecf..98aec57 100644
>> --- a/include/linux/of_irq.h
>> +++ b/include/linux/of_irq.h
>> @@ -66,6 +66,10 @@ extern int of_irq_map_one(struct device_node *device, int index,
>> extern unsigned int irq_create_of_mapping(struct device_node *controller,
>> const u32 *intspec,
>> unsigned int intsize);
>> +extern unsigned int irq_create_of_mapping_type(struct device_node *controller,
>> + const u32 *intspec,
>> + unsigned int intsize,
>> + unsigned int *otype);
Hi Grant, thanks a lot for your feedback.
>
> I count 11 users of irq_create_of_mapping(). That's a managable number
> to update.
Yes, but since of_irq_to_resource() doesn't call irq_create_of_mapping()
directly but it does though irq_of_parse_and_map(), then this function signature
has to be modified too.
I'm counting 223 users of irq_of_parse_and_map() so the change is not that small
anymore. Another approach is to call of_irq_map_one() and
irq_create_of_mapping() directly from of_irq_to_resource() instead of using
irq_of_parse_and_map() but I don't like that...
> Instead of creating a new function, please modify the
> existing one and split it off into a separate patch.
But that won't break git bisect-ability? or do you mean to first just change the
functions signatures by adding an argument and update its users and then in a
separate patch do the actual change to the functions to store the IRQ?
> Otherwise the patch looks fine to me.
>
> g.
>
Best regards,
Javier
next prev parent reply other threads:[~2013-06-06 8:48 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-05 7:48 [PATCH 1/1] of/irq: store IRQ trigger/level in struct resource flags Javier Martinez Canillas
2013-04-05 7:48 ` Javier Martinez Canillas
2013-04-08 22:05 ` Rob Herring
2013-04-08 22:05 ` Rob Herring
2013-04-08 22:16 ` Stephen Warren
2013-04-08 22:16 ` Stephen Warren
2013-04-08 22:56 ` Javier Martinez Canillas
2013-04-08 22:56 ` Javier Martinez Canillas
2013-04-09 2:45 ` Rob Herring
2013-04-09 2:45 ` Rob Herring
2013-04-09 8:26 ` Javier Martinez Canillas
2013-04-09 8:26 ` Javier Martinez Canillas
2013-04-09 8:28 ` Javier Martinez Canillas
2013-04-09 8:28 ` Javier Martinez Canillas
2013-04-18 12:17 ` Javier Martinez Canillas
2013-04-18 12:17 ` Javier Martinez Canillas
2013-04-08 22:44 ` Javier Martinez Canillas
2013-04-08 22:44 ` Javier Martinez Canillas
2013-06-05 23:26 ` Grant Likely
2013-06-05 23:26 ` Grant Likely
2013-06-06 8:00 ` Javier Martinez Canillas
2013-06-06 8:00 ` Javier Martinez Canillas
2013-06-06 8:50 ` Jean-Christophe PLAGNIOL-VILLARD
2013-06-06 8:50 ` Jean-Christophe PLAGNIOL-VILLARD
2013-06-06 9:13 ` Javier Martinez Canillas
2013-06-06 9:13 ` Javier Martinez Canillas
2013-06-06 9:58 ` Tomasz Figa
2013-06-06 9:58 ` Tomasz Figa
2013-06-05 23:34 ` Grant Likely
2013-06-05 23:34 ` Grant Likely
2013-06-06 8:47 ` Javier Martinez Canillas [this message]
2013-06-06 8:47 ` Javier Martinez Canillas
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=51B04CBB.1000405@collabora.co.uk \
--to=javier.martinez@collabora.co.uk \
--cc=b-cousson@ti.com \
--cc=benh@kernel.crashing.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=jgchunter@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=swarren@nvidia.com \
--cc=tglx@linutronix.de \
--cc=tony@atomide.com \
/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.