* [PATCH/RFC 0/3] of/overlay: Update aliases when added or removed
@ 2015-06-30 14:51 Geert Uytterhoeven
[not found] ` <1435675876-2159-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2015-06-30 14:51 UTC (permalink / raw)
To: Pantelis Antoniou, Grant Likely, Rob Herring
Cc: devicetree, linux-kernel, Geert Uytterhoeven
Hi,
Currently the list of aliases is not updated when a DT overlay that adds
an alias is loaded or unloaded. This break drivers (e.g. serial) that
rely on of_alias_get_id(). This RFC patch series fixes that.
This is definitely not a final solution to be applied, as (1) it doesn't
fix all possible cases, and as (2) there's an unresolved issue w.r.t.
object lifetime. More about this in the last patch.
But it's Good Enough For My Use Case(TM), which is enabling/disabling
serial ports on expansion headers by (un)loading DTBOs.
Thanks for your comments!
Geert Uytterhoeven (3):
[RFC] of: Extract of_alias_create()
[RFC] of: Add of_alias_destroy()
[RFC] of/dynamic: Update list of aliases on aliases changes
drivers/of/base.c | 72 +++++++++++++++++++++++++++++++++-------------------
drivers/of/dynamic.c | 24 ++++++++++++++++++
include/linux/of.h | 3 +++
3 files changed, 73 insertions(+), 26 deletions(-)
--
1.9.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH/RFC 0/3] of/overlay: Update aliases when added or removed
[not found] ` <1435675876-2159-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2015-06-30 17:24 ` Grant Likely
0 siblings, 0 replies; 4+ messages in thread
From: Grant Likely @ 2015-06-30 17:24 UTC (permalink / raw)
To: Pantelis Antoniou, Rob Herring
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven
On Tue, 30 Jun 2015 16:51:13 +0200
, Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
wrote:
> Hi,
>
> Currently the list of aliases is not updated when a DT overlay that adds
> an alias is loaded or unloaded. This break drivers (e.g. serial) that
> rely on of_alias_get_id(). This RFC patch series fixes that.
>
> This is definitely not a final solution to be applied, as (1) it doesn't
> fix all possible cases, and as (2) there's an unresolved issue w.r.t.
> object lifetime. More about this in the last patch.
>
> But it's Good Enough For My Use Case(TM), which is enabling/disabling
> serial ports on expansion headers by (un)loading DTBOs.
>
> Thanks for your comments!
>
> Geert Uytterhoeven (3):
> [RFC] of: Extract of_alias_create()
> [RFC] of: Add of_alias_destroy()
> [RFC] of/dynamic: Update list of aliases on aliases changes
Looks good to me. I've made comments on patch 3. Also, you'll need to
include unittests before I can merge it.
g.
>
> drivers/of/base.c | 72 +++++++++++++++++++++++++++++++++-------------------
> drivers/of/dynamic.c | 24 ++++++++++++++++++
> include/linux/of.h | 3 +++
> 3 files changed, 73 insertions(+), 26 deletions(-)
>
> --
> 1.9.1
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH/RFC 0/3] of/overlay: Update aliases when added or removed
@ 2015-07-29 11:52 Robert Abel
[not found] ` <CAMdRc4EFOW8t-Sfm-4Pnk1YoSPNhFO5Qb-iViTThy5WCXuH1eA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Robert Abel @ 2015-07-29 11:52 UTC (permalink / raw)
To: geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ,
grant.likely-QSEj5FYQhm4dnm+yROfE0A
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA
Hi Geert, Hi Grant,
On 30 Jun 2015 Grant Likely wroke
> Looks good to me. I've made comments on patch 3. Also, you'll need to include unittests before I can merge it.
> [...]
>> - Should the OF core handle this itself, by registering a notifier
>> using of_reconfig_notifier_register()?
>Yes. Let's not add new hooks.
Any news on this? Were the patches applied to any public tree or are
there follow-up patches that address the issue using
of_reconfig_notifier_register?
I'm off-list, please CC me.
Regards,
Robert
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH/RFC 0/3] of/overlay: Update aliases when added or removed
[not found] ` <CAMdRc4EFOW8t-Sfm-4Pnk1YoSPNhFO5Qb-iViTThy5WCXuH1eA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-08-06 16:55 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2015-08-06 16:55 UTC (permalink / raw)
To: Robert Abel
Cc: Geert Uytterhoeven, Grant Likely,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi Robert,
On Wed, Jul 29, 2015 at 1:52 PM, Robert Abel
<rabel-Ejy783gw450hGw5VS8l+XCM2BslAju9D@public.gmane.org> wrote:
> On 30 Jun 2015 Grant Likely wroke
>> Looks good to me. I've made comments on patch 3. Also, you'll need to include unittests before I can merge it.
>> [...]
>>> - Should the OF core handle this itself, by registering a notifier
>>> using of_reconfig_notifier_register()?
>>Yes. Let's not add new hooks.
>
> Any news on this? Were the patches applied to any public tree or are
> there follow-up patches that address the issue using
> of_reconfig_notifier_register?
In the mean time I made some improvements (e.g. but removed aliases
on a list instead of freeing them, which causes crashes when using the
wrong deallocator), but I haven't implemented the notifier yet.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-06 16:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-29 11:52 [PATCH/RFC 0/3] of/overlay: Update aliases when added or removed Robert Abel
[not found] ` <CAMdRc4EFOW8t-Sfm-4Pnk1YoSPNhFO5Qb-iViTThy5WCXuH1eA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-06 16:55 ` Geert Uytterhoeven
-- strict thread matches above, loose matches on Subject: below --
2015-06-30 14:51 Geert Uytterhoeven
[not found] ` <1435675876-2159-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2015-06-30 17:24 ` Grant Likely
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).