Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3113430ybc; Thu, 14 Nov 2019 04:15:56 -0800 (PST) X-Google-Smtp-Source: APXvYqynEB6HD4wdaniS2ydHOJ9eLUMhUsONErx2tF+PNmLP64+Zhrn3IoMH2uFTme8TwNv8ssTY X-Received: by 2002:a17:906:6b0c:: with SMTP id q12mr8298340ejr.197.1573733756103; Thu, 14 Nov 2019 04:15:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573733756; cv=none; d=google.com; s=arc-20160816; b=fefTUvNz0lTuSnySPmY39Ec7JF8QKd5ZH777MGVLA1kTM0P5dug9APDwoC3ngPx8Y8 32SbDpK7KHt/sVUhaxGIVCbX4jquRLhJCF6U/dEHxrz9yt0y3eYNydyw/EkL/K/lCNH7 F+6/fRECygXnGehqFpglS77WBCDrtnQOtIQL1fJvpDG5CICuqUmz2OxeGaDUHcQx9PqZ ZQy2XNMrKjVAKHbEAXMFFMC5T+xU6mKseChtGfShQNxfAidpwpaxHeEbLMvDfYlwC2k4 m50Q7I/bW6jNvWY61900a099FkfJaZEiLMZvbZXvW1V1jOXFFFeF1e97Qdftx7xrYNZp ebug== 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=L7E3j4F7+ZJLhBkDJHnGCY/50oWo6AnMB3dCGBikr2XiuO57jIynRx1HGsn6j5Sq/C h/H43G2Q7fsQ39RC/fbQIItGoX9TQiwbSu9eA9sBFj1DtCDeGJKECQ6V9NmbiI4++/cZ MBOFKsaONNbhd7R8t6TyuYBZUI2Bjbq9im413dEbinbhGbY6ZA5j2e6o+ybb3RcU1vIg UPup/k6lmrdIATecLQtRoPVeyL+dvNucNFY6xspkGCbNeONIyyLLS0XkF/CKBn1bi0k7 uXhxmNcHMqz00JShcmc0lTCSdIIG0Ab+VFrDjPS0PUAMK/IiJQYXhaNTCYQjYvkdJ9fo RUXA== 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 b37si4101946edf.186.2019.11.14.04.15.30; Thu, 14 Nov 2019 04:15:56 -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 S1727081AbfKNMOb (ORCPT + 99 others); Thu, 14 Nov 2019 07:14:31 -0500 Received: from foss.arm.com ([217.140.110.172]:41876 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726115AbfKNMOa (ORCPT ); Thu, 14 Nov 2019 07:14:30 -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 18F7A55D; Thu, 14 Nov 2019 04:14:30 -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 D8E633F6C4; Thu, 14 Nov 2019 04:14:23 -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 v7 2/7] psci: let arm_smccc_1_1_invoke available by modules Date: Thu, 14 Nov 2019 20:13:53 +0800 Message-Id: <20191114121358.6684-3-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191114121358.6684-1-jianyong.wu@arm.com> References: <20191114121358.6684-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