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: 13040047 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 6A46DC433FE for ; Fri, 11 Nov 2022 09:54:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=czCipAi5AsmkqgAMDKCplvFjYTTTjlOoajfa29bNLHQ=; b=C3ZNR+9AJ7NGUg VNHFIk6hCd4f/q+HEQmPvkIm+EZWCg+awudfrYBYoXY+3hqHdKwjiJgpKDtxVZiFe/Xsd8peoAcAh JNkQCBmV2ma3mSzFccUF/d3UuBHHyPFe+kZsOzpgpspMP7C7c0hYRUtiTyb+MJbVySCEt8QM+AlCw 4Ga285bDrVlAb+vNPPIm8PwnUg5XbX5W5omsqQB3viKSZt2uDE4K2nQcEwUxj8rTDZmQfYVPzY0A0 VLtZVg+ZbEJ4A4Y2pnvMf18PfJXfch3R3ib5S3hm8Sbl5ETb2ldAmVlM9rBBYTioUc9gi9SK12kbY S4paKWj9TmxPgrRtwAoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otQj5-00ElrI-EQ; Fri, 11 Nov 2022 09:53:31 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otQj2-00ElnA-QM for linux-arm-kernel@lists.infradead.org; Fri, 11 Nov 2022 09:53:30 +0000 Received: by mail-pl1-x636.google.com with SMTP id p21so3852717plr.7 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=np029rWw9WDcliaTuRagviDewJ9wiIsH8goXQin2q+1B+Ajp8iB8mqXHL0uvSDpr1c 9Mb2d2w3E8EmVPh4Jt2Jw+5s7ALDzVoB1gjPwJ7K4rOclr2qsZ2Dk70t6zd0URl8GBwo 6AqzjuFrRz0nELN92dTrbj2/B6fnmDSEjHlBm+kEshEfYIlgkSF8erKKnKgrviO5Sd7L fRzjhpy1CwTGntpEMAVtvYvEfpba2RT+6CeQ75D9B8llhe3i+CPX+VNyMy1cBrg7pYvk BLp8vPfOZguXNkgtvSL3DdXnGfmN73fRrJlkQDyf5EwkI1ppizlh/6trol5XB8NL1Iva hbzw== X-Gm-Message-State: ANoB5pnf7x8nVNLrUZhf+VIlel3AEDAqcmv5itQiByY+ycH36y2ZfweC OqifBsEv48enCOkv/KgI+fIpbp1KMMYeOQ== X-Google-Smtp-Source: AA0mqf42efNqQh0ZHyiZ1BEVeklQH50qPLWGdjt9msce9pDA/5Xb/0iTmCZijwdkYcmiO9QDX3PwlQ== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221111_015328_907098_163D3C75 X-CRM114-Status: GOOD ( 12.31 ) 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 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) {