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=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 C0026C4CEC4 for ; Wed, 18 Sep 2019 08:07:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 917E620882 for ; Wed, 18 Sep 2019 08:07:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729561AbfIRIHi (ORCPT ); Wed, 18 Sep 2019 04:07:38 -0400 Received: from foss.arm.com ([217.140.110.172]:36768 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729510AbfIRIHg (ORCPT ); Wed, 18 Sep 2019 04:07:36 -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 3EA731570; Wed, 18 Sep 2019 01:07:36 -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 28F5B3F59C; Wed, 18 Sep 2019 01:07:30 -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 Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Steve.Capper@arm.com, Kaly.Xin@arm.com, justin.he@arm.com, jianyong.wu@arm.com, nd@arm.com, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH v3 1/6] psci: Export psci_ops.conduit symbol as modules will use it. Date: Wed, 18 Sep 2019 04:07:11 -0400 Message-Id: <20190918080716.64242-2-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190918080716.64242-1-jianyong.wu@arm.com> References: <20190918080716.64242-1-jianyong.wu@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 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 89456C4CEC4 for ; Wed, 18 Sep 2019 08:08:33 +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 595E221907 for ; Wed, 18 Sep 2019 08:08:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Uq/GgrI0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 595E221907 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=Uq/GgrI0C7wAlubWCHY9NAeOYj fkR9E62SiQal6z6EgFeS3sUXTLk0ELWGXqcEMAHSgQzF3Rtuxi7NQ3eKSN1jvwAPNpOZ3jt/TX5Tz cYXK6Gv82zpNLluR2DVuYtVMOUiIAke0ybWArMRB6BwHbXOezXbmal3xGFKrkrQQlfPq6AqdHjESf Gi9aUXEm2e39t5s3O2ut6RWV/gA5jee11cTKvHZEouiFCqjDuv3Hio17UqYaMWX6RvbtRREPng6oj imMsvcjotFKs7ICEjapdI8pviFFiTzo7IEaZ8pKWUu0SS0Em+ItGLG3ywmgHepbB7G3Cb5xd5v55J 2sad0LFw==; 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 1iAV0i-0003Wb-6C; Wed, 18 Sep 2019 08:08:24 +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 1iAUzw-0002z9-Ku for linux-arm-kernel@lists.infradead.org; Wed, 18 Sep 2019 08:07:38 +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 3EA731570; Wed, 18 Sep 2019 01:07:36 -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 28F5B3F59C; Wed, 18 Sep 2019 01:07:30 -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 v3 1/6] psci: Export psci_ops.conduit symbol as modules will use it. Date: Wed, 18 Sep 2019 04:07:11 -0400 Message-Id: <20190918080716.64242-2-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190918080716.64242-1-jianyong.wu@arm.com> References: <20190918080716.64242-1-jianyong.wu@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190918_010736_864358_F80F1B05 X-CRM114-Status: GOOD ( 10.50 ) 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, 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