Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1243578rdh; Fri, 24 Nov 2023 08:06:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGCP2d4n/uyaRW+F+Rt+3JjBDSxSG8k+Vk3CGNVrxJTCEbkRTzS/V5viCNnHNodGnLOTU5k X-Received: by 2002:a05:6a21:a583:b0:187:636d:a61e with SMTP id gd3-20020a056a21a58300b00187636da61emr4433082pzc.42.1700841899472; Fri, 24 Nov 2023 08:04:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700841899; cv=none; d=google.com; s=arc-20160816; b=cNEk33hu95qpYzDQ4tSC1pxasgLaQSIBHdsfzToeo+iRrA3QcEATwE107Sk1Ot5j5e x6Fn0g+xg0QPJXBPz50gi46h9PIeYIz70RO0qQCIm6gNFBKK9JqnQ+lIj113K4Aa1hyI KrOXj7sGm3FtFsq+oHXud21GFKPf594dwWPZjeZp4CUd9sVIpBZhoFxO35BAHYVLVoy6 racL7U19iKpWksSHcCyfOxRdYM7rkVRzqCXY3csgVrzhShNkoOGzO+Rerz3HR97/hMKq 2wh2W9tZEvOpx9NrBxqMRuYBwo6a/Kn3LGzniMGJvG5rJBnk3FvhS5BnaFoGyK3/Vwzl 6UqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mqkmP51fxK5UmQvuqk+HvPmLhhSzHCmYokrmMln7sFU=; fh=ugfngpN+/0//WgxW9PP1vE+k+jBEY8MrzG27q3bQWP0=; b=WMuCGU9CvR0UisO3iH59eNdp0LpLysXnPlPDk7tbHf/qGRAL1C20HIfMwC9EcFDG4A AqeXrbjlKxCUQrGfctzGgXOC/qNNABpEaOSx8x1SAUN8OwV4Ynqrat5wGlVxVfvqNgpD F6gB/UXTeCR3jWhqC21O/HSF51DK9YUE3dHOSHrZeL/XLqdNs2297GnCGCw5uys0bQzY /rCVbO1yaBXh0dce4JqrzYUCYEcsr3zWXT8jvhc0CpCEr9/VkoKMYvPQysYGOJNBhSpq OwMjnhUpxKG7czxvyLRo9qOKLQga6L+UXJoFpgZSG7bpjJshlS8Zdc9ECHsKueyog6Mw 5EnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ZVEHfkXZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id fb23-20020a056a002d9700b006935df3019esi3857704pfb.235.2023.11.24.08.04.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 08:04:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ZVEHfkXZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 7667C80AFEA2; Fri, 24 Nov 2023 08:04:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231192AbjKXQEl (ORCPT + 99 others); Fri, 24 Nov 2023 11:04:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230104AbjKXQEk (ORCPT ); Fri, 24 Nov 2023 11:04:40 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83BFA12B; Fri, 24 Nov 2023 08:04:45 -0800 (PST) Received: from localhost.localdomain (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: laura.nao) by madras.collabora.co.uk (Postfix) with ESMTPSA id 3328D660739E; Fri, 24 Nov 2023 16:04:43 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1700841884; bh=LqihOK0Q++RpV7t8zDmObDhhj1W5mEV5lqPp+ZJjtFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZVEHfkXZVaaljYC+c+rShwxSy6W2K/woOPGWZ2aqLDOZ/IElPcKWNsZDZC2v90jZc itV08P9+7v8wplZvKM2c8AH0j89MwvO2xkjrU2Da7Nq4nbBiR/Iz5/wRgOZX180uMm sxDwrFQ4TXcC/b8eL6pvt38G8ijksVAFo5rPW7mzJeBfl2sIbxOXidVorvihH3VHUM Vpzfb7olMrTzWM71B/TZR69uSprO0LcdzR87r3uZPkeFWvw35ys81EKwv0I7IVDnOo Q9NBBVJGOn0SL/fQH4wTVvU8P40BMVSGHcssaSbW6M03SeWmSktMAKP/eTxO/Ei5Rd L4ruxXRf40P7w== From: Laura Nao To: dan.carpenter@linaro.org Cc: broonie@kernel.org, groeck@chromium.org, kernel@collabora.com, kernelci@lists.linux.dev, laura.nao@collabora.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, rafael@kernel.org, robh+dt@kernel.org, shuah@kernel.org Subject: Re: [RFC PATCH 0/2] Add a test to verify device probing on ACPI platforms Date: Fri, 24 Nov 2023 17:04:42 +0100 Message-Id: <20231124160442.50928-1-laura.nao@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <431009f0-56e7-46e8-a3a0-a8070554b727@suswa.mountain> References: <431009f0-56e7-46e8-a3a0-a8070554b727@suswa.mountain> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 24 Nov 2023 08:04:56 -0800 (PST) On 11/23/23 16:14, Dan Carpenter wrote: > On Thu, Nov 23, 2023 at 01:09:42PM +0100, Laura Nao wrote: >>> Your talk was interesting at Linux Plumbers. >>> >>> https://www.youtube.com/watch?v=oE73eVSyFXQ [time +2:35] >>> >>> This is probably a stupid question, but why not just add something to >>> call_driver_probe() which creates a sysfs directory tree with all the >>> driver information? >>> >> >> Thanks for the feedback! >> >> Improving the device driver model to publish driver and devices info >> was indeed another option we considered. We could have a debugfs entry >> storing this kind of information, similar to what devices_deferred >> does and in a standardized format. This would provide an interface >> that is easier to query at runtime for getting a list of devices that >> were probed correctly. >> This would cover devices with a driver that's built into the kernel or >> as a module; in view of catching also those cases where a device is >> not probed because the relevant config is not enabled, I think we'd >> still need another way of building a list of devices present on the >> platform to be used as reference. > > Yeah. So we'd still need patch #1 as-is and but patch #2 would probably > be simpler if we had this information in sysfs. Or a different solution > would be to do what someone said in the LPC talk and just save the > output of the previous boot and complain if there was a regression where > something didn't probe. > Right. The main drawback of using the status of a known good boot as reference is to keep it up to date over time. If support for a peripheral gets added at a later stage, the reference needs to be updated as well. >> >> The solution proposed in this RFC follows the same approach used for >> dt based platforms for simplicity. But if adding a new sysfs entry >> storing devices and driver info proves to be a viable option for >> upstream, we can surely explore it and improve the probe test to >> leverage that. > > You're saying "simplicity" but I think you mean easiest from a political > point of view. It's not the most simple format at all. It's like > massive detective work to find the information and then you'll have to > redo it for DT and for USB. Are there other kinds of devices which can > be probed? > Yeah, that's what I meant. The ACPI use case is in a way simpler to handle than the dt one, as we can get information on non removable devices on enumerable buses such as PCI from the ACPI tables (leveraging the _ADR objects). But it still requires quite a lot digging in sysfs to get info on what was actually probed. So having a list of probed devices would help both use cases. > I feel like you're not valuing your stuff at the right level. This > shouldn't be in debugfs. It should be a first class citizen in sysfs. > > The exact format for this information is slightly tricky and people will > probably debate that. But I think most people will agree that it's > super useful. > Right, agreeing on a format will be tricky. Judging by the response here and in LPC it's still worth a shot though. I'll put some thought into this and experiment a bit to come up with a proposal to submit in another RFC. Again, thanks for the helpful feedback! Best, Laura