Message ID | 20250120-scmi-fwdevlink-v2-2-3af2fa37dbac@nxp.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 02C43C02185 for <linux-arm-kernel@archiver.kernel.org>; Mon, 20 Jan 2025 07:18:44 +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:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5N4soaqVvGniFGVKXuIwxhaCY94c2fcgCzLF1RtnT2U=; b=zWOXdrxYFdLKYGw+I0EqwtDxRU nLblZ/j287yfBafP5gEN3R9jUSNZR8xnakB2LIMj//fQYwRgcFDUrjI23lyo7rM2Uo9EUMco/1IsJ kk+5sCCh5x1LBqbVffA6jl7cEc6eTQjl7luYpgvxhvyJ5yioQoANgId5lYkuZJb9HLCzZ+uEaeOSi lXDkIVGzrV/kcOrQt/2c2a1t4ztexrpDFm8GQdvTxzcDDQpxCyjCXuAuD468WPiQri5vztgBd2Oup pSbyWy8fFj1/9GczAstmVpYGDlavt74FQsr8W6FuMYcFc5Sjm1M0NPqd3o/gjfu5xyOJ42nZg8mwX 8pkRvmoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tZm3K-00000004u0h-3X5R; Mon, 20 Jan 2025 07:18:30 +0000 Received: from mail-northeuropeazlp170120003.outbound.protection.outlook.com ([2a01:111:f403:c200::3] helo=DU2PR03CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tZlzY-00000004tVG-2OHU for linux-arm-kernel@lists.infradead.org; Mon, 20 Jan 2025 07:14:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WcgalTFbfcpsV+yDz05D3jlw221QK8z3V+PSnbSRtNboZQJF4kHQ0CjqScOxR6VriiVz2awycFabd8NcFVwfO/+qRYpW7w18epEP6UETdbAqDQu+C0JdhXOJM5fgFUoSgbWXaAxIxyGz1crXWbju7eoZ9gPPkzXfZFgFjSQoC8f47g61rvc5vZdFH80+oqwLUlq2nvzSH7DEXqi3Kp4I1WJKRW5CcOPWlwUQlwrmN1IYLJihp8xSalRy2IB5j1MTEx0ZUaQ/eq2liOykOheVBZ2/u5BTRTxuNVimyt1qlO89Yewn5D3RtFcdUF+R59rfohw6KiHi/OwczEAUdpyQFQ== 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=5N4soaqVvGniFGVKXuIwxhaCY94c2fcgCzLF1RtnT2U=; b=gIGO/zI9f8xeblbFH9S5B1/DAMJYEmNrBmkOugjU5TjFbDGAD9oYyPdavFwBKzwFwWlOtD5dBjzme3bR6l7AaDKi3qoI7EPQd8MCLWyBdWpDYOoFIOo4eVQBo+bc9TDiPDYXCJxxxEhBsJn1ESzDsrSYQnFBoAcJJhulJ39xu+FApJKlJjXIpli7j5kLdoKHGRNeOk23fK6M+X0BnWCOEa0nO8PWxml14mISFFDGmxwl0jb6OFB2HVugWxOfDOjl+CE1W4d3GHHHKOLJXuA7qboJDld1Hu8BJe/97WLodxfPl5uxMhZ20G2isrwXtmK1ykcCzLi590YZXcDdnqRz6w== 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=5N4soaqVvGniFGVKXuIwxhaCY94c2fcgCzLF1RtnT2U=; b=aJBKPw5sUMahEG6vJrQn5QdseNQzNUu+PQmeyK8JNI4jwIOSXHkzsJn+6pBm7XZhtujpo8VAE2SWlfuNiKolFsMGHbMgPfDmNTBa461k1L8Dd3AuC/PTO111rWcTNgVcAbFz9kPRSiqQnm5UKwj9DE8+qnb0DV/4zmWjusu0tWvhfJcG+qt/YEmBLWaEIDJwYUm3ONaSCHGM0rJcroxBv+s5li114spN+4bdPsx2qXc6DxBEYz59MqfImTeoi72I+ytxVt5tYJheQPl6ztVHxHVnaciMqk+aTnhyhBa3fcA74zLXq26FQ1pp+ycrbIzgp5ShE1JXHnOoks722AcXzA== 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 AM8PR04MB7442.eurprd04.prod.outlook.com (2603:10a6:20b:1d8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.18; Mon, 20 Jan 2025 07:14:34 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%5]) with mapi id 15.20.8356.020; Mon, 20 Jan 2025 07:14:34 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Mon, 20 Jan 2025 15:13:30 +0800 Subject: [PATCH v2 2/4] firmware: arm_scmi: Add machine_allowlist and machine_blocklist Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250120-scmi-fwdevlink-v2-2-3af2fa37dbac@nxp.com> References: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> In-Reply-To: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> To: Sudeep Holla <sudeep.holla@arm.com>, Cristian Marussi <cristian.marussi@arm.com>, Saravana Kannan <saravanak@google.com>, Linus Walleij <linus.walleij@linaro.org>, Dong Aisheng <aisheng.dong@nxp.com>, Fabio Estevam <festevam@gmail.com>, Shawn Guo <shawnguo@kernel.org>, Jacky Bai <ping.bai@nxp.com>, Pengutronix Kernel Team <kernel@pengutronix.de>, Sascha Hauer <s.hauer@pengutronix.de> Cc: 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 <peng.fan@nxp.com> X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737357232; l=2685; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=aQkTl5KnV+Ghr5dkzA87eUlMVoRB+D46A6vU1kqaigQ=; b=2VL8YIT/05Gg64JAQiw/Y2bzpscQRRjXN/on6j2pFc5P5hM0/NihawvdpJmFbEJQQb+20Rg6M MfGAJ+yl1pdBV6ezgTlbGKzcXN+C9vgw3n8RcKHVIZ7a14O6HG9YCWc X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR01CA0129.apcprd01.prod.exchangelabs.com (2603:1096:4:40::33) 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_|AM8PR04MB7442:EE_ X-MS-Office365-Filtering-Correlation-Id: b7d68899-72c9-40d1-3a60-08dd392217d7 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|1800799024|376014|366016|7416014|52116014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?33SSD9fpp8M+1STcCBONy63Hu+FhK3F?= =?utf-8?q?RAHJhbnCae+G8Wh9Ty5ErCyTqaDz+1l471+EB0keUASy/iutNc5fgQOnPVDMvwbUZ?= =?utf-8?q?M2XO47kiHC36roJ2dpuuFM1huvfP3vNwl62ZXBn6apc1Rm9DhdFz0n5kvbUMhHxef?= =?utf-8?q?DYLlCdk6gSttqvs3WlMSi3DfR0jz/H4TOql+4wQnwO9XiKVJ0DGs07NAmmFnHg1Cd?= =?utf-8?q?6JJB2mNBNi/Q0Cst2cDq73CK/3QpEPG08YkL7hrjCGOafCTwi6hxLdpLZdDTfsxFp?= =?utf-8?q?rCPzzkKf7v391knTfWonaJNu0zM3rFlQjtR09naa8vus9ccHh7Gc6B2zO4JCJdXeZ?= =?utf-8?q?TlyLNRnflEH35wEzfsJaVTFH/ZosHdi0EVvN6Po07HL8joQ7lY50FbUOVv095cCr0?= =?utf-8?q?v3nIr+4V06OaWCax7y300rMFfwaOG9OnRRaU2Tm80g0iWJDff1xeEEin1y3eywP7X?= =?utf-8?q?gDeeF+Aq7RQZMIRAG5S4sShNqPg56ArnbDaWW+sS6YLsB673a8MswaisidUGmJf8v?= =?utf-8?q?F05oayeYc5vdIGQah1Mw7ob3kCfF1IiGDrQa7Y11Q+1NmSd7edOUbBz7DJJazMgRJ?= =?utf-8?q?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:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(7416014)(52116014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?yiWm7XZeZq9COmWusj0AUR0ikwFS?= =?utf-8?q?aD20FZHYkEn8iPsJ9g1YXn4X1R5cgXcL5r9DYpY0H/0pzHBKgWu3/em6ufXwzezbR?= =?utf-8?q?fcLhCD71w9GtshTEhEQJ+JL4IKysnCQrfwOd3JGcBW5hp8VugXGEXBXFNaLWk99mM?= =?utf-8?q?0BWH79AKXqk6Ha2n4cF/hcWi6zjrnwtyaBz+x1m9Kz9ABO85Y15j2ZCPb7DXjeW+6?= =?utf-8?q?hbPkonR3kaCcC0oAzC1G3r6VVypEmXjC7xneyas+6UtQFa0VAGPzAGuW7WVgzGsKL?= =?utf-8?q?+5ljaYq9yT9wRJolCTN+kYQfXfKPqe8YdaIvWiZkduDXprxftH7ydUo8hY/1BQFFm?= =?utf-8?q?WQR025wbu+xlKZtj3rbRSuyL1iONJ6gjB4HleFeHjV94kxTx9Nt+Z9SBefo1L49se?= =?utf-8?q?m88xydQUItKb33Dg98MYO7aKb7c9eFpEV0BNrzq7r7Gf3PC+lr1r9BDpGRUMMguze?= =?utf-8?q?4IQtPfoU4dhsfq3BWp2b5bqZg/MoedrTYuGuz37AgDBRRXjJRLHSJQHyMb1TNHAiU?= =?utf-8?q?n9k2qWfinw6EZO/6Ir9eGag3YvZ0fAeJaL0mFK2Wq4LCPbvHiekN7KuI9tfAhvCXS?= =?utf-8?q?T9zjF/6e9IbMTmd7cAWeQhNYGVP7KJ1yxzV35hiNmbKHMD2aC+TVhuqh4Hl2Dx1qH?= =?utf-8?q?XToaTzh+kjxX/IGQG9ORfSpBIcP5USfcVsr52gG/XaoYTapm2szhlf01g8pugVH84?= =?utf-8?q?noYhQxNpK1uqVnNK/xYX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S-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2025 07:14:34.9012 (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: REi370fSPUW4AcLbqJ4vA4XwXQMrOWGlh+kw09ku3PJ47vzlyFEoB2eGWhY6g9Kwa9UC3rNm+MJAubKfxLb0Xw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7442 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250119_231436_615759_8ECE9097 X-CRM114-Status: GOOD ( 14.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
scmi: Bypass set fwnode and introduce allow/block list to address devlink issue
|
expand
|
diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c index 7850eb7710f499888d32aebf5d99df63db8bfa26..76a5d946de7a8e16f5d940abc4f542aac5bb2b92 100644 --- a/drivers/firmware/arm_scmi/bus.c +++ b/drivers/firmware/arm_scmi/bus.c @@ -55,6 +55,20 @@ static int scmi_protocol_device_request(const struct scmi_device_id *id_table) unsigned int id = 0; struct list_head *head, *phead = NULL; struct scmi_requested_dev *rdev; + const char * const *allowlist = id_table->machine_allowlist; + const char * const *blocklist = id_table->machine_blocklist; + + if (blocklist && of_machine_compatible_match(blocklist)) { + pr_debug("block SCMI device (%s) for protocol %x\n", + id_table->name, id_table->protocol_id); + return 0; + } + + if (allowlist && !of_machine_compatible_match(allowlist)) { + pr_debug("block SCMI device (%s) for protocol %x\n", + id_table->name, id_table->protocol_id); + return 0; + } pr_debug("Requesting SCMI device (%s) for protocol %x\n", id_table->name, id_table->protocol_id); diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index 688466a0e816247d24704f7ba109667a14226b67..e1b822d3522ff25168f895a4b1ed4c4e9a35bfff 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -950,6 +950,9 @@ struct scmi_device { struct scmi_device_id { u8 protocol_id; const char *name; + /* Optional */ + const char * const *machine_blocklist; + const char * const *machine_allowlist; }; struct scmi_driver {