Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp445205imc; Sat, 16 Mar 2019 05:35:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFeukaK52MWNOp538yDxY7k314aG3rFFWmU9ZInlXUlUIx6viZGLXIMNJl8i6BbgZTd0bu X-Received: by 2002:aa7:8201:: with SMTP id k1mr5713565pfi.53.1552739705596; Sat, 16 Mar 2019 05:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552739705; cv=none; d=google.com; s=arc-20160816; b=HnPFtbRgg1hm6xCDnf0YuYns83c2asIKrX9h7M1lRz5hq/RVYP/8hN4YMA13xmqIZZ bWS2JWSuVlU63rgwoaJsDhINdlCztydoR02Kocu5es+Fe+Zl44KYCjPny+1ROT5cHTfg c+ueeO8J4R5tEbS3+y0lLGamMLWMqNjagt96uA/tgzbrb8LDE76m0VarppyJr3dL9QRm j4UxUhUL3/e2HzdGG81iFUYX3Iw4dhjysMwSl24Pa8bjuk7RTo3/NWJjx1tMeOtNVUZT F3xH/YcUOpNAnhwS0csb6T36c4+wt+s4ZUKxRPIpl4oMalh0xGbjCa7ycGws55E2knDf upHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=BrC7K1CMolxz1gs1zhBCWzmKlL5vI1v0HTOoaAcRWt4=; b=rpZd7Kk+EDbnwnTWF+QquGwmS+Zj+Cn34cIW6NJL1ZO6tXypzjSSYW0io6gNf7Pu6G jvV13LYcmbZRj2d+f/BY2ns8xi6LaV+gvMNQsEwkoEFzWIJhzBTilbDy0B0CrLTZrhQM nUmCAf+nuGZAdBm4lOzf1uDdl1LfchxNOJzGl4ZIrMdkKgCIdAfDFQTViXyLvgD36yhg BdrSWyvjwuzuaHd9sBSWBRi39n77UN4fGjrqF+FxZkqsP+4lAps2zUmQeaOLiDhfUW6G 6+wOwJtFkO2pJSusNdilqo8gZbdqrNoftODngGcQhF9ix+dqF0IhohOby9lThSguk3OQ LxAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s12si4027934pgp.241.2019.03.16.05.34.50; Sat, 16 Mar 2019 05:35:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726875AbfCPMeN (ORCPT + 99 others); Sat, 16 Mar 2019 08:34:13 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:51869 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726105AbfCPMeN (ORCPT ); Sat, 16 Mar 2019 08:34:13 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 44M21l1tB1z1rknn; Sat, 16 Mar 2019 13:34:03 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 44M21k5K5Mz1qql5; Sat, 16 Mar 2019 13:34:02 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 3tAlxRFCijpj; Sat, 16 Mar 2019 13:33:59 +0100 (CET) X-Auth-Info: /ANDgRVZU6+rYFDgM8TLigE9BEQJIF9YqPpwEOYEEKg= Received: from [IPv6:::1] (unknown [195.140.253.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 16 Mar 2019 13:33:59 +0100 (CET) Subject: Re: [PATCH v2 0/4] Patches to allow consistent mmc / mmcblk numbering w/ device tree To: =?UTF-8?B?TcOlbnMgUnVsbGfDpXJk?= Cc: Tim Harvey , Douglas Anderson , Ulf Hansson , Jaehoon Chung , shawn.lin@rock-chips.com, Adrian Hunter , stefan@agner.ch, Linux MMC List , Brian Norris , Dmitry Torokhov , Heiko Stuebner , Jisheng Zhang , linux-rockchip@lists.infradead.org, devicetree-spec@vger.kernel.org, Mark Rutland , open list , vbyravarasu@nvidia.com, Lars-Peter Clausen , Russell King - ARM Linux , jonathanh@nvidia.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Pawel Moll , Ian Campbell , grundler@chromium.org, Kumar Gala , lporzio@micron.com, Rob Herring , "chaotian.j ing"@mediatek.com, Sergei Shtylyov , sudeep.holla@arm.com, zhonghui.fu@linux.intel.com, kirill.shutemov@linux.intel.com References: <1461951139-6109-1-git-send-email-dianders@chromium.org> From: Marek Vasut Openpgp: preference=signencrypt Autocrypt: addr=marex@denx.de; prefer-encrypt=mutual; keydata= mQINBFHmnxgBEACuQOC6Kaw/32MTeUJdFuDZ1FrbG76a0Ys/I02Kj9jXDmCCLvqq18Z4A1b0 xbuMKGDy5WR77fqGV8zADUo6i1ATgCZeg+SRmQROF8r9K6n6digTznBySSLANhN3kXUMNRE1 WEIBGCZJ5FF+Qq59AkAUTB8CiIzfEW98o7lUjeEume/78wR18+QW+2z6eYli2qNECceRINXT zS3oxRMr+ivqEUGKvMBC/WNLuvJoCGsfSQc2I+uGEU7MOdOCC6SsKdnPBGKYth5Ieb16bRS1 b9M5BoEKTEzDCOWn92OxeHX6M2gLEMQobfM0RdIowMfWaUHdci2cLUT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PGqWJ3s+u/C+v9stC5qf2eYafRjzy05lEn B06W5D5Uc+FGEhuzq4G0eRLgivMoC0Eqz7HuwGcRAJYQILQ3Vzd4oHKPoUAtvlKqUwDmHodT HPmN73JMsvO3jLrSdl4k6o3CdlS/DI0Eto4fD0Wqh6d5q11u1TOM7+/LehWrOOoGVqRc6FFT ofck6h6rN/Urwkr1nWQ3kgO1cd/gevqy8Tevo/qkPYIf71BlypcXhKqn6IPjkq4QLiDPRjHM tgPc2T/X/ETe5eCuhxMytIYbt1fK2pDXPoIKbbDK4uEmg9USXZ+pYrac4PFo1d+6D6vmTjRZ GRRITOVpKgBndfPyqofxeKNKGdNf9FS/x89RlnDWXsQHm+0pXguSRG9XdB16ZFNgeo8SeZVr qc9uLfhyQp/zB6qEnuX1TToug7PuDgcNZdjN3vgTXyno2TFMxp/LKHqg Message-ID: <1fcd4dad-1e00-67cc-ac5d-24640ae34340@denx.de> Date: Sat, 16 Mar 2019 13:33:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/16/19 1:22 PM, Måns Rullgård wrote: > Marek Vasut writes: > >> On 3/15/19 10:52 PM, Tim Harvey wrote: >>> Tim Harvey - Principal Software EngineerGateworks Corporation - >>> http://www.gateworks.com/3026 S. Higuera St. San Luis Obispo CA >>> 93401805-781-2000 >>> On Tue, Mar 5, 2019 at 4:39 AM Måns Rullgård wrote: >>>> >>>> Douglas Anderson writes: >>>> >>>>> This series picks patches from various different places to produce what >>>>> I consider the best solution to getting consistent mmc and mmcblk >>>>> ordering. >>>>> >>>>> Why consistent ordering and why not just use UUIDs? IMHO consistent >>>>> ordering solves a few different problems: >>>>> >>>>> 1. For poor, feeble-minded humans like me, have sane numbering for >>>>> devices helps a lot. When grepping through dmesg it's terribly handy >>>>> if a given SDMMC device has a consistent number. I know that I can >>>>> do "dmesg | grep mmc0" or "dmesg | grep mmcblk0" to find info about >>>>> the eMMC. I know that I can do "dmesg | grep mmc1" to find info >>>>> about the SD card slot. I don't want it to matter which one probed >>>>> first, I don't want it to matter if I'm working on a variant of the >>>>> hardware that has the SD card slot disabled, and I don't want to care >>>>> what my boot device was. Worrying about what device number I got >>>>> increases my cognitive load. >>>>> >>>>> 2. There are cases where it's not trivially easy during development to >>>>> use the UUID. Specifically I work a lot with coreboot / depthcharge >>>>> as a BIOS. When configured properly, that BIOS has a nice feature to >>>>> allow you to fetch the kernel and kernel command line from TFTP by >>>>> pressing Ctrl-N. In this particular case the BIOS doesn't actually >>>>> know which disk I'd like for my root filesystem, so it's not so easy >>>>> for it to put the right UUID into the command line. For this >>>>> purpose, knowing that "mmcblk0" will always refer to eMMC is handy. >>>>> >>>>> Changes in v2: >>>>> - Rebased atop mmc-next >>>>> - Stat dynamic allocation after fixed allocation; thanks Wolfram! >>>>> - rk3288 patch new for v2 >>>>> >>>>> Douglas Anderson (1): >>>>> ARM: dts: rockchip: Add mmc aliases for rk3288 platform >>>>> >>>>> Jaehoon Chung (1): >>>>> Documentation: mmc: Document mmc aliases >>>>> >>>>> Stefan Agner (2): >>>>> mmc: read mmc alias from device tree >>>>> mmc: use SD/MMC host ID for block device name ID >>>>> >>>>> Documentation/devicetree/bindings/mmc/mmc.txt | 11 +++++++++++ >>>>> arch/arm/boot/dts/rk3288.dtsi | 4 ++++ >>>>> drivers/mmc/card/block.c | 2 +- >>>>> drivers/mmc/core/host.c | 17 ++++++++++++++++- >>>>> 4 files changed, 32 insertions(+), 2 deletions(-) >>>> >>>> Did anyone ever come up with an acceptable solution for this? After >>>> three years, I'm getting tired of rebasing these patches onto every new >>>> kernel. >>>> >>>> UUIDs or similar are NOT an option for multiple reasons: >>>> >>>> - We have two rootfs partitions for ping-pong updates, so simply >>>> referring to "the thing with ID foo" doesn't work. >>>> >>>> - Installing said updates needs direct access the device/partition, >>>> which may not even have a filesystem. >>>> >>>> - The u-boot environment is stored in an eMMC "boot" partition, and >>>> userspace needs to know where to find it. >>>> >>>> I'm sure I'm not the only one in a similar situation. >>>> >>>> Russel, feel free to shout abuse at me. I don't care, but it makes you >>>> look stupid. >>>> >>> >>> Completely agree here - we need a dt solution that allows us to >>> specify ordering. >> >> Nope, ordering would be a policy and does not describe hardware, thus it >> shouldn't be in the DT. Use UUID or PARTUUID, they apply both to raw FS >> (fsuuid) and to partitions (part uuid). Linux kernel can mount FS using >> PARTUUID, to support UUID you need initramfs. > > That doesn't address how to find eMMC boot partitions. If you have a FS or partition table there, it does. If you don't, I agree ... that's a problem. > I don't care the slightest what the numbering is, as long as it is > stable. On some hardware, with an unpatched kernel, the mmc device > numbering changes depending on whether or not an SD card is inserted on > boot. Getting rid of that behaviour is really all I want. Agreed, that would be an improvement. -- Best regards, Marek Vasut