Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2703738ybc; Mon, 25 Nov 2019 02:47:34 -0800 (PST) X-Google-Smtp-Source: APXvYqwOyl1ph8hK4IASuKXUbSy9nGx7I+K1JWd0RfkBEtbCbasQJlu6rBoR4IaWDzGPKiVTrBUV X-Received: by 2002:a50:f747:: with SMTP id j7mr17629163edn.247.1574678854149; Mon, 25 Nov 2019 02:47:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574678854; cv=none; d=google.com; s=arc-20160816; b=LJO++jxzLxlU9QoBJtGMmyu51tZK4heRif3Kw4hMk/OsyiBiLNb/uGlRo1vbTs4KrN fjI40Kfp7daWP4dI2cjVUeX2AhfGSSrefn0GEuJbW9ZQ1PYDYnwO4/7waUTwn15izBAe d3pgv8EwtAYd1GSeKLQ2IFiXhkViZ6fIIJxU47lsyX2rN/mKjz5W4utlbvOXCjoc+5G8 GW7wQbdHsAlSVQN0fY/YDjIex/tt1yZ6+mCT2JNGc5DM1qZlvitxUHuaCNwfoTZZ8111 Hr+vGy0tMDL+hVczcP5uFONlbQvliyuA6OOUTUGjVcyN1tvAeUcLwqq8MZkiFnLNBu7f Wx5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=UgWDlMqZSOIviAXSGMmqCxQjc9iHXePXx9tmGFQyvtk=; b=LKhlw3OQLghYHEa7gZMQUVauwJdQ6m8aRJWADxEGXkRqbfHUAR7jPqoeg/I0jrS1jN I+6iutVT/aFYrgcRuSYzTQhicUrzz7WUcwJzMO3Yeq82VW/8gLjTxPJvNbPBciPv/ymN r68wslDjER6/nDgtHUSS6Uxpp8TbknizgSOdak6J6aEX4X4NN5Ig9peGcWBKjWVzcHCE pxhxsosuXQ0UQ+QWc8ZBHJG1oUFOvPaIOJTbgDkvNsNdoe45A0a4IX10GullLJF+zMEo ydOfhvCUpu7PGiyfGPFDaC2B7GomWoyc6i8cCc6tvfCDqZPT9QbuFJl24ptHt3K5c6Jb Vnig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si4138281ejk.66.2019.11.25.02.47.10; Mon, 25 Nov 2019 02:47:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727642AbfKYKpp (ORCPT + 99 others); Mon, 25 Nov 2019 05:45:45 -0500 Received: from foss.arm.com ([217.140.110.172]:48054 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727519AbfKYKpo (ORCPT ); Mon, 25 Nov 2019 05:45:44 -0500 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 75B93328; Mon, 25 Nov 2019 02:45:43 -0800 (PST) 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 6BDB43F52E; Mon, 25 Nov 2019 02:45:38 -0800 (PST) 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@kernel.org, suzuki.poulose@arm.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Steve.Capper@arm.com, Kaly.Xin@arm.com, justin.he@arm.com, jianyong.wu@arm.com, nd@arm.com Subject: [RFC PATCH v8 2/8] psci: let arm_smccc_1_1_invoke available by modules Date: Mon, 25 Nov 2019 18:45:00 +0800 Message-Id: <20191125104506.36850-3-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191125104506.36850-1-jianyong.wu@arm.com> References: <20191125104506.36850-1-jianyong.wu@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Export arm_smccc_1_1_get_conduit and apply it to get conduit in arm_smccc_1_1_invoke, then modules can use this arm_smccc_1_1_invoke. Signed-off-by: Jianyong Wu --- drivers/firmware/psci/psci.c | 1 + include/linux/arm-smccc.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index 5f31f1bea1af..cf509171422c 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -71,6 +71,7 @@ enum arm_smccc_conduit arm_smccc_1_1_get_conduit(void) return SMCCC_CONDUIT_NONE; } } +EXPORT_SYMBOL(arm_smccc_1_1_get_conduit); typedef unsigned long (psci_fn)(unsigned long, unsigned long, unsigned long, unsigned long); diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index 701fa1da6b4a..6f82c87308ed 100644 --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h @@ -373,7 +373,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 = arm_smccc_1_1_get_conduit(); \ switch (method) { \ case PSCI_CONDUIT_HVC: \ arm_smccc_1_1_hvc(__VA_ARGS__); \ -- 2.17.1