Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2092053rdb; Mon, 20 Nov 2023 01:25:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpWC+V79DJ+ILq66MkfyMm6nU6c1k7tLvHWLWIWV76IQ2T0pvSTVgveBoNsGoCHCl0O4Ih X-Received: by 2002:a05:6a00:8d2:b0:693:3851:bd3e with SMTP id s18-20020a056a0008d200b006933851bd3emr5516560pfu.3.1700472302377; Mon, 20 Nov 2023 01:25:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700472302; cv=none; d=google.com; s=arc-20160816; b=PoyQAo/DA+CiNaYptK6W0d4/50rwwtOfpjlxgSdjTKee432fSuxhg9C995AYUHrWJf QMci+Kq46wcxAPwYP0rMO1lp/J+YrOuQTrCZ3Op1dXnl222ji7iMy6TNJlOklxoJstS9 dz4RTu5hRg6aG/EnwiqC/Zu8MBPAOBRWtrFroYZA+ggbgRskE184rdnTR6d7uh5fU6xJ 7HOPS8tiJHzyOg6n0mMXakxnls0J39+jXftsL1OiDUfK3dzxbWrhvguvbsk6tN/+XZk/ I5G/G+2FBFf52R5nXRHMgq7CPmeOFbZ0KNmzOY23Nn/g7mz2vHwi+el2UXDfzbtTD8ms ki0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=VaLCPpptCPl4dd3HPwfC9h62KXrs4QNdYGscUChirrc=; fh=PHHjPEex97qIeC5+UIH0j/AeMThfxu6zwoNT5hubKyU=; b=v/uiR6WgEfHPXlcnooY9rzzCqbHmgbo/jaF22H2AaeFtRiGn3CTksTIyTrGL+0tdvR KUv34U4amJdrVfrRO9oaItBCcynklMEQgDlkFraoHyv52fvybCtSlcuFNhubNKueNJ9O kKfe7ntZa19jxettiuI4d78zsrczwMIqS/xl4plRLn2OR/YjuWpSIvunQS4el5y+2ueI TYRq+24uaObD2mqtm30ynX1WkEFRPh+K3J1KqjQrOfOhs+7aQKlHUObNt/x0LMG2Q7Ty poECTC5oQArvvX+jfJzlwJF6txrhLwNUjXoINyk/pBD+YV4LYpONDorTWy9nFMdxb8oA CAyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=Y7u3kRAF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id p10-20020a056a000a0a00b006c2d5caf9b2si7995695pfh.282.2023.11.20.01.25.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 01:25:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=Y7u3kRAF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 8AB36805A791; Mon, 20 Nov 2023 01:24:59 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232655AbjKTJYx (ORCPT + 99 others); Mon, 20 Nov 2023 04:24:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232305AbjKTJYu (ORCPT ); Mon, 20 Nov 2023 04:24:50 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A928CA; Mon, 20 Nov 2023 01:24:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=VaLCPpptCPl4dd3HPwfC9h62KXrs4QNdYGscUChirrc=; b=Y7u3kRAFMUjm3/j4LodjYSA3LZ VC/v4Le7llOshhtVIeZgByL9Ta8EV6wWiKc32k2oFctq/SRATcfURY2PKHwM1fQ3e8O0y94oymLQc xUrw2kmBGd5PWCfen4xrhtknxW1A3VcIcPuln0pl6/3f9+djfDci/m0DmbTJbLwDqHwz9uzkkrzpc n5mOUp+mG/7fnMgC/NdjC9qKdJiht8DNMXVImILTIBATOw8lyvNOwlhTzaZeudVzzfnwbvVIrj3yR uYAf8x/ctMS3iNKwDTV/DFOkBJ4dwsZmpT9F11ZEBjlVG0bZ2GIoNmwdcP+kaiqwUeH0SI0NgvPw4 bHPb0sAw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:49586) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r50WD-0005DX-2m; Mon, 20 Nov 2023 09:24:37 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1r50WD-00033Q-J2; Mon, 20 Nov 2023 09:24:37 +0000 Date: Mon, 20 Nov 2023 09:24:37 +0000 From: "Russell King (Oracle)" To: Jianyong Wu Cc: "linux-pm@vger.kernel.org" , "loongarch@lists.linux.dev" , "linux-acpi@vger.kernel.org" , "linux-arch@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-riscv@lists.infradead.org" , "kvmarm@lists.linux.dev" , "x86@kernel.org" , "linux-csky@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-ia64@vger.kernel.org" , "linux-parisc@vger.kernel.org" , Salil Mehta , Jean-Philippe Brucker , Justin He , James Morse , Catalin Marinas , Will Deacon , Mark Rutland , Lorenzo Pieralisi Subject: Re: [PATCH 34/39] arm64: psci: Ignore DENIED CPUs Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 01:24:59 -0800 (PST) On Thu, Nov 16, 2023 at 07:45:51AM +0000, Jianyong Wu wrote: > Hi Russell, > > One inline comment. ... > > Changes since RFC v2 > > * Add specification reference > > * Use EPERM rather than EPROBE_DEFER ... > > @@ -40,7 +40,7 @@ static int cpu_psci_cpu_boot(unsigned int cpu) { > > phys_addr_t pa_secondary_entry = __pa_symbol(secondary_entry); > > int err = psci_ops.cpu_on(cpu_logical_map(cpu), pa_secondary_entry); > > - if (err) > > + if (err && err != -EPROBE_DEFER) > > Should this be EPERM? As the following psci cpu_on op will return it. I > think you miss to change this when apply Jean-Philippe's patch. It looks like James didn't properly update all places. Also, > > diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index > > d9629ff87861..ee82e7880d8c 100644 > > --- a/drivers/firmware/psci/psci.c > > +++ b/drivers/firmware/psci/psci.c > > @@ -218,6 +218,8 @@ static int __psci_cpu_on(u32 fn, unsigned long cpuid, > > unsigned long entry_point) > > int err; > > > > err = invoke_psci_fn(fn, cpuid, entry_point, 0); > > + if (err == PSCI_RET_DENIED) > > + return -EPERM; > > return psci_to_linux_errno(err); This change is unnecessary - probably comes from when -EPROBE_DEFER was being used. psci_to_linux_errno() already does: case PSCI_RET_DENIED: return -EPERM; Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!