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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EBA0C4360C for ; Thu, 26 Sep 2019 11:42:43 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3E1CC208C3 for ; Thu, 26 Sep 2019 11:42:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="A2uTe4XN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E1CC208C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Ulqm1+7LYjSxMabVAyB/Re6EvUJVVDjq/JOAn7kPlh4=; b=A2uTe4XNAEJv0S07p/jwhud92g z6LlS+lLVVh6H8SMBrsIOogO6fLtSHC0EDWaUhWDuKox8Y9DjQUp290DWNepAPnG3Y1n6exZoBBNF qLSQaLac3kCAlMs9w6gm4FrboMI1x3tRbV5Qup2GSATN2S334pS/4Hc3jx8iFY8WKs+AGAy6aX+NJ gi2wnGKwS2oE99IwFuE33GtJ8lxcQSOzB/Mr8gYdBvudwA0D9MK7747av2dVyi29tal1Aus0X/KVW qLxbENS8nYW6moN6FUoJ6RfUssVSR9jhD9aMjfTLhf1l59LHJ2wO+bAj6QXlXQGu+nydlBjJWo9rb xsI5ACog==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iDSAP-0004wL-Dm; Thu, 26 Sep 2019 11:42:37 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iDSAH-0004mf-93 for linux-arm-kernel@lists.infradead.org; Thu, 26 Sep 2019 11:42:30 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8FBDD1570; Thu, 26 Sep 2019 04:42:28 -0700 (PDT) Received: from entos-d05.shanghai.arm.com (entos-d05.shanghai.arm.com [10.169.40.35]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 06BB93F67D; Thu, 26 Sep 2019 04:42:23 -0700 (PDT) From: Jianyong Wu To: netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com, sean.j.christopherson@intel.com, maz@kernel.org, richardcochran@gmail.com, Mark.Rutland@arm.com, Will.Deacon@arm.com, suzuki.poulose@arm.com Subject: [RFC PATCH v4 1/5] psci: Export psci_ops.conduit symbol as modules will use it. Date: Thu, 26 Sep 2019 19:42:08 +0800 Message-Id: <20190926114212.5322-2-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190926114212.5322-1-jianyong.wu@arm.com> References: <20190926114212.5322-1-jianyong.wu@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190926_044229_361490_BA36589F X-CRM114-Status: GOOD ( 10.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: justin.he@arm.com, kvm@vger.kernel.org, Steve.Capper@arm.com, jianyong.wu@arm.com, linux-kernel@vger.kernel.org, Kaly.Xin@arm.com, nd@arm.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org If arm_smccc_1_1_invoke used in modules, psci_ops.conduit should be export. Signed-off-by: Jianyong Wu --- drivers/firmware/psci/psci.c | 6 ++++++ include/linux/arm-smccc.h | 2 +- include/linux/psci.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index f82ccd39a913..35c4eaab1451 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -212,6 +212,12 @@ static unsigned long psci_migrate_info_up_cpu(void) 0, 0, 0); } +enum psci_conduit psci_get_conduit(void) +{ + return psci_ops.conduit; +} +EXPORT_SYMBOL(psci_get_conduit); + static void set_conduit(enum psci_conduit conduit) { switch (conduit) { diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index 552cbd49abe8..a6e4d3e3d10a 100644 --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h @@ -357,7 +357,7 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1, * The return value also provides the conduit that was used. */ #define arm_smccc_1_1_invoke(...) ({ \ - int method = psci_ops.conduit; \ + int method = psci_get_conduit(); \ switch (method) { \ case PSCI_CONDUIT_HVC: \ arm_smccc_1_1_hvc(__VA_ARGS__); \ diff --git a/include/linux/psci.h b/include/linux/psci.h index a8a15613c157..e5cedc986049 100644 --- a/include/linux/psci.h +++ b/include/linux/psci.h @@ -42,6 +42,7 @@ struct psci_operations { enum smccc_version smccc_version; }; +extern enum psci_conduit psci_get_conduit(void); extern struct psci_operations psci_ops; #if defined(CONFIG_ARM_PSCI_FW) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel