From patchwork Fri Nov 11 09:53:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Garg X-Patchwork-Id: 18633 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp648567wru; Fri, 11 Nov 2022 02:00:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf6zSvsxj+VZbvQ2O9QtARtTJ1jI0NcjLY4/L97S1YMU+tJCDmdD8wqB/LU+j2xV8vWUb9UL X-Received: by 2002:a65:590b:0:b0:462:8605:7fe7 with SMTP id f11-20020a65590b000000b0046286057fe7mr984227pgu.445.1668160844060; Fri, 11 Nov 2022 02:00:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668160844; cv=none; d=google.com; s=arc-20160816; b=YZVD7obh0Dr+2DxJMWRRHHB7XkcyUJcvszXDdEh2C0ZogxjwAeoIz79DbfSLrCwOQ2 G2syXGApcpZZI1BCP+WwTQBFZlGwqqfOt4nDRjcrXjgYFdEOu49owAq1m34SIRIFE0Wt QWDnmGurydhO8DhhTwcFQtRIh4UtCgY+CZB4PjgHz97kjqE9d+KwPBwsRTOk+aYP0KDT FvT09BYrJ/1NQ0SBm81iKqbEhutDqFoEiWoQX+EOuZ+bNK+mnSkAuUyEamQhiHSPrxoF A6R9f6fiinQirC7E5+MlYhnFw08FDfz3lX0EgrhQz8MhV7hDXAvYT0SYPWWmMQcvCpNn eKzA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=l8aDxDsNnGd9Cti6vqMoMN7YUwle0jy3PVcJaHD2rW4=; b=ln0Um/8WSPf8yep7isB98uwLE2eH5i3/rsk3G6FzP8DrgilTczeiYEY43asyqX9mzH 9SGxuJ5HsKpkPoDA7SD7K8ixlOW+Ugc/TDUIV6Fc84zH/gnqYVpxILKURRdxhwUf20yS tuW/k0o2xpvrYoqyvn9y1yKOXFaN2RnEiGCorvffzj/biTknN2fDwJ1FK5SqFVVnkE9b ygmY9Z7rblhzQh0gJSyujiZ/+De7P4RRN/AIPQTHJ9cVMMpBCAdhmZrS1Na1OxTI0OqV a2K2nAgMOLMG6IP06PA5o8rFKBOJAnTuNZDudPL0BJNU+bA+29WSvj+X44RalXCbJO8e jH/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wu1zQP8E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a17090332c600b0017840d9d42esi2396414plr.582.2022.11.11.02.00.27; Fri, 11 Nov 2022 02:00:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wu1zQP8E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233602AbiKKJx1 (ORCPT + 99 others); Fri, 11 Nov 2022 04:53:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233470AbiKKJxZ (ORCPT ); Fri, 11 Nov 2022 04:53:25 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 731F2BED for ; Fri, 11 Nov 2022 01:53:24 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id io19so3847725plb.8 for ; Fri, 11 Nov 2022 01:53:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=l8aDxDsNnGd9Cti6vqMoMN7YUwle0jy3PVcJaHD2rW4=; b=Wu1zQP8EzPVqNDzRo8j8C0Xo3hhPg6iViTQGEnZepBOg9p03rjrgpYMlPw7aOlaK/q FDHsTrtL1xO2WzglqEjy87RlpbE+i/BUqCkNAdDaJ1Tr0R2uVE3Lmi+diDNQeBVolnFc Z9qkQN7QtqGhEGvREKwBJ18z5qn66ZZgDkUZL0QX9lmhFkp28DpLKtz2elrieaQf600O jK6v2uWD1h4fdJyPQr54ISGEVsIcFaZU16OSDGCkCGoXW2qGLunTeHVPeuPw+FmAjvAa LWO3SDH+6mRNli12b14lNoWw8X7JSEJOIA0lTw57OCvvX9b+UWjA9roZtxhJnWsCDUVC 4g8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=l8aDxDsNnGd9Cti6vqMoMN7YUwle0jy3PVcJaHD2rW4=; b=Muhzq7HCQNq1xnTZfNfaMY6678bFLAs/HkEq/Bn0hEWEF2C7kaTqg0htErPVUQavv1 SW68FbyIeVV+dzex/dRa0PPnGBFTajXTr2C2HR2MgHtivW3cT9SBM8iMCChlBf5zZrgH pJVOHx6TXa7+ZkyylVJlW/PgMQZSHzdel9JDh+sCrE14TGb9xWFxBzcImkVsdpg3L3Lq NXpN58R4Fe+nR/F4dUqU5dt2IvgijMcoY+Wy6wfokN0wO4S1FC0xGD2LE7kDGMYCk1K+ wzToLf32FMz212ZWOxzMnHOUzfq+KgXjNwvc/cBZNnHSMIsVn7ejcVjy5EPbrtSvGHOC G6Ug== X-Gm-Message-State: ANoB5pnwypfUrgb0LKE+Phg3J/UMhMMwVIMKz2LAJqTk5xxXWlz+dv1p XUMdXZC2Ai6ix8V4evNOV+oRpQ== X-Received: by 2002:a17:902:8d8f:b0:179:f94a:6fda with SMTP id v15-20020a1709028d8f00b00179f94a6fdamr1778751plo.118.1668160404006; Fri, 11 Nov 2022 01:53:24 -0800 (PST) Received: from sumit-X1.. ([223.178.212.236]) by smtp.gmail.com with ESMTPSA id b14-20020a170902650e00b00177e5d83d3esm1263094plk.88.2022.11.11.01.53.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 01:53:23 -0800 (PST) From: Sumit Garg To: linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, cristian.marussi@arm.com, Ludvig.Parsson@axis.com, jens.wiklander@linaro.org, etienne.carriere@linaro.org, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, Sumit Garg Subject: [PATCH] firmware: arm_scmi: Resolve dependency with TEE subsystem Date: Fri, 11 Nov 2022 15:23:13 +0530 Message-Id: <20221111095313.2010815-1-sumit.garg@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749193425382332648?= X-GMAIL-MSGID: =?utf-8?q?1749193425382332648?= The OP-TEE SCMI transport channel is dependent on TEE subsystem to be initialized first. But currently the Arm SCMI subsystem and TEE subsystem are invoked on the same initcall level as subsystem_init(). It is observed that the SCMI subsystem initcall is invoked prior to TEE subsystem initcall. This leads to unwanted error messages regarding TEE bus is not present yet. Although, -EPROBE_DEFER tries to workaround that problem. Lets try to resolve inter subsystem dependency problem via shifting Arm SCMI subsystem to subsystem_init_sync() initcall level. Signed-off-by: Sumit Garg --- drivers/firmware/arm_scmi/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index f818d00bb2c6..f43e52541da4 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -2667,7 +2667,7 @@ static int __init scmi_driver_init(void) return platform_driver_register(&scmi_driver); } -subsys_initcall(scmi_driver_init); +subsys_initcall_sync(scmi_driver_init); static void __exit scmi_driver_exit(void) {