Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2176664lqt; Mon, 22 Apr 2024 03:58:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVNTGsS+iPoE8klkBkjzVBvTAh61R/k1+BkQ6kyGzzhyzA30x/LssX9JHn9Oiz+soZSV3D9OsMcOT5MTXEedxmkGYpazpyDm8nLa2GyYw== X-Google-Smtp-Source: AGHT+IGUcv+SakXW5OBfJgEYR+df5gV5rfnHia70MKLK97BA5+xphChwvG8eyTzjPuzbEYdPNx59 X-Received: by 2002:aa7:9a06:0:b0:6ec:fdcd:18eb with SMTP id w6-20020aa79a06000000b006ecfdcd18ebmr9099456pfj.21.1713783504729; Mon, 22 Apr 2024 03:58:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713783504; cv=pass; d=google.com; s=arc-20160816; b=w+gglgiitiCGe1OEWftDUqFFGlct7h8OCDGU50Dv6lJUgDmeqqVVm6OH5LGgy9wUKB 8GjpP2GsBf715D1HG/rNhN/9N62OjR59mPahvdVpufCq7zfDwi9i4f1pbUoaNIQTMFkP mLB8I19nWcPeufqxQ3692INbxnIKvK8lmBof7IBj/V+Yp9CKldCb2boYo+bMyFaEbMox LYr92SVVVz3klPLBwPF4vhqyXkwD/LjQyCl2krceaeJzOYW/SQYHaKABaFUUYUDh2D3b WlPFfOnBe9ZRUqKrxuM5lZjxWhCgLEW83BJ+nc601svEOOL5Geil6IAXcpQgTOiGgUOT Xleg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=bWJ5yY0XrhMAAkyJ5Ti0H1iveuqhNQMX5blLTefSlsw=; fh=lJhYUqhWTfHoMEnuIIFuRBJ3aZesfOuHj5ncL4/We+g=; b=vBQRzUWBS9+yui1xEQgbbJahcptgRZjeq5aUkFF5t7p3qWp0GJYBP2CVMRzAxKqBDr Q3TEEs8FH4+SRRCERsSSMAjz2lbyYLxHnUeC7iTQPRjOIrzA4FSsE0bfR4PhYVW0JN+Z xpE7hafU2zIvXfoKI7zo7TA4kJzpc0RMHiZfPEkfS+L0y1hLEo84J7e401RXrSBo6F12 C3csO4gW0/ZdiN8Xj09J0rM7OozWy3UIb9AOIslN5xqzLGd5gslyaSZ6XrjSDRu8qIeJ u7bJ5dTHjG/+8oRR5wKKpiJ1aaSC/xt259UY6ntbki7pZu65Biv68/mL80eIaxYL0LHW VR+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-153226-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l184-20020a6388c1000000b005f807292982si4604560pgd.888.2024.04.22.03.58.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 03:58:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153226-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-153226-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 56BD5B212D8 for ; Mon, 22 Apr 2024 10:46:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E757B146D45; Mon, 22 Apr 2024 10:44:52 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 908D31465B7; Mon, 22 Apr 2024 10:44:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713782692; cv=none; b=KPivesD5vnZACg3ieTzLakBnYUH5TP8YnccFhcUp5F/DBi6aDjFE7nlMqI1aUEbmPN/y2/vnHtOWYC4gCMWxJ1h2XIDn22eWeW4OyoZ5duSIAVOGq+NUnyQ6zVEmtQ6ZH6xDNJUThZUv96C/MEYjww5mrephMMm6A3cES3IbcsE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713782692; c=relaxed/simple; bh=LQOyJBwa32Rwknql+J5ecVpfiOY0Le5C4/h4EPSQHzA=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=b714lZSffL+77drz8cKvjG1Z2hb3chPbnqGyNvdJTE3d/7QQYdBQPHG8VLEYKHklqVC1Zl0UQObVCqbH4LbFgROxaQefwhGp02DbiTaCNyYc5FvnOpX/qPgSdfX1lJUBC+0NFUWy4McgVc0gejZKsGE+oAJ8nKhQOdiq+MrOGn4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VNMJn61WCz6JBSj; Mon, 22 Apr 2024 18:42:33 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 61C63140AB8; Mon, 22 Apr 2024 18:44:47 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Mon, 22 Apr 2024 11:44:46 +0100 Date: Mon, 22 Apr 2024 11:44:45 +0100 From: Jonathan Cameron To: Thomas Gleixner , Peter Zijlstra , , , , , , , , , Russell King , "Rafael J . Wysocki" , Miguel Luis , "James Morse" , Salil Mehta , Jean-Philippe Brucker , Catalin Marinas , Will Deacon , Mark Rutland , Lorenzo Pieralisi , CC: Ingo Molnar , Borislav Petkov , "Dave Hansen" , , Subject: Re: [PATCH v7 12/16] arm64: psci: Ignore DENIED CPUs Message-ID: <20240422114445.00003047@Huawei.com> In-Reply-To: <20240418135412.14730-13-Jonathan.Cameron@huawei.com> References: <20240418135412.14730-1-Jonathan.Cameron@huawei.com> <20240418135412.14730-13-Jonathan.Cameron@huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100006.china.huawei.com (7.191.160.224) To lhrpeml500005.china.huawei.com (7.191.163.240) On Thu, 18 Apr 2024 14:54:08 +0100 Jonathan Cameron wrote: > From: Jean-Philippe Brucker > > When a CPU is marked as disabled, but online capable in the MADT, PSCI > applies some firmware policy to control when it can be brought online. > PSCI returns DENIED to a CPU_ON request if this is not currently > permitted. The OS can learn the current policy from the _STA enabled bit. > > Handle the PSCI DENIED return code gracefully instead of printing an > error. > > See https://developer.arm.com/documentation/den0022/f/?lang=en page 58. > > Signed-off-by: Jean-Philippe Brucker > [ morse: Rewrote commit message ] > Signed-off-by: James Morse > Tested-by: Miguel Luis > Tested-by: Vishnu Pajjuri > Tested-by: Jianyong Wu > Reviewed-by: Jonathan Cameron > Signed-off-by: Russell King (Oracle) > Signed-off-by: Jonathan Cameron Focus until now as ACPI side of things (hopefully we are now close on that) but upshot is we failed to +CC some other relevant maintainers. +CC Mark and Lorenzo - Not 100% sure who is right person for this, but PSCI in general seems to be your problem. > --- > v7: No change > --- > arch/arm64/kernel/psci.c | 2 +- > arch/arm64/kernel/smp.c | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c > index 29a8e444db83..fabd732d0a2d 100644 > --- a/arch/arm64/kernel/psci.c > +++ b/arch/arm64/kernel/psci.c > @@ -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 != -EPERM) > pr_err("failed to boot CPU%d (%d)\n", cpu, err); > > return err; > diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c > index 4ced34f62dab..dc0e0b3ec2d4 100644 > --- a/arch/arm64/kernel/smp.c > +++ b/arch/arm64/kernel/smp.c > @@ -132,7 +132,8 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle) > /* Now bring the CPU into our world */ > ret = boot_secondary(cpu, idle); > if (ret) { > - pr_err("CPU%u: failed to boot: %d\n", cpu, ret); > + if (ret != -EPERM) > + pr_err("CPU%u: failed to boot: %d\n", cpu, ret); > return ret; > } >