From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DB97FC02194 for ; Thu, 6 Feb 2025 13:09:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To: Content-Type:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1hwDFSvXl5S6HeN47+bAm4IHmoRkVQUmhsi8kIBKzi4=; b=upd+iGQ8NQY29czCa/rr2lnbts XJzEP1izLppawogOywik/SJumGUf5Y3pOT1AtyljuR4CybmRcH9RWhy4NMFBseR4FTaWwnMPEonon BOVmNvaQq/uzGmCFLaDo6VdmrQKAcN+0jzFpEuciyN/zTgnKhHjE9QNzNQvTRkc9wyQNJFd1lU5RY 1rhyD78MMXXFt2Z8gxv6pqox7GqPol9QUaOu9xRzHJuGFRgnO9NjxI68Fy51LREGVnrSrlLojGfXX iWoDzqCbUoczeVjMdFXQ9W811GoX+PvefdhmwsH9/BeJWJg8n1whr5YCCr/CR3/OtBiyOYJeyl/e5 7V1G35wQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tg1cn-00000006MB1-1KEF; Thu, 06 Feb 2025 13:08:57 +0000 Received: from mail-northeuropeazlp170130004.outbound.protection.outlook.com ([2a01:111:f403:c200::4] helo=DUZPR83CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tg1a7-00000006LdC-2DTT for linux-arm-kernel@lists.infradead.org; Thu, 06 Feb 2025 13:06:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yKphgPiykOX5pv93OANUIwQAwgnfaGMmW9kH8pGq6xSSnzJm4gZN/P+8sEJWmRHPeL2Yf+aQ8xBBGHO0wXL4F75fbBwk0YroqPSYsctweljJc8zojFdG2KYKpKf7InIX8aUg0/k/aFgDupLaV0OHbQajIOsbkmAvbhbpanjGTmGF9Bm3YjTn7QpwV4Tij7waeJwsdtqKFbs0cZz+ikmWkCkx/x0LpC/7ciGeoWP5TRdY4cZJARGufljzxrZ6y2an9zSu3N6QFsQrQsPEpGo3l8+0MXf7beoAZ3qZbnewrAdohEL59rpldH3jCdhLk+596V+6iqB9rLjTwIZuWWeydg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1hwDFSvXl5S6HeN47+bAm4IHmoRkVQUmhsi8kIBKzi4=; b=omoR+BXzUCtNPRE1HQVYN9gxWxL3jahN56SuPn+gWzMhpKx09RyXPDaJF/hy8/GvKKoZ7S4WHdzI1prqeUkfQLzkVXeLUWuPAOHTdzBOpeUGQqmGwLLnTv+wTFnFeLFvre6f3HowR4vPX40iG7kqRKj/tmb5YcP+gPME2DOehMDW+/Z0Wd2Exy+dDxKU+F8Q4kBtsdkdPPz/1LLy9uCqyaYNLVzLQwxtKWWm2c8TnnDqpjTuBtCMXC1opdEDP7eCr5DZxZhceN9eNZvkSXCw04f9j0mocZcGbfr77W1Uk1ufrxjtsaVEvwRp+4VnAubUaX0kMi4YMcL2blYVZmKXRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1hwDFSvXl5S6HeN47+bAm4IHmoRkVQUmhsi8kIBKzi4=; b=PJcYdYPAuZ1EmhGTFh/e0WHOCDWT62O/8gjOFGAaaY05pe5FkhmJxGxTmw2o7oZ0mADwBG1WnRZaUv8FAwZvNfLGu93HPVMoY0aqBfZpbWQ3TYBeyveSgCYTzArMNQTJ47PKie+sojFrbijfkzQ4mZX7ToyeDeQuub2mnVljqRxuS2VhEf17Tb3PGtctP2gI/9De7OY64AwZQcxXwYQr6TQ2sAa4QOq68ng7MmxR3PyTJDFRLrc6aeRVLKL+bD7WoIzWauOTl1sZsK7w3rS7e1pGnPuMnGG+gdE3ueMNkoKEiqu/odx0RSUcB7i7HzbUaD5uxS6FKJCF5Gi+HM880g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by VI2PR04MB10570.eurprd04.prod.outlook.com (2603:10a6:800:27f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.11; Thu, 6 Feb 2025 13:06:07 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%3]) with mapi id 15.20.8422.010; Thu, 6 Feb 2025 13:06:06 +0000 Date: Thu, 6 Feb 2025 22:12:48 +0800 From: Peng Fan To: Cristian Marussi Cc: Sudeep Holla , Saravana Kannan , Linus Walleij , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer , arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, Peng Fan Subject: Re: [PATCH v2 2/4] firmware: arm_scmi: Add machine_allowlist and machine_blocklist Message-ID: <20250206141248.GB27490@localhost.localdomain> References: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> <20250120-scmi-fwdevlink-v2-2-3af2fa37dbac@nxp.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: SI2PR04CA0006.apcprd04.prod.outlook.com (2603:1096:4:197::13) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|VI2PR04MB10570:EE_ X-MS-Office365-Filtering-Correlation-Id: 752aec2c-ef71-4c51-566e-08dd46af0481 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|366016|1800799024|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?QbXo59jaQX3vWJpqDRfHAW3g4OUXChl97iWVTn0htGZSsm9Z9IGPLMaq+Siw?= =?us-ascii?Q?ZnuLMOiGJv8mS5VDijyMNrFIC0AiIjG8eHvNmCKG53jcj/yjCmS5czMqOUVN?= =?us-ascii?Q?X1enjBIiY90jDEdPCNBihDaDwZztBRIwbWhgHZPzT7I8OWw7bTaQ0wPr+FfF?= =?us-ascii?Q?NwK0sN5My1KO95wvvlr9PJ+xoYW9MGZz8bs812s2Eh9Fq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mF/SwL+lY8jwEaa/H8lN6Vb2I3oQry6KRayiesa4q1RomkIHXSOrDR?= =?us-ascii?Q?s0qrwjBGa3AFwkJIeVeZwdf3MVho+aAjyDT3YUpai2+SHCYRW6mZiV25RPQm?= =?us-ascii?Q?0W+2Pu1eTe0Bo/NVgDyUOqQ8iLuggJlFTMo8XJ53esvUybDFuM/TBXvCX5OD?= =?us-ascii?Q?Mqx8xQLeMXdilqzy1cO54fZdXvxQzVllPw2PIQ2zOst7pCG7H27NO1S9f2WH?= =?us-ascii?Q?/FI1Y1CSUNi97KvwbhmxbVoOfI/VfQvATPOm6mf2trM0w0Y8aYzAsUKMsF+c?= =?us-ascii?Q?WY/hqLfEZwTw0GMsPD2sIQZGH3EU7Q9SgAtFUcLXVZIlnSfVf8JW8z1ZXWfl?= =?us-ascii?Q?13p1B2He0nuqzNhkwXGHM196XW3BjXKw?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(52116014)(366016)(1800799024)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Ih/a2+vH7kBKT/43ZTu4zn8rs0bxIswxwPDd1s3hr+7g82eg/4OaIxUEY7nY?= =?us-ascii?Q?M8L3s074Q2VYNQmbe3Q3MLk5dblLToRC7FNCIIgJ8uhy4CNilBrFzEO4z6mr?= =?us-ascii?Q?sh0fZh7LcjDMT4oCJ1XC8yejwQ8ZizRjKPjbYsH4+IBioONkSS8xn8isHZrh?= =?us-ascii?Q?bvZnt2cCWnFp/Flk8ZodU+Dh5XIgNuGgMoWZJ2zSgc9m8+IjeWyDpMOJVTp5?= =?us-ascii?Q?krKT9PQ3c5NIEbcIKjC1UJpXfc4nPcaopFs8prI5MLeRzrUtmmwHJJ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0BaU0ddgSOFRugIFwCtxV9PJEQgD1hzTE+coBR2?= =?us-ascii?Q?pMxpXC2EE2lF5JlgH1f1ekqZ2BgAYreY+EYk/y/yWDy72TDUYs8ZSHvHoc1i?= =?us-ascii?Q?FlnO1BJK8YxVZlPdNmeDO2qpCbyyQ1SpqJaWGMJtUstdzXNbkQLXLTG8oeU8?= =?us-ascii?Q?IA3qApunkmlgBIOIa5g4cEcw9S9B2tAW6I6ip1l98xGjV4Rg7+aLRfN/g0hv?= =?us-ascii?Q?De6PRolzaaKXzdJpmKfa2uO5HkbxGrF9nIae+8/1wcv0t9ld9G/fys++OsQ/?= =?us-ascii?Q?88fJPxBczj6tH5G34QBvjg8bNHRF4avX+tiK4BNhEHi9U3sZWwemYLHOWSXV?= =?us-ascii?Q?OaaT/S1LxVP4idygs1X0GYSJdeXuOcx7cIoHVDA+oQvPqeUFR0qsV9+leBCo?= =?us-ascii?Q?rKwwrrYNuzR6CWFgTCteB2xTtdSn2XSEyQ1Xi7Jp?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 752aec2c-ef71-4c51-566e-08dd46af0481 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2025 13:06:06.6672 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tTmAeUVnw9DxNBBfRmRpp2Np02F5kV9Ub/IsQ0sK8n7KNc7vPcpKwVBX6E0pjCTLBvUk87uVOqIY9ggDTYxyAQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10570 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250206_050611_569560_F19883A6 X-CRM114-Status: GOOD ( 23.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Feb 06, 2025 at 12:06:03PM +0000, Cristian Marussi wrote: >On Mon, Jan 20, 2025 at 03:13:30PM +0800, Peng Fan (OSS) wrote: >> From: Peng Fan >> > >Hi, > >> There are two cases: >> pinctrl-scmi.c and pinctrl-imx-scmi.c, both use SCMI_PROTOCOL_PINCTRL. >> If both drivers are built in, and the scmi device with name "pinctrl-imx" >> is created earlier, and the fwnode device points to the scmi device, >> non-i.MX platforms will never have the pinctrl supplier ready. >> > >The pinctrl-imx case is an unfortunate exception because you have a >custom Vendor SCMI driver using a STANDARD protocol: this was never >meant to be an allowed normal practice: the idea of SCMI Vendor extensions >is to allow Vendors to write their own Vendor protocols (>0x80) and their >own SCMI drivers on top of their custom vendor protocols. > >This list-based generalization seems to me dangerous because allows the >spreading of such bad practice of loading custom Vendor drivers on top of >standard protocols using the same protocol to do the same thing in a >slightly different manner, with all the rfelated issues of fragmentation > >...also I feel it could lead to an umaintainable mess of tables of >compatibles....what happens if I write a 3rd pinctrl-cristian driver on >top of it...both the new allowlist and the general pinctrl blocklist >will need to be updated. > >The issue as we know is the interaction with devlink given that all of >these same-protocol devices are created with the same device_node, since >there is only one of them per-protocol in the DT.... > >...not sure what Sudeep thinks..just my opinion... > >> Vendor A use 0x80 for feature X, Vendor B use 0x80 for feature Y. >> With both drivers built in, two scmi devices will be created, and both >> drivers will be probed. On A's patform, feature Y probe may fail, vice >> verus. >> > >That's definitely an issue much worse than fw_devlink above....we indeed take >care to pick the right vendor-protocol at runtime BUT no check is peformed >against the SCMI drivers so you could end up picking up a completely unrelated >protocol operations...damn... > >I think this is more esily solvable though....by adding a Vendor tag in >the device_table (like the protocols do) you could skip device creation >based on a mismatching Vendor, instead of using compatibles that are >doomed to grow indefinitely as a list.... > >So at this point you would have an optional Vendor and an optional flags >(as mentioned in the other thread) in the device_table... This is indeed better. > >I wonder if we can use the same logic for the above pinctrl case, >without using compatibles ? >I have not really thougth this through properly.... Since i.MX pinctrl driver probe earlier than generic pinctrl scmi driver( compilation order or whatelse may change the order in future), so adding a vendor flag to i.MX pinctrl could work for now. But if order changes.. Anyway I will give a look, then back here. Thanks, Peng. > >In general, most of these issues are somehow Vendor-dependent, so I was >also wondering if it was not the case to frame all of this in some sort >of general vendor-quirks framework that could be used also when there >are evident and NOT fixable issues on deployed FW SCMI server, so that >we will have to flex a bit the kernel tolerance to cope with existing >deployed HW that cannot be fixed fw-wise.... > >...BUT I thought about this even less thoroughly :P...so it could be just a >bad idea of mine... > >Thanks, >Cristian