Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp126951rdh; Tue, 13 Feb 2024 11:21:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVSQXUYH0LGRo2ks19y4acFl84+qPddot6t3ErzZLEhZ+WZ5tgAkLltc0090re2HqLVU7A1eqEvE9nZeob+2eT69N8PJFtp6BMaiqrgRg== X-Google-Smtp-Source: AGHT+IGODxhRQZT6Iq5VuPch444kL36HzJdteuZ3FENPQYdMf1CLNRFuqhC/bZfrHzaOotfiZVxu X-Received: by 2002:a1f:de82:0:b0:4c0:2ba1:830a with SMTP id v124-20020a1fde82000000b004c02ba1830amr724708vkg.3.1707852089634; Tue, 13 Feb 2024 11:21:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707852089; cv=pass; d=google.com; s=arc-20160816; b=VT1gnFtI8D0Vbd9qLBCenbHOI30MDfudAKUTXaWWLcHngC5YPQb5qUUgheLkxtCee7 GnXgwSlcRf3abHgJ3AiOOwTKbXCiw6uZsEUk/MJ2H2NwVZaPVXI0kT3tT39c+jsZnDDm kxsWxM93f9tuXIjQxNODIgQ+GDIeWIw+Y0E0RCicqYZbMFbgX+Qs7sxn6J6mAZ3WGENm 1XFYN3ZQ+wziK8e9Ve2dQMki3sMd2jO6y7GH5wpZ/q+L7N1RFn/ViCAWzPaCrxlFbkNO kL3gkjnN6RoFkl4REFZG7lkp3CKTkSN6t5m0rB2iZHpxwn4YdZRKxYvHshAThLuieEC7 jKcA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=3mN8xA0cTxrfZTtwyelonCfpSj29sYDVq5G0MAoHaHg=; fh=5qjvZl7bmT/OHtZXZ4ve043MUutz4WkWrngn77EBrxc=; b=IxfL9IHzKVA+J4aCpkpo5LBQ/Pbofdb73ID3/ROVbpJI6yyEqdZLBLyayyPmFBPKf6 sytQET/ARWc93lzn1bWY5MGLYwiYd/qEEkvvwuUgwLpIkppUx8ENPnooMFplk1O0q9Am Keg4ummuedvsZR84hiFBvYCOMDS1y5RtkFmKfCyQWxE9DmH4N9uNs65v2jrafsqCq6et txh8886z1zh7KUea5MeXYTGb9jZpqdiv2xiyJpkfmKK/gH4Ft88YHD2LMnbBrgtjGhKV 7Ro2CxbMEqtEuYai/lCEM9kD8Y0ZhFoqvyUPWRkThYE6tlL5wRXRkOF07FDKzKE/Onmw dH3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mTM4F7hQ; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-64155-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64155-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com X-Forwarded-Encrypted: i=2; AJvYcCWikJfRXXcKSMPmPoRAYtVoeXvx1rTyOspJV63p4qwBRJLuKzSIMZRXSmKKj4oVnG7Z2jOG7SBRv9p5l9hz7yR3IUyN9QhSHUS5oxUbNg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id iu1-20020ad45cc1000000b0068efc537339si342004qvb.217.2024.02.13.11.21.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 11:21:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64155-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mTM4F7hQ; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-64155-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64155-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5FCE41C2121D for ; Tue, 13 Feb 2024 19:21:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B54BD6089D; Tue, 13 Feb 2024 19:20:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="mTM4F7hQ" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (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 081A660884 for ; Tue, 13 Feb 2024 19:20:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707852058; cv=none; b=EvvEshm38FE7K5gWMFkoPP3jAHPMVv39zCcmF7ixUH8Z9QcNYUEfnvOEWBbUYN6tu/7VAxf7EMTj+LgMDQzS1lpByAoOrasKtfPXygo1IQH2W4uEpIRlukQxFGnhzf5s/n9rYNGy4cO/g5aoCkt+3tEMSm6F2TuziXIIuMWaqbw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707852058; c=relaxed/simple; bh=7dXfSRYBwhsTCt6sxxpGuOjndcv/iGeQtLLQrn0l66Q=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Fdho+YuQqryP2NhltpeB47asV8hiyFSIYUrD2hjImbsoSh6C0kBEuYwg+HQvdnEdq4Y7kyRxm5X+CcL4DS9QPhzfs0xf77e02Ii/UX3957yjRkjCL7ml+FMNe9FtN2X5gNF0cdEcu/IXq47jcq+sJjVhCHHc6l0gQM8SLu7+uDY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=mTM4F7hQ; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id A28A960002; Tue, 13 Feb 2024 19:20:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1707852053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3mN8xA0cTxrfZTtwyelonCfpSj29sYDVq5G0MAoHaHg=; b=mTM4F7hQA4rbQGgy7sC3p/Yv7/5UjDCvUgPm6/bAWUy0+uMa+aibebP9bxlzXdgUYqX9yi mil0ph6jS4jOu2kIq/+o6MRGFLxNaCxBaIOdKBeh9wjGhGlWX5sikiGc8krqb3BcrvWN0+ dX9mtKLCV3hUdRjCKgivbP90sRUVc+idvcfAgawP8+cgpQGLeBstLxLgtk44s57DdsStkh GHnZ6TZONle3bG1I7H4plHnLMC5LFAtoq5hWFCHzzVwAJEMqaQl4ym2GgAHe65RML7KmH1 5o9EYyOs0pXa8bRL3ATNSbCj9HKC69SrlMvFSa344EoXEH3oIamnN8vMvyXnJw== Date: Tue, 13 Feb 2024 20:20:45 +0100 From: Miquel Raynal To: Eric Curtin Cc: srinivas.kandagatla@linaro.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, Arnd Bergmann , regressions@lists.linux.dev, =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Chen-Yu Tsai , asahi@lists.linux.dev, Sven Peter Subject: Re: [PATCH] nvmem: include bit index in cell sysfs file name Message-ID: <20240213202045.1e823a6c@xps-13> In-Reply-To: References: <20240209163454.98051-1-srinivas.kandagatla@linaro.org> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) 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=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Hi, ecurtin@redhat.com wrote on Fri, 9 Feb 2024 16:49:22 +0000: > On Fri, 9 Feb 2024 at 16:43, wrote: > > > > From: Arnd Bergmann > > > > Creating sysfs files for all Cells caused a boot failure for linux-6.8-= rc1 on > > Apple M1, which (in downstream dts files) has multiple nvmem cells that= use the > > same byte address. This causes the device probe to fail with > > > > [ 0.605336] sysfs: cannot create duplicate filename '/devices/platfo= rm/soc@200000000/2922bc000.efuse/apple_efuses_nvmem0/cells/efuse@a10' > > [ 0.605347] CPU: 7 PID: 1 Comm: swapper/0 Tainted: G S = 6.8.0-rc1-arnd-5+ #133 > > [ 0.605355] Hardware name: Apple Mac Studio (M1 Ultra, 2022) (DT) > > [ 0.605362] Call trace: > > [ 0.605365] show_stack+0x18/0x2c > > [ 0.605374] dump_stack_lvl+0x60/0x80 > > [ 0.605383] dump_stack+0x18/0x24 > > [ 0.605388] sysfs_warn_dup+0x64/0x80 > > [ 0.605395] sysfs_add_bin_file_mode_ns+0xb0/0xd4 > > [ 0.605402] internal_create_group+0x268/0x404 > > [ 0.605409] sysfs_create_groups+0x38/0x94 > > [ 0.605415] devm_device_add_groups+0x50/0x94 > > [ 0.605572] nvmem_populate_sysfs_cells+0x180/0x1b0 > > [ 0.605682] nvmem_register+0x38c/0x470 > > [ 0.605789] devm_nvmem_register+0x1c/0x6c > > [ 0.605895] apple_efuses_probe+0xe4/0x120 > > [ 0.606000] platform_probe+0xa8/0xd0 > > > > As far as I can tell, this is a problem for any device with multiple ce= lls on > > different bits of the same address. Avoid the issue by changing the fil= e name > > to include the first bit number. > > > > Fixes: 0331c611949f ("nvmem: core: Expose cells through sysfs") > > Link: https://github.com/AsahiLinux/linux/blob/bd0a1a7d4/arch/arm64/boo= t/dts/apple/t600x-dieX.dtsi#L156 > > Cc: regressions@lists.linux.dev > > Cc: Miquel Raynal > > Cc: Rafa=C5=82 Mi=C5=82ecki > > Cc: Chen-Yu Tsai > > Cc: Srinivas Kandagatla > > Cc: Greg Kroah-Hartman > > Cc: asahi@lists.linux.dev > > Cc: Sven Peter > > Signed-off-by: Arnd Bergmann > > Signed-off-by: Srinivas Kandagatla =20 >=20 My R-by must have been lost, here it is again: Reviewed-by: Miquel Raynal Thanks, Miqu=C3=A8l