Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1312767lqp; Fri, 22 Mar 2024 11:03:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUbbwdtUjn8pNgKUIfAVtRiRuB7Y75BTi1vN1KSPDM4yWhtXZsvEQmohXNM2eH8n0b7bSC7AhYqK6CxDSrNWt73X+MYhCHM/Iax7wqHeA== X-Google-Smtp-Source: AGHT+IHDVpjkNTErSVX/c2vvjnNkhp1pHBs2jEURjmkDGgFembiJy4FQQA0cNRp3eaLSZdi6P4c+ X-Received: by 2002:a17:902:f652:b0:1db:f830:c381 with SMTP id m18-20020a170902f65200b001dbf830c381mr495933plg.44.1711130627356; Fri, 22 Mar 2024 11:03:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711130627; cv=pass; d=google.com; s=arc-20160816; b=G+EcovqcdevG1Mmz7VNVWcNoZUgsPiUibam1pxOfWBo4CwWl8RegZZ2dYQsz87oTeX 4D8oD4d+ObSQIN6qXuBn/biFPV6vrmo7YdjLkdX+FoTwUU6g1euCDtdQDmeIxnBg3BkZ vyPnEYTVsm2rzTvXC9qhXtEImIgqeeCxmmJfpCiILkg7TePtUs8l/DKoZ7Nhs5GYhudm hexyvDpza3UgAyHL9+4SUUivP9euZtj/Vb4yiS6Bs2ozWEySOvNfWzPUKeNFLUA3hR0s er9hN0c++6+1tA0jraQ3H8+kIyBgL4RIN3VVc61tSFvcCOt7Vur4100BCZ0iVvkbh9Im kiKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=mnsctm6sxX27yE26eswbhLggZ0m4x1xv2VwhAZpnsoU=; fh=4L2f+/6l+KWbqDOAQvrgBkPYw7HmnsyObzFPI1/hw9Y=; b=LSNGfarA2zW9fzelQ2GAB+8auRJqTtSt8j1ou2acdayX3QATyH0PDMb1qTgpasnTgM Ry0BnTXDfgrz2UiSExtJ43se2BSZCaaVUYKXY60BIrZ9zSgVyWFIy1LbcS0w3+dlLMN3 SR6cMuIEd8TQ361O0yeAOATzokE/lknxcKdZf+DxUHzSrQX3s8ghMoPbZ7+bN62LdJvn Yv3uTeLGnMz8WxchmDA24B8qPSO48cgbW1FQ40R0pNq15EfDm3cLKFuHrFhMvJGMoGZq gQKjyetwWfhNrLzdEECN36LAM8okQy5JuTzPxrmdFh3Hz9rAj73YmXmklOgg7c13pU5o zhiQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-111909-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111909-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id i4-20020a170902c94400b001dc07b8d0a9si26876pla.109.2024.03.22.11.03.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 11:03:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-111909-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-111909-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-111909-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 10B73289C1A for ; Fri, 22 Mar 2024 18:03:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD2A561669; Fri, 22 Mar 2024 18:03:38 +0000 (UTC) Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B7AE482F3; Fri, 22 Mar 2024 18:03:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711130618; cv=none; b=EiL1XxL4sGmMXTGIsah5F/5ftQy6XP3xPMhgS6mgtdeqjlwEg6IxRUKb6HIHItVPZGdyabfaGn3Pmm5HOivXwu+i0wFzmiCsc2vxLTyeHRm+JmivzZoU/s5BA/7NhSizEXkn1B6HBJqEjB9x6joDmyitptyZvSD5r2B0nf7W74M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711130618; c=relaxed/simple; bh=D1Ns2DV3olSdUJGSgYWDvM4g0A1SnXxonjtZR/pjfd0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RPXGKmK3PIuyfkfBiUTZaViRJQ4ioJak0y3U1x/W/jzpQw+n606aXasdCc9FV3YukHn/7Rup9Fntpm4ay4SD6zfTncozPAEQjSLUEdG90fGQRc67VXM5h+Tqa/uktRBKZVk8qC7U96c07hjA+lICAscZI4fF+bHh0NdS2xlqu2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1rnjEH-0005YL-1W; Fri, 22 Mar 2024 18:02:57 +0000 Date: Fri, 22 Mar 2024 18:02:50 +0000 From: Daniel Golle To: Bart Van Assche Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ulf Hansson , Jens Axboe , Dave Chinner , Jan Kara , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , Damien Le Moal , Li Lingfeng , Christian Brauner , Christian Heusel , Min Li , Adrian Hunter , Avri Altman , Hannes Reinecke , Christian Loehle , Bean Huo , Yeqi Fu , Victor Shih , Christophe JAILLET , Dominique Martinet , "Ricardo B. Marliere" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: [PATCH 0/8] block: implement NVMEM provider Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Mar 22, 2024 at 10:52:17AM -0700, Bart Van Assche wrote: > On 3/21/24 12:31, Daniel Golle 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 a block device 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. > > > > Overall, this enables uniform handling across practially all flash > > storage types used for this purpose (MTD, UBI, and now also MMC). > > > > As part of this series it was necessary to define a device tree schema > > for block devices and partitions on them, which (similar to how it now > > works also for UBI volumes) can be matched by one or more properties. > > Since this patch series adds code that opens partitions and reads > from partitions, can that part of the functionality be implemented in > user space? There is already a mechanism for notifying user space about > block device changes, namely udev. No. Because it has to happen (e.g. for nfsroot to work) before userland gets initiated: Without Ethernet MAC address (which if often stored at some raw offset on a partition or hw-partition of an eMMC), we don't have a way to use nfsroot (because that requires functional Ethernet), hence userland won't come up. It's a circular dependency problem which can only be addressed by making sure that everything needed for Ethernet to come up is provided by the kernel **before** rootfs (which can be nfsroot) is mounted.