Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp141979pxy; Fri, 30 Apr 2021 02:11:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLJzbDI7FtsaYyrE7/T55aaul7aS0q2Myq3r9yGy2sptp4SDteiAv88ngRRKLn8ruj0kjb X-Received: by 2002:a17:902:6b02:b029:e9:8e2:d107 with SMTP id o2-20020a1709026b02b02900e908e2d107mr4135171plk.61.1619773888571; Fri, 30 Apr 2021 02:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619773888; cv=none; d=google.com; s=arc-20160816; b=b1NkbjgpVa0gK2J5bGj1xNiaBqUhbP0ZdHiMcKrqKh0pZ9O73hnJt4CzsLh74IRLGv me4Zzg2FqA1Gm+8vLUDDyaQ04JaEkVMrS4zgr9kDA08S7UzmKColWioAw6sqVkBcy4pb dOX6/DyHAUkPPSBGFpyF3ax8jvKg7wxHO9orExDAnLrXJwGdkvsZH7JpwqXB4lXNO73B +ch3CH2WF8QDWAooY0XV50M4WqJgboWHoY0hb9mRsb1Wotz6V5B/Bjxf+Hi3IdjWQWvH CBT1K6G4kGOuJK/tgyJTc/VU9ceYDiR7i0SeAtpOHoU/TNXjiv3BoKNg5rCCMDyyoTck RdnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=DgPXkCNwhuM1PvuNpQB5vO85GXk9IVTLv4pIOEkACM8=; b=bUbkxIoQAqvjNm9t56QtQ5SXN1D1RiSq0O2MvIuoBrXlHhd79fXuh3czRW7kUoUmN9 ocTtxfkfx3V6gp1Yy52b6yt2YxSMGk/rrS/zlsraAIZ+5E1f/JzP3FF+pSXulLcYE3Fv P/PWc5tUPWigLknpUoJx8BeRPa6XtTUnNOVwA/085QpogJiNyS+ZtlarA7Lmhbe30hCX tDV+Ao2QmPqPn69PHaq+f8cKu5Tq1NBXoYZ9yTmv0vpeqV/Tm37xwDEMNXuuLDF6z9Ng K4WMg0fkqzSgkZ7V/pgpSC7dt4RxChebQS+eufGcGUlJnXMDhC/m70cOHLNOnyeDDRjY ExLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=v3lFalLS; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="sFY/ECTs"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o7si3110217pgf.262.2021.04.30.02.11.14; Fri, 30 Apr 2021 02:11:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=v3lFalLS; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="sFY/ECTs"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229598AbhD3JL1 (ORCPT + 99 others); Fri, 30 Apr 2021 05:11:27 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:58945 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbhD3JL0 (ORCPT ); Fri, 30 Apr 2021 05:11:26 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 875515C0032; Fri, 30 Apr 2021 05:10:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 30 Apr 2021 05:10:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=DgPXkCNwhuM1PvuNpQB5vO85GXk 9IVTLv4pIOEkACM8=; b=v3lFalLS2TrtaF/aAKRNtCRKo3X9KKsTJPpbZDbALtO TBZfUyMeRdDSnVkzhYJ0hTaRqiK1la++4dg3x/o/lFAZJjWKEjouSxHiXjpp/7V3 GcZtuH7Jz0vb+aK9kQO1NpHjdSqA5NXZLm98uz0dE+LLfiWsso+BoBulMdGJ/BCg NLCkTemN9sdyyOjFIoYRBoi6CmjhlsZtIEreEnIiXVY1XbP512vkemu76JtmQG+T soYufUFwf6paOCwAS1zu4aYfjUlf9YzruiIRIHy/If8w/vi2uH6E7PsDslYx2T5v 3dtGpNGWPDK9N/b2IdfhOtXKPuoPtRKbRukx/PplrCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=DgPXkC NwhuM1PvuNpQB5vO85GXk9IVTLv4pIOEkACM8=; b=sFY/ECTsNNXUjSfwBt6lFu BJfDhttISlFO4bU/nzfmphsiTRMvkRfPRdPP3Sdy7C557AhTifO5usvA7iVzrPLM PPbR9noGUEONxwEuDcYz4ok5Nv30zc5qOZ1xsdmqn5H5dzBHHZSSMupZrqZ/EI+h WOwfJ/agiVqE4OYuviOXyC5Sc9/x8NvvZvG4uPV2ompJWuIW8s767yW0+NRj+lrD wm2W/SQ9YVQAoF7jfGN9bf+ORVQ+hE3IZRw79eCSw9Jebt31hDV5XQ2bTYaEiB8b GMyxricEnXr5+kmywZ7x/VpkKnJLij8chr3yWx10Ol+dvSTGsHCpUO1Ai8AvC74Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddviedguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 30 Apr 2021 05:10:37 -0400 (EDT) Date: Fri, 30 Apr 2021 11:10:35 +0200 From: Maxime Ripard To: Andre Przywara Cc: Chen-Yu Tsai , Samuel Holland , Jernej Skrabec , devicetree , linux-arm-kernel , linux-sunxi@lists.linux.dev, linux-kernel Subject: Re: [PATCH 0/2] sunxi: Enforce consistent MMC numbering Message-ID: <20210430091035.i4zoyzb4c2l22msb@gilmour> References: <20210419025246.21722-1-samuel@sholland.org> <20210419095443.1548432e@slackpad.fritz.box> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5enpgdo5lledv3vf" Content-Disposition: inline In-Reply-To: <20210419095443.1548432e@slackpad.fritz.box> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --5enpgdo5lledv3vf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 19, 2021 at 09:54:43AM +0100, Andre Przywara wrote: > On Mon, 19 Apr 2021 11:17:19 +0800 > Chen-Yu Tsai wrote: >=20 > Hi, >=20 > > On Mon, Apr 19, 2021 at 10:52 AM Samuel Holland w= rote: > > > > > > Dealing with the inconsistent numbering has been a major pain, and > > > there is a solution with (as far as I can tell) no tangible downsides. > > > So let's use it. >=20 > Thanks Samuel for sending this! >=20 > > > Yes, I know the kernel supports UUIDs for root=3D. But UUIDs do not h= elp > > > when referencing the whole, unpartitioned device, like is needed for > > > updating the bootloader and firmware. So for the use case of "write a > > > bootloader to the SD card, regardless of where the board is currently > > > booted from", I know of two options: > > > - Dig around in sysfs to find the mmc number from the MMIO address, > > > which means I have to know the MMIO addresses for every SoC, or > > > - Apply patches like these. > > > > > > Samuel Holland (2): > > > ARM: dts: sunxi: h3/h5: Enforce consistent MMC numbering > > > arm64: dts: allwinner: Enforce consistent MMC numbering > > > > > > arch/arm/boot/dts/sunxi-h3-h5.dtsi | 6 ++++++ > > > arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 6 ++++++ > > > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 6 ++++++ =20 > >=20 > > At least with Rockchip this is now done at the board level. IIRC it was > > a request from other people to not do it at the SoC level. I don't reca= ll > > exactly who though. >=20 > FWIW, I am very much in favour of these patches, at a SoC level: > The *SoC* BootROM imposes an order, by probing the first (by MMIO > address order) MMC controller first for boot devices. IIRC that's a > different story for Rockchip? > And if people really don't care about the order, then having a certain > order doesn't hurt, so we could as well use the "natural" order, as it > was before. This doesn't have anything to do with the BootRom though but what we provide to the userspace? The userspace has no guarantee about the kernel enumeration order for any bus (but UART for some reason), I'm not really sure why MMC would be an exception. Especially since the kernel will not try to catch up, this will be bound to be broken on a regular basis. And that aside, assuming that a device only has an eMMC this would create the mmc2 device, which is completely weird and inconsistent with how any other bus behaves. > Also UUIDs only help if you boot with an initramfs to resolve them, > which proves to be extra pain if you don't compile kernels on the > device, or not inside a distribution environment. I'm not sure what you mean? The kernel is perfectly able to resolve them. You can also use PARTLABEL if you want something more user friendly. Maxime --5enpgdo5lledv3vf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYIvJiwAKCRDj7w1vZxhR xezdAQDIY6qe0cw/YeAwFhjlA5dAKEDjlxwmNTpj6ztkqfs/4wD/ckzHAVsRq/tR KkQbbJcdqKeAzIEY1dSy+rvOusXqqAA= =DXm6 -----END PGP SIGNATURE----- --5enpgdo5lledv3vf--