Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1228991
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] irqchip/gicv3-its: Handle OF device tree "msi-map" properties. |
| Date | 2015-09-21 04:10 +0200 |
| Message-ID | <qaYIh-1bj-3@gated-at.bofh.it> (permalink) |
| References | <q9LN8-2Wt-31@gated-at.bofh.it> <q9LN8-2Wt-35@gated-at.bofh.it> <q9ZGr-67w-25@gated-at.bofh.it> <qaYIh-1bj-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Sep 18, 2015 at 12:54 PM, David Daney <ddaney@caviumnetworks.com> wrote:
> On 09/18/2015 01:51 AM, Marc Zyngier wrote:
>>
>> On Thu, 17 Sep 2015 11:00:59 -0700
>> David Daney <ddaney.cavm@gmail.com> wrote:
>>
>> Hi David,
>>
>>> From: David Daney <david.daney@cavium.com>
>>>
>>> Search up the device hierarchy to find devices with a "msi-map"
>>> property, if found apply the mapping to the GIC device id.
[...]
>>> + masked_devid = msi_mask & dev_alias.dev_id;
>>> + matched = false;
>>> + while (msi_map_len >= 4 * sizeof(__be32)) {
>>> + rid_base = be32_to_cpup(msi_map + 0);
>>> + phandle = be32_to_cpup(msi_map + 1);
>>> + msi_base = be32_to_cpup(msi_map + 2);
>>> + rid_len = be32_to_cpup(msi_map + 3);
>>
>>
>> Ouch. I wonder if that kind of thing should deserve a generic helper.
>> of_property_read_u32_array_from_index()? Rob, what do you think?
>
>
> I think it is possible to add too many wrapper functions. IMO, this is not
> too unreadable.
Given you are not reading into an array, I don't think a new helper
would help. You could just use of_property_read_u32_index though.
Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 2/2] irqchip/gicv3-its: Handle OF device tree "msi-map" properties. David Daney <ddaney.cavm@gmail.com> - 2015-09-17 20:10 +0200
Re: [PATCH 2/2] irqchip/gicv3-its: Handle OF device tree "msi-map" properties. Marc Zyngier <marc.zyngier@arm.com> - 2015-09-18 11:00 +0200
Re: [PATCH 2/2] irqchip/gicv3-its: Handle OF device tree "msi-map" properties. Rob Herring <robh@kernel.org> - 2015-09-21 04:10 +0200
Re: [PATCH 2/2] irqchip/gicv3-its: Handle OF device tree "msi-map" properties. Marc Zyngier <marc.zyngier@arm.com> - 2015-09-21 18:00 +0200
Re: [PATCH 2/2] irqchip/gicv3-its: Handle OF device tree "msi-map" properties. David Daney <ddaney@caviumnetworks.com> - 2015-09-21 18:40 +0200
Re: [PATCH 2/2] irqchip/gicv3-its: Handle OF device tree "msi-map" properties. Marc Zyngier <marc.zyngier@arm.com> - 2015-09-21 19:10 +0200
csiph-web