Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1727111 > unrolled thread
| Started by | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| First post | 2017-09-06 03:50 +0200 |
| Last post | 2017-09-07 03:10 +0200 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] gpio: thunderx: select IRQ_DOMAIN_HIERARCHY instead of depends on Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-06 03:50 +0200
Re: [PATCH] gpio: thunderx: select IRQ_DOMAIN_HIERARCHY instead of depends on Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-06 06:30 +0200
Re: [PATCH] gpio: thunderx: select IRQ_DOMAIN_HIERARCHY instead of depends on Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-09-07 03:10 +0200
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2017-09-06 03:50 +0200 |
| Subject | [PATCH] gpio: thunderx: select IRQ_DOMAIN_HIERARCHY instead of depends on |
| Message-ID | <umxDz-2AZ-3@gated-at.bofh.it> |
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> --- drivers/gpio/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 3388d54..3f80f16 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -453,7 +453,8 @@ config GPIO_TS4800 config GPIO_THUNDERX tristate "Cavium ThunderX/OCTEON-TX GPIO" depends on ARCH_THUNDER || (64BIT && COMPILE_TEST) - depends on PCI_MSI && IRQ_DOMAIN_HIERARCHY + depends on PCI_MSI + select IRQ_DOMAIN_HIERARCHY select IRQ_FASTEOI_HIERARCHY_HANDLERS help Say yes here to support the on-chip GPIO lines on the ThunderX -- 2.7.4
[toc] | [next] | [standalone]
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2017-09-06 06:30 +0200 |
| Subject | Re: [PATCH] gpio: thunderx: select IRQ_DOMAIN_HIERARCHY instead of depends on |
| Message-ID | <umA8p-4yB-3@gated-at.bofh.it> |
| In reply to | #1727111 |
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) Why can COMPILE_TEST be enabled when 64BIT? -- Best Regards Masahiro Yamada
[toc] | [prev] | [next] | [standalone]
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2017-09-07 03:10 +0200 |
| Subject | Re: [PATCH] gpio: thunderx: select IRQ_DOMAIN_HIERARCHY instead of depends on |
| Message-ID | <umTup-1c6-1@gated-at.bofh.it> |
| In reply to | #1727145 |
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.
Does the following make sense for your driver?
- split {read,write}q into two transactions of {read,write}l
or
- include <linux/io-64-nonatomic-hi-lo.h> or
<linux-io-64-nonatomic-lo-hi.h>
(choose a suitable one for your driver)
--
Best Regards
Masahiro Yamada
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web