[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAL_JsqKc3Jgqz=gkhZjp2uH8X8jbKHz7B21QK_MCBgMD3+37cQ@mail.gmail.com>
Date: Tue, 10 May 2016 09:26:11 -0500
From: Rob Herring <robherring2@...il.com>
To: Pantelis Antoniou <pantelis.antoniou@...sulko.com>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
Frank Rowand <frowand.list@...il.com>,
Matt Porter <mporter@...sulko.com>,
Grant Likely <grant.likely@...retlab.ca>,
Koen Kooi <koen@...inion.thruhere.net>,
Guenter Roeck <linux@...ck-us.net>,
Marek Vasut <marex@...x.de>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] of: Support hashtable lookups for phandles
On Tue, May 10, 2016 at 8:45 AM, Pantelis Antoniou
<pantelis.antoniou@...sulko.com> wrote:
> Hi Rob,
>
>> On May 10, 2016, at 00:11 , Rob Herring <robherring2@...il.com> wrote:
>>
>> On Mon, May 9, 2016 at 3:38 PM, Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
>>> Hi Pantelis,
>>>
>>> On Mon, May 9, 2016 at 8:11 PM, Pantelis Antoniou
>>> <pantelis.antoniou@...sulko.com> wrote:
>>>> --- a/drivers/of/base.c
>>>> +++ b/drivers/of/base.c
>>>
>>>> @@ -1073,9 +1097,14 @@ struct device_node *of_find_node_by_phandle(phandle handle)
>>>> return NULL;
>>>>
>>>> raw_spin_lock_irqsave(&devtree_lock, flags);
>>>> - for_each_of_allnodes(np)
>>>> - if (np->phandle == handle)
>>>> - break;
>>>> + /* when we're ready use the hash table */
>>>> + if (of_phandle_ht_available() && !in_interrupt())
>>>
>>> I guess the !in_interrupt() test is because of the locking inside
>>> rhashtable_lookup_fast()?
>>
>> Not a use we should support. Just warn for anyone parsing DT in
>> interrupt context.
>>
>
> That’s not about users calling in interrupt context. It’s when we’re
> very early in the boot sequence we’re under interrupt context and
> calls to the hash methods cannot be made.
I don't understand. When exactly are we in interrupt context?
Rob
Powered by blists - more mailing lists