Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4913104ybl; Mon, 9 Dec 2019 19:41:42 -0800 (PST) X-Google-Smtp-Source: APXvYqzghEDwLN03Iyq7coJPVZgDs1VDLD4broebYX/sC5lTHjNIXcfqPhPoG+fi+LYibbxpwwvd X-Received: by 2002:aca:4e90:: with SMTP id c138mr2316585oib.147.1575949302698; Mon, 09 Dec 2019 19:41:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575949302; cv=none; d=google.com; s=arc-20160816; b=fs7WZdEeVNiQrBfJpNoh0kuUTcnk6xvBOmSY2CBomM3rHMuo/Fm9L2sne3ouybXe4Q +ezuo/j7F7kcWYe+WO9MjF6c1LinwvjUXoQdXQEf1Ogc8Ag/3hLrZ+HZwsrwPtP0fGn2 QtYwvgpjGKDX2l9iaytFShe+0/LRLkQ0YWWIwh6xRY3mddHXVQLIgGZaqg5gh4j7akIt zX/+ujlZ9V8wKgf00Eimn1VlKI/3JLktTxsaAvx+ygIMa43PTHnr7waEvEDB1HwwOrhp 7seBN+KoNoRunrfhu8YH0rj5DYWNTRv+IQ6vFV7d3eGb2lbAmO/AJyKH2yUlQ68mI4u6 xjdQ== 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=oeX2eATEWk6r3C122iM5iVnvsXKJT1TLnn8O6haRsHjmmYeyzt9Th5Fxz8nfl68GUV hf1mg7qBgp53QAOSA2g23wgc/ZTgDUkbT4jo8QYzbC61agPZXNMBLQdKV2LTESwO3JYS EXoYdLC2TZ50qz9o5g6BTjYaCujNiFsy1OW+qnQzbB3E2MKs3Vbzr8mZj9VUE5w1h8z/ VeL+fxt5lNns2KzEpVBK8USMH0wSwXO8rPhrNV1+iABM4UZWEaDB19/uoU5JPWJ+HoCN 35cD7BDRmOWiMzfdNFw0ivdX486vtJXfRSgThIhtIsLbtkZT5EodHPpZYZXjtzFuQJoa lPiw== 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 r6si1169940otq.95.2019.12.09.19.41.30; Mon, 09 Dec 2019 19:41:42 -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 S1727081AbfLJDkw (ORCPT + 99 others); Mon, 9 Dec 2019 22:40:52 -0500 Received: from foss.arm.com ([217.140.110.172]:55860 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726953AbfLJDkv (ORCPT ); Mon, 9 Dec 2019 22:40:51 -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 1A7DD1FB; Mon, 9 Dec 2019 19:40:51 -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 F05563F52E; Mon, 9 Dec 2019 19:40:45 -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, steven.price@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 v9 2/8] psci: let arm_smccc_1_1_invoke available by modules Date: Tue, 10 Dec 2019 11:40:20 +0800 Message-Id: <20191210034026.45229-3-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191210034026.45229-1-jianyong.wu@arm.com> References: <20191210034026.45229-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