From: David Daney <ddaney@caviumnetworks.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-gpio@vger.kernel.org, David Daney <david.daney@cavium.com>,
Linus Walleij <linus.walleij@linaro.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gpio: thunderx: select IRQ_DOMAIN_HIERARCHY instead of depends on
Date: Wed, 6 Sep 2017 18:18:45 -0700 [thread overview]
Message-ID: <cdf28d33-03ee-f46f-db3e-de1d8928ea50@caviumnetworks.com> (raw)
In-Reply-To: <CAK7LNAQ9kjUKFL6+Hm+XjQvUDTp6aeeCLQJcgin=Fs446cdQRw@mail.gmail.com>
On 09/06/2017 06:03 PM, Masahiro Yamada wrote:
> Hi David,
>
>
> 2017-09-07 2:36 GMT+09:00 David Daney <ddaney@caviumnetworks.com>:
>> On 09/05/2017 09:20 PM, Masahiro Yamada wrote:
>>>
>>> Hi David,
>>>
>>>
>>> 2017-09-06 11:09 GMT+09:00 David Daney <ddaney@caviumnetworks.com>:
>>>>
>>>> On 09/05/2017 06:40 PM, Masahiro Yamada wrote:
>>>>>
>>>>>
>>>>> IRQ_DOMAIN_HIERARCHY is not user-configurable, but supposed to be
>>>>> selected by drivers that need IRQ domain hierarchy support.
>>>>>
>>>>> GPIO_THUNDERX is the only user of "depends on IRQ_DOMAIN_HIERARCHY".
>>>>> This means, we can not enable GPIO_THUNDERX unless other drivers
>>>>> select IRQ_DOMAIN_HIERARCHY elsewhere. This is odd. Flip the logic.
>>>>>
>>>>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>>>
>>>>
>>>>
>>>> IRQ_DOMAIN_HIERARCHY is set as a result of ARCH_THUNDER (this SoC
>>>> hardware),
>>>> so it actually works as-is.
>>>
>>>
>>>
>>> Right, ARCH_THUNDER does not select it directly,
>>> but does it indirectly. (this is not so clear...)
>>>
>>> ARCH_THUNDER -> ARM64 -> ARM_GIC -> IRQ_DOMAIN_HIERARCHY
>>>
>>>
>>>
>>>> That said, this looks like a reasonable
>>>> improvement, and will allow the COMPILE_TEST to enable it, so...
>>>>
>>>> Acked-by: David Daney <david.daney@cavium.com>
>>>
>>>
>>>
>>> BTW, I could not understand your intention of
>>> (64BIT && COMPILE_TEST)
>>>
>>
>> The driver uses readq()/writeq(), which are not available in some 32BIT
>> kernels. So to ensure that it can build without error we depend on 64BIT as
>> a proxy for the availability of readq()/writeq()
>>
>>
>
>
> IMHO, drivers code should not depend on CPU architecture too much.
>
The CPU and the device are in a SoC (both on the same silicon die),
there is no way they can be used apart from one another.
>
> Does the following make sense for your driver?
>
>
> - split {read,write}q into two transactions of {read,write}l
No. The registers must be accessed with 64-bit operations.
We are not going to screw around complicating the driver so that it can
work on hypothetical non-existent systems.
If we ever put this GPIO hardware unit in a system with a 32-bit CPU, we
will at that time, and only then, modify it to work with 32-bit operations.
>
> or
>
> - include <linux/io-64-nonatomic-hi-lo.h> or
> <linux-io-64-nonatomic-lo-hi.h>
> (choose a suitable one for your driver)
>
>
>
>
next prev parent reply other threads:[~2017-09-07 1:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-06 1:40 [PATCH] gpio: thunderx: select IRQ_DOMAIN_HIERARCHY instead of depends on Masahiro Yamada
2017-09-06 2:09 ` David Daney
2017-09-06 4:20 ` Masahiro Yamada
2017-09-06 17:36 ` David Daney
2017-09-07 1:03 ` Masahiro Yamada
2017-09-07 1:18 ` David Daney [this message]
2017-09-12 9:24 ` Linus Walleij
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=cdf28d33-03ee-f46f-db3e-de1d8928ea50@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=david.daney@cavium.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yamada.masahiro@socionext.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 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).