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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 A24C1C56202 for ; Thu, 26 Nov 2020 17:22:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 4B88D206F4 for ; Thu, 26 Nov 2020 17:22:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BM0wWeyw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B88D206F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.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=NgtQ4CZsXdAw5iGTDpG8mfCjUZNiv7YqyVJ+KP6V6LY=; b=BM0wWeywMnSp08eYtrmqnAh/J Xb2ezZhzFgptqW/XR3wH0FrogOwOoCcgKyz42ZU59t/GeMmOK1M8rDsKiZayMiPfVPidqDBcOnR7K +G6n3yELn2oZ7bgzsccbikalGZxOkDZl2HgMH5wqOOWZrnh275wifaI4lxcQjLpDrrYW38JIVwc/2 mC53HhlYXcTehEtl1f3FUZLE9rPj8OCY3kQKG5HsRoO0uRWW1jrc14wO3ijC0Vwc8qdhrg90NyILE AHCVTsLsnXZwhJkWuX9v/BQKLK8lvBd9/vyQM82EfzdPmmSSgeNnmuS44vgh7wi/U5s0zUr7pMhA/ qXHcjOIWA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kiKxX-0007h3-J6; Thu, 26 Nov 2020 17:21:31 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kiKxV-0007gS-CW for linux-arm-kernel@lists.infradead.org; Thu, 26 Nov 2020 17:21:30 +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 4DACB31B; Thu, 26 Nov 2020 09:21:28 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [10.57.30.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 353A53F23F; Thu, 26 Nov 2020 09:21:24 -0800 (PST) Date: Thu, 26 Nov 2020 17:21:21 +0000 From: Mark Rutland To: David Brazdil Subject: Re: [PATCH v3 01/23] psci: Support psci_ops.get_version for v0.1 Message-ID: <20201126172121.GB38486@C02TD0UTHF1T.local> References: <20201126155421.14901-1-dbrazdil@google.com> <20201126155421.14901-2-dbrazdil@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201126155421.14901-2-dbrazdil@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201126_122129_494103_9D4A424D X-CRM114-Status: GOOD ( 22.17 ) 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: Lorenzo Pieralisi , kernel-team@android.com, Jonathan Corbet , Catalin Marinas , Suzuki K Poulose , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Sudeep Holla , James Morse , linux-arm-kernel@lists.infradead.org, Marc Zyngier , Tejun Heo , Dennis Zhou , Christoph Lameter , Will Deacon , kvmarm@lists.cs.columbia.edu, Julien Thierry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 26, 2020 at 03:53:59PM +0000, David Brazdil wrote: > KVM's host PSCI SMC filter needs to be aware of the PSCI version of the > system but currently it is impossible to distinguish between v0.1 and > PSCI disabled because both have get_version == NULL. > > Populate get_version for v0.1 with a function that returns a constant. > > psci_opt.get_version is currently unused so this has no effect on > existing functionality. > > Signed-off-by: David Brazdil > --- > drivers/firmware/psci/psci.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c > index 00af99b6f97c..213c68418a65 100644 > --- a/drivers/firmware/psci/psci.c > +++ b/drivers/firmware/psci/psci.c > @@ -146,6 +146,11 @@ static int psci_to_linux_errno(int errno) > return -EINVAL; > } > > +static u32 psci_get_version_0_1(void) > +{ > + return PSCI_VERSION(0, 1); > +} Elsewhere in this file we've used a psci_${MAJOR}_${MINOR}_* naming scheme. To match that, I'd prefer we call this psci_0_1_get_version(), and rename psci_get_version() to psci_0_2_get_version(). With that: Acked-by: Mark Rutland Thanks, Mark. > + > static u32 psci_get_version(void) > { > return invoke_psci_fn(PSCI_0_2_FN_PSCI_VERSION, 0, 0, 0); > @@ -514,6 +519,8 @@ static int __init psci_0_1_init(struct device_node *np) > > pr_info("Using PSCI v0.1 Function IDs from DT\n"); > > + psci_ops.get_version = psci_get_version_0_1; > + > if (!of_property_read_u32(np, "cpu_suspend", &id)) { > psci_function_id[PSCI_FN_CPU_SUSPEND] = id; > psci_ops.cpu_suspend = psci_cpu_suspend; > -- > 2.29.2.454.gaff20da3a2-goog > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel