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=-13.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT 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 0135EC282DE for ; Wed, 5 Jun 2019 10:39:24 +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 CFD9E20717 for ; Wed, 5 Jun 2019 10:39:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qpVsZk/p" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFD9E20717 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Yw6z5x+wAIZ4dqZlkDHD3Yw3asjnmfXtfQDGXCUPOYM=; b=qpVsZk/p6hFuUG PWFnWuoHQnBNsuDZZnAR/tURlx+XaRbR1AfZYtHO6BMqYfClV5B0a+4KAq1N42eXk8wx74VDUliE2 Bt3YOLUZiLje8Ew82JUc1mFOJ87jCvpAtrhXf4vGqe8MxRs8DJwR5Jy64rEHzs4tUytY2l301qf7v 2n5vICd1LiQ7fl6bsgKModYIATpdwvKJnkiJ2DXHnSw3ffgCm4Q6J7XywRGz48sM6PI8/2PkRy8JD X0mGMWa453V0DApnlgdM87oeGGq+aGIBkdmKuDM8Jjc+DdIpwyiUXesscevGSKearNAURJxoTdikH o+JncWiSTQOOjaJWxUWw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYTKA-0003oH-SW; Wed, 05 Jun 2019 10:39:18 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hYTK8-0003nv-7o for linux-arm-kernel@lists.infradead.org; Wed, 05 Jun 2019 10:39:17 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 42558374; Wed, 5 Jun 2019 03:39:15 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D56273F690; Wed, 5 Jun 2019 03:39:12 -0700 (PDT) Date: Wed, 5 Jun 2019 11:38:40 +0100 From: Mark Rutland To: Sudeep Holla Subject: Re: [PATCH 2/3] arm64: export acpi_psci_use_hvc Message-ID: <20190605103840.GA30925@lakrids.cambridge.arm.com> References: <20190604203100.15050-1-alisaidi@amazon.com> <20190604203100.15050-3-alisaidi@amazon.com> <20190605094031.GB28613@e107155-lin> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190605094031.GB28613@e107155-lin> User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190605_033916_285541_04E429EC X-CRM114-Status: GOOD ( 19.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Herbert Xu , Arnd Bergmann , Greg Kroah-Hartman , Benjamin Herrenschmidt , Matt Mackall , Will Deacon , linux-kernel@vger.kernel.org, Ron Rindjunsky , Ali Saidi , Catalin Marinas , David Woodhouse , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org 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 On Wed, Jun 05, 2019 at 10:40:31AM +0100, Sudeep Holla wrote: > On Tue, Jun 04, 2019 at 08:30:59PM +0000, Ali Saidi wrote: > > Allow a module that wants to make SMC calls to detect if it should be > > using smc or hvc. > > > > Signed-off-by: Ali Saidi > > --- > > arch/arm64/kernel/acpi.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c > > index 803f0494dd3e..ea41c6541d3c 100644 > > --- a/arch/arm64/kernel/acpi.c > > +++ b/arch/arm64/kernel/acpi.c > > @@ -119,6 +119,7 @@ bool acpi_psci_use_hvc(void) > > { > > return acpi_gbl_FADT.arm_boot_flags & ACPI_FADT_PSCI_USE_HVC; > > } > > +EXPORT_SYMBOL_GPL(acpi_psci_use_hvc); > > > > I would rather have this in drivers/firmware/psci/psci.c checking the > value of psci_ops.conduit so that it's not just ACPI specific and can > be used on DT platforms too if required. I'd also like this to not hook into PSCI internals. This code cares about SMCCC, not PSCI. We also really shouldn't need to spread the conduit management everywhere, too. We should be abel to have probe code do: if (!is_smccc_1_1_available()) goto fail_probe; ... and runtime code do: res = arm_smccc_1_1_call(...); ... which is much clearner. I'd started cleaning that up [1], but I haven't had the chance to rebase and repost it. Ali, I assume your firmware has SMCCCv1.1+. Is that the case? Thanks, Mark. [1] https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/smccc-cleanup _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel