[PATCH] drivers/of: Introduce ARCH_HAS_OWN_OF_NUMA

Dan Williams dan.j.williams at intel.com
Tue Apr 10 12:29:41 AEST 2018


On Mon, Apr 9, 2018 at 6:02 PM, Rob Herring <robh at kernel.org> wrote:
> On Mon, Apr 9, 2018 at 4:05 PM, Dan Williams <dan.j.williams at intel.com> wrote:
>> On Mon, Apr 9, 2018 at 1:52 PM, Rob Herring <robh at kernel.org> wrote:
>>> On Mon, Apr 9, 2018 at 2:46 AM, Oliver O'Halloran <oohall at gmail.com> wrote:
>>>> Some OF platforms (pseries and some SPARC systems) has their own
>>>> implementations of NUMA affinity detection rather than using the generic
>>>> OF_NUMA driver, which mainly exists for arm64. For other platforms one
>>>> of two fallbacks provided by the base OF driver are used depending on
>>>> CONFIG_NUMA.
>>>>
>>>> In the CONFIG_NUMA=n case the fallback is an inline function in of.h.
>>>> In the =y case the fallback is a real function which is defined as a
>>>> weak symbol so that it may be overwritten by the architecture if desired.
>>>>
>>>> The problem with this arrangement is that the real implementations all
>>>> export of_node_to_nid(). Unfortunately it's not possible to export the
>>>> fallback since it would clash with the non-weak version. As a result
>>>> we get build failures when:
>>>>
>>>> a) CONFIG_NUMA=y && CONFIG_OF=y, and
>>>> b) The platform doesn't implement of_node_to_nid(), and
>>>> c) A module uses of_node_to_nid()
>>>>
>>>> Given b) will be true for most platforms this is fairly easy to hit
>>>> and has been observed on ia64 and x86.
>>>
>>> How specifically do we hit this? The only module I see using
>>> of_node_to_nid in mainline is Cell EDAC driver.
>>
>> The of_pmem driver is using it currently pending for a 4.17 pull
>> request. Stephen hit the compile failure in -next.
>
> You mean the stuff reviewed last week in the middle of the merge
> window? Sounds like 4.18 material to me.

It was originally posted for 4.16. The reposting and review came in
late this cycle, but outside of a critical issue I'd rather not delay
it again. The build error issue is resolved by not allowing modular
builds of this driver for now.

>
> Rob


More information about the Linuxppc-dev mailing list