Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3345058ybg; Fri, 25 Oct 2019 02:46:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHqwpDWD7xFiO8FDMW1atBr1a7RcZetyC+SYwaxRJOmhYhRraAp+2PoVzQcbBDVIMCERre X-Received: by 2002:aa7:d8c6:: with SMTP id k6mr2816660eds.87.1571996770230; Fri, 25 Oct 2019 02:46:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571996770; cv=none; d=google.com; s=arc-20160816; b=v69wAvbmdEsbjukvoUtgznkwGPkroAPco9u513jfNKzR4L/XXOKGz92Pg0DINIcGiR ZASje8+EXCW14Q3aH+c/jtwUmJdAUlZPATaDYAmOfXJbzvuUKowsIldU5NABakq8bobT qqe1QgG6Gby6bGgwZ2TETZrFzVN7oJ8JOH4Ymty/s+WLCOCnhZ7uLbt/KSaedzBvV8hn fi/JnU/H/o78voMawn2r3rofx9Heg+aML9cgNS/k6HXyjYQBr0btR0T0qxlsK9/T1ExB g9MhdNGtqBb6FRdblT8F6uVIpdzHB9Clkd2xBZDxwcBjC2w7JvxDLcJyNFtWrEHJ2Xwd fTnw== 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=iklvpx/vOo4QnasMDKty7fSkegqAhN8gHlxx7u0l8+GdHtsufRRyfmyWFT2Rlxv4Su BaYxXvnKD+VGOJ9GPje8kPygAcD/0GdJ9eRGM+Bjf/CwQ++IGmxyY5U9zDuM/Fo7zi4c AzYVZYwd4h8dogkvJwpdoQ+EGs8kNEfsl9KWH4T4P1b6kC6jyW/O4BGHJmCgPSAi0Bpd gdXv968bjlwIMmCXejCEqE5wY7aWtbtKoWHreuqOeFogQbxr3477uzbQbOuWm+UNbicw 56Aqh9MiSwTipBJaiWOoZb/2LPkTLw8PzAB8UGRZsHN7CU/ZqAPLcpxvu0IKnD2GdJET lLqw== 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 t11si900242eju.277.2019.10.25.02.45.45; Fri, 25 Oct 2019 02:46:10 -0700 (PDT) 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 S2393407AbfJXLCu (ORCPT + 99 others); Thu, 24 Oct 2019 07:02:50 -0400 Received: from foss.arm.com ([217.140.110.172]:47442 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393393AbfJXLCu (ORCPT ); Thu, 24 Oct 2019 07:02:50 -0400 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 6EFB04AC; Thu, 24 Oct 2019 04:02:34 -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 8A5543F71A; Thu, 24 Oct 2019 04:02:29 -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@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 v6 2/7] psci: Let arm_smccc_1_1_invoke available by modules Date: Thu, 24 Oct 2019 19:02:04 +0800 Message-Id: <20191024110209.21328-3-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191024110209.21328-1-jianyong.wu@arm.com> References: <20191024110209.21328-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