[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFpQfue5Fi0fFSnqHNg2ytCxAYfORVP_Y86ucz2k5HRuDA@mail.gmail.com>
Date: Tue, 12 Mar 2024 13:22:49 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Daniel Golle <daniel@...rotopia.org>
Cc: Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
Jens Axboe <axboe@...nel.dk>, Dave Chinner <dchinner@...hat.com>, Jan Kara <jack@...e.cz>,
Thomas Weißschuh <linux@...ssschuh.net>,
Christian Brauner <brauner@...nel.org>, Li Lingfeng <lilingfeng3@...wei.com>,
Damien Le Moal <dlemoal@...nel.org>, Min Li <min15.li@...sung.com>,
Adrian Hunter <adrian.hunter@...el.com>, Hannes Reinecke <hare@...e.de>,
Christian Loehle <CLoehle@...erstone.com>, Avri Altman <avri.altman@....com>,
Bean Huo <beanhuo@...ron.com>, Yeqi Fu <asuk4.q@...il.com>,
Victor Shih <victor.shih@...esyslogic.com.tw>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
"Ricardo B. Marliere" <ricardo@...liere.net>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mmc@...r.kernel.org, linux-block@...r.kernel.org,
Diping Zhang <diping.zhang@...inet.com>, Jianhui Zhao <zhaojh329@...il.com>,
Jieying Zeng <jieying.zeng@...inet.com>, Chad Monroe <chad.monroe@...ran.com>,
Adam Fox <adam.fox@...ran.com>, John Crispin <john@...ozen.org>
Subject: Re: [RFC PATCH v2 0/8] nvmem: add block device NVMEM provider
On Tue, 5 Mar 2024 at 21:23, Daniel Golle <daniel@...rotopia.org> wrote:
>
> On embedded devices using an eMMC it is common that one or more (hw/sw)
> partitions on the eMMC are used to store MAC addresses and Wi-Fi
> calibration EEPROM data.
>
> Implement an NVMEM provider backed by block devices as typically the
> NVMEM framework is used to have kernel drivers read and use binary data
> from EEPROMs, efuses, flash memory (MTD), ...
>
> In order to be able to reference hardware partitions on an eMMC, add code
> to bind each hardware partition to a specific firmware subnode.
>
> This series is meant to open the discussion on how exactly the device
> tree schema for block devices and partitions may look like, and even
> if using the block layer to back the NVMEM device is at all the way to
> go -- to me it seemed to be a good solution because it will be reuable
> e.g. for (normal, software GPT or MBR) partitions of an NVMe SSD.
>
> This series has previously been submitted on July 19th 2023[1] and most of
> the basic idea did not change since.
>
> However, the recent introduction of bdev_file_open_by_dev() allow to
> get rid of most use of block layer internals which supposedly was the
> main objection raised by Christoph Hellwig back then.
>
> Most of the other comments received for in the first RFC have also
> been addressed, however, what remains is the use of class_interface
> (lacking an alternative way to get notifications about addition or
> removal of block devices from the system). As this has been criticized
> in the past I'm specifically interested in suggestions on how to solve
> this in another way -- ideally without having to implement a whole new
> way for in-kernel notifications of appearing or disappearing block
> devices...
>
> And, in a way just like in case of MTD and UBI, I believe acting as an
> NVMEM provider *is* a functionality which belongs to the block layer
> itself and, other than e.g. filesystems, is inconvenient to implement
> elsewhere.
I don't object to the above, however to keep things scalable at the
block device driver level, such as the MMC subsystem, I think we
should avoid having *any* knowledge about the binary format at these
kinds of lower levels.
Even if most of the NVMEM format is managed elsewhere, the support for
NVMEM partitions seems to be dealt with from the MMC subsystem too.
Why can't NVMEM partitions be managed the usual way via the MBR/GPT?
[...]
Kind regards
Uffe
Powered by blists - more mailing lists