From: Rob Herring <email@example.com> To: Zev Weiss <firstname.lastname@example.org>, Greg Kroah-Hartman <email@example.com> Cc: "Krzysztof Wilczyński" <firstname.lastname@example.org>, "moderated list:ARM/ASPEED MACHINE SUPPORT" <email@example.com>, "Rafael J. Wysocki" <firstname.lastname@example.org>, "Daniel Vetter" <email@example.com>, "Jeremy Kerr" <firstname.lastname@example.org>, "Francis Laniel" <email@example.com>, "Frank Rowand" <firstname.lastname@example.org>, "OpenBMC Maillist" <email@example.com>, "Andy Shevchenko" <firstname.lastname@example.org>, "Andrey Konovalov" <email@example.com>, "Alexey Dobriyan" <firstname.lastname@example.org>, devicetree <email@example.com>, "Kees Cook" <firstname.lastname@example.org>, "Jonathan Cameron" <Jonathan.Cameron@huawei.com>, "Dan Williams" <email@example.com>, "linux-arm Mailing List" <firstname.lastname@example.org>, "Daniel Axtens" <email@example.com>, "Andy Shevchenko" <firstname.lastname@example.org>, "Andrew Jeffery" <email@example.com>, "Nick Desaulniers" <firstname.lastname@example.org>, "Linux Kernel Mailing List" <email@example.com>, "Andrew Morton" <firstname.lastname@example.org>, "Heiner Kallweit" <email@example.com> Subject: Re: [PATCH 0/9] Dynamic DT device nodes Date: Thu, 7 Oct 2021 15:03:43 -0500 [thread overview] Message-ID: <CAL_JsqLk-CqKVgWp3=XccHrCdQgdGoezB6=HAXMDe1Q5R4-0HA@mail.gmail.com> (raw) In-Reply-To: <YV8VGeMreR6NJad4@hatter.bewilderbeest.net> On Thu, Oct 7, 2021 at 10:41 AM Zev Weiss <firstname.lastname@example.org> wrote: > > On Thu, Oct 07, 2021 at 03:31:39AM PDT, Greg Kroah-Hartman wrote: > >On Thu, Oct 07, 2021 at 02:05:41AM -0700, Zev Weiss wrote: > >> On Thu, Oct 07, 2021 at 12:04:41AM PDT, Andy Shevchenko wrote: > >> > On Thu, Oct 7, 2021 at 3:10 AM Zev Weiss <email@example.com> wrote: > >> > > This patch series is in some ways kind of a v2 for the "Dynamic > >> > > aspeed-smc flash chips via 'reserved' DT status" series I posted > >> > > previously , but takes a fairly different approach suggested by Rob > >> > > Herring  and doesn't actually touch the aspeed-smc driver or > >> > > anything in the MTD subsystem, so I haven't marked it as such. > >> > > > >> > > To recap a bit of the context from that series, in OpenBMC there's a > >> > > need for certain devices (described by device-tree nodes) to be able > >> > > to be attached and detached at runtime (for example the SPI flash for > >> > > the host's firmware, which is shared between the BMC and the host but > >> > > can only be accessed by one or the other at a time). > >> > > >> > This seems quite dangerous. Why do you need that? > >> > >> Sometimes the host needs access to the flash (it's the host's firmware, > >> after all), sometimes the BMC needs access to it (e.g. to perform an > >> out-of-band update to the host's firmware). To achieve the latter, the > >> flash needs to be attached to the BMC, but that requires some careful > >> coordination with the host to arbitrate which one actually has access to it > >> (that coordination is handled by userspace, which then tells the kernel > >> explicitly when the flash should be attached and detached). > >> > >> What seems dangerous? > >> > >> > Why can't device tree overlays be used? > >> > >> I'm hoping to stay closer to mainline. The OpenBMC kernel has a documented > >> policy strongly encouraging upstream-first development: > >> https://github.com/openbmc/docs/blob/master/kernel-development.md > >> > >> I doubt Joel (the OpenBMC kernel maintainer) would be eager to start > >> carrying the DT overlay patches; I'd likewise strongly prefer to avoid > >> carrying them myself as additional downstream patches. Hence the attempt at > >> getting a solution to the problem upstream. > > > >Then why not work to get device tree overlays to be merged properly? TBC, it's 'just' the general purpose userspace interface to apply overlays that's missing. I did suggest what's done here as overlays are kind of an overkill for this usecase. Much easier to write to a sysfs file than write an overlay, compile it with dtc, and provide it to the kernel all just to enable a device. Perhaps this could also be supported in the driver model directly. Given the "what about ACPI question", that is probably what should be done unless the answer is we don't care. I think we'd just need a flag to create devices, but not bind automatically. Or maybe abusing driver_override can accomplish that. > >Don't work on a half-of-a-solution when the real solution is already > >here. > > > > I had been under the impression that the overlay patches had very dim > prospects of ever being accepted and that this might be a more tractable > alternative, but apparently was mistaken -- I'll look into what the > outstanding issues were with that and perhaps take a stab at addressing > them. What's dim is the patches allowing any modification to any part of the DT. Any changes to a DT need to work (i.e. have some effect). For example, randomly changing/adding/removing properties wouldn't have any effect because they've probably already be read and used. What I've suggested before is some sort of registration of nodes allowed to apply child nodes and properties to. That would serve the add-on board usecases which have been the main driver of this to date. That also got hung up on defining interface nodes to add-on boards. Your scope is more limited and can be limited to that scope while using the same configfs interface. Rob
next prev parent reply other threads:[~2021-10-07 20:04 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-07 0:09 Zev Weiss 2021-10-07 0:09 ` [PATCH 1/9] sysfs: add sysfs_remove_bin_file_self() function Zev Weiss 2021-10-07 5:23 ` Greg Kroah-Hartman 2021-10-07 5:58 ` Zev Weiss 2021-10-07 6:12 ` Greg Kroah-Hartman 2021-10-07 6:55 ` Zev Weiss 2021-10-07 0:09 ` [PATCH 2/9] sysfs: add growable flag to struct bin_attribute Zev Weiss 2021-10-07 0:09 ` [PATCH 3/9] lib/string: add sysfs_buf_streq() Zev Weiss 2021-10-07 0:09 ` [PATCH 4/9] of: add self parameter to __of_sysfs_remove_bin_file() Zev Weiss 2021-10-07 5:25 ` Greg Kroah-Hartman 2021-10-07 0:09 ` [PATCH 5/9] of: add self parameter to of_update_property() Zev Weiss 2021-10-07 5:26 ` Greg Kroah-Hartman 2021-10-07 0:09 ` [PATCH 6/9] of: add support for 'dynamic' DT property Zev Weiss 2021-10-08 18:51 ` Frank Rowand 2021-10-08 19:19 ` Frank Rowand 2021-10-11 13:58 ` Frank Rowand 2021-10-11 14:46 ` Frank Rowand 2021-10-11 17:35 ` Zev Weiss 2021-10-07 0:09 ` [PATCH 7/9] of: make OF_DYNAMIC selectable independently of OF_UNITTEST Zev Weiss 2021-10-08 19:01 ` Frank Rowand 2021-10-07 0:09 ` [PATCH 8/9] dt-bindings: document new 'dynamic' common property Zev Weiss 2021-10-07 5:26 ` Greg Kroah-Hartman 2021-10-07 6:03 ` Zev Weiss 2021-10-07 0:09 ` [PATCH 9/9] ARM: dts: aspeed: Add e3c246d4i BIOS flash device Zev Weiss 2021-10-07 2:46 ` [PATCH 0/9] Dynamic DT device nodes Florian Fainelli 2021-10-07 5:44 ` Zev Weiss 2021-10-07 7:04 ` Andy Shevchenko 2021-10-07 9:05 ` Zev Weiss 2021-10-07 10:31 ` Greg Kroah-Hartman 2021-10-07 15:41 ` Zev Weiss 2021-10-07 20:03 ` Rob Herring [this message] 2021-10-08 5:41 ` Greg Kroah-Hartman 2021-10-08 19:43 ` Frank Rowand
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='CAL_JsqLk-CqKVgWp3=XccHrCdQgdGoezB6=HAXMDe1Q5R4-0HA@mail.gmail.com' \ --firstname.lastname@example.org \ --cc=Jonathan.Cameron@huawei.com \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH 0/9] Dynamic DT device nodes' \ /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
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).