Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1785154lqa; Mon, 29 Apr 2024 21:29:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVIQL+vUtG76QaN2SsTywgkQqxw4inNMyjFWx3Mmvtgn43iwAqSl+bt5Ua4bOJPiFzXyFoqjzSDhKp3NZD7LcC51lWLyvOktCGFHXFlPg== X-Google-Smtp-Source: AGHT+IEBuB2BsPz44heupdC9pYp9K7VMZOQ4ZschYn0zydTz1osHwzQ7m/ZnKEawpFRfUJJBNbfZ X-Received: by 2002:ad4:4b28:0:b0:6a0:acf9:5dcc with SMTP id s8-20020ad44b28000000b006a0acf95dccmr9385225qvw.41.1714451379533; Mon, 29 Apr 2024 21:29:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714451379; cv=pass; d=google.com; s=arc-20160816; b=h8WlO8h5UDJ0V6qX5cE2tNYfQC94UMfvi4iu5DpdVR4fq55cmIeQ3lmrNHbNn6xBoJ dam07EKm8pecFQiXSdJ5iRJQxJhSKwhvpD4wd+Z3DZezuSCpAZ9DH9np2ahC6slA8b+m IQrvMeDut8YVgB3xcqjWqCRX8SCxxFQ44muSBSA5Cvq3kkVSLOKnjNGLwNV4GULfnR0d iVV+phzsR3fISz8mwrq+wNSauCSDpMcpUrTJfkc7GSxjmfIm/BNki4RE/Ra7c6LUEdsd PFbTFHZ48rlkn7o8SAN4JPt61IGih7EE3XanaqW51diMNv0MLZfgCQcp4+ilvZvrGUsy /Eog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=D1/gI69YXA+wRBrAlMSJILQJim8W89y0vmUYfYeJ+kM=; fh=V8KW/VNQaAQpIDb/MLsOLqLsO1245KgeyLRfacSxS1g=; b=jIRLx4ovgHmRzJkWtKh1Hkbw7XedhNXmqxnT5vOt7q0WakEsP94ZdGcdGhU8sLssGv 7S4ZgiX8af+1vG9HsF+QHBSNYMJz8Lzh/Hz9AiVPSpnMrtG4oWrWEN19io3j8z3AKDHe eWspUnYYN/6UQiXS3n/F1nFcoPV49WT+ABj5ZhUsH0quRYtW5r8Y79VeqtqlFzvYX0k9 TROKMJKP402ePg3Wylzq6nIOnaKXeebRqoSH5Tib/dgfAiGIbVEBxkkTR4nFobMx6GSW fpfBrO7mBz/wPLtDC/cC1WlHKPFIUkWwG3modby1TCfOykykcJ4P+yhPecWGKZ4SC/7V 34aQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fbEt3Zv+; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-163323-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gs14-20020a056214226e00b0069b10ddc5d6si28267614qvb.94.2024.04.29.21.29.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 21:29:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163323-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fbEt3Zv+; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-163323-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 201A61C2191D for ; Tue, 30 Apr 2024 04:29:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AF2114AA9; Tue, 30 Apr 2024 04:29:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fbEt3Zv+" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 4637312E47 for ; Tue, 30 Apr 2024 04:29:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714451368; cv=none; b=c7Eyu4BV6zyxMU1VN4LvqKAtKBx6nN56gAPiJNHBy7p6MawcFe7hemkVraiaRG+8Sgrtl6eiTLAeAvivtBV/OCe916QmlXgyN1aIw+HRw7muoBSVuI2d330w4rhiGhXSbG9gVmO+wBL23nzsaQ7JQ/0w59mnlOaxBY1OIhUxsi4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714451368; c=relaxed/simple; bh=FEm1/PB329Jyi/kHvt9MX59QyNkI8IQyV5tTODOIcw4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nFqjbm1VXh7Vg/0Rk0GijDoXzaVry+69DLjqxeZDSMSTT7EyTicRdql2cPhsZvx8HyNah2R9oHs/SJZ4lWFApXVJSByZQ6dGQqQlCX+MCKhj+VSvkJOlph1lzqu8TwUxtyUHYq6dsZV9KTGlgW7lTEDvbShm4PcJtnC5EQURtXI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=fbEt3Zv+; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714451366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D1/gI69YXA+wRBrAlMSJILQJim8W89y0vmUYfYeJ+kM=; b=fbEt3Zv+ZavkHi7hEwx7lr/jbTd0F+cUZZ88CYGtT7Z/BE1khLhcaaeRLlUzJ4CXV4zJ0T Q94Y7kdZZXyHyAC3jZv8hr8R9Jqgb/RKcd8TKDCl8/uz0zUxNLybHXnRUekOF3rNZJcs0A m5hGsFX8mA/o0bONXeA3vHc3kAXJ48M= Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-27-MpOwoaxuNmOMsNajK3NXYA-1; Tue, 30 Apr 2024 00:29:24 -0400 X-MC-Unique: MpOwoaxuNmOMsNajK3NXYA-1 Received: by mail-oi1-f198.google.com with SMTP id 5614622812f47-3c7171db6ccso6106308b6e.2 for ; Mon, 29 Apr 2024 21:29:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714451363; x=1715056163; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=D1/gI69YXA+wRBrAlMSJILQJim8W89y0vmUYfYeJ+kM=; b=rYlh1vklieI0MwIZN/YS2lTh6/7YOfxTndYw2va3HquoIoh5yxl3gpt/8YcU0r6SZl YG9lgO9Lj8PDhl3xLCEpqNHVj1GwpergWMS8aD6zRaT9DIA3BFTdieC+yiu2NXMT0+a2 T6B625XOuFaU3S5aY90LMGiY6xmnhe9bZm0Zz9lKh82HwDVSJwOqxM3Q/3MYEYpt9PSq 3pcJ71MaiAhEvrOvsCVVeTHsZmLaO6OZGrkVaBD7EOQ2vE8xK2zRdQbC1pjOeCgFBF5b SANh0OkWZbLQne1CFClAFzr5kxLbCva+DFBqIGjP0ymnvEV0+K2esDTCnX+qq/B0lu+/ zo9w== X-Forwarded-Encrypted: i=1; AJvYcCVD3zs0jbI6NfzasYLO+F4w5noAggDoNNT6PqpKTSeYo/vdCihbQgvjgINYkmxtIqlIuECkm7hlfzxVMNGUJdes5b6CzlLqYLIfkzuX X-Gm-Message-State: AOJu0YzU88sN1qfPEIQc1auejMZEeAp/g7tfCR4fUAOudrmRW8nUsk7p x9ySP7qOlt2CuJp1fvx6xCzb/MX68Ev7v4WWT9I2ZzeeZKXFa1/K6pSTC1VwV5O3xR3mO99qEYI p26W4Oi9XpVE/0aaWz0ZrSvZe6H6pYApR2SrEI5Km5QFvV17rIxSXXoYFtBsSUw== X-Received: by 2002:a05:6808:1b21:b0:3c8:42f1:40b2 with SMTP id bx33-20020a0568081b2100b003c842f140b2mr14918945oib.9.1714451363403; Mon, 29 Apr 2024 21:29:23 -0700 (PDT) X-Received: by 2002:a05:6808:1b21:b0:3c8:42f1:40b2 with SMTP id bx33-20020a0568081b2100b003c842f140b2mr14918939oib.9.1714451363109; Mon, 29 Apr 2024 21:29:23 -0700 (PDT) Received: from [192.168.68.50] ([43.252.112.88]) by smtp.gmail.com with ESMTPSA id b16-20020a63d810000000b005e438fe702dsm19772604pgh.65.2024.04.29.21.29.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Apr 2024 21:29:22 -0700 (PDT) Message-ID: Date: Tue, 30 Apr 2024 14:29:11 +1000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 12/16] arm64: psci: Ignore DENIED CPUs Content-Language: en-US To: Jonathan Cameron , Thomas Gleixner , Peter Zijlstra , 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, kvmarm@lists.linux.dev, x86@kernel.org, Russell King , "Rafael J . Wysocki" , Miguel Luis , James Morse , Salil Mehta , Jean-Philippe Brucker , Catalin Marinas , Will Deacon , Marc Zyngier , Hanjun Guo Cc: Ingo Molnar , Borislav Petkov , Dave Hansen , linuxarm@huawei.com, justin.he@arm.com, jianyong.wu@arm.com, Lorenzo Pieralisi , Sudeep Holla References: <20240426135126.12802-1-Jonathan.Cameron@huawei.com> <20240426135126.12802-13-Jonathan.Cameron@huawei.com> From: Gavin Shan In-Reply-To: <20240426135126.12802-13-Jonathan.Cameron@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/26/24 23:51, 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. > > Note the alternatives to the PSCI cpu_boot() callback do not > return -EPERM so the change in smp.c has no affect. > > 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 > --- > v8: Note in commit message that the -EPERM guard on the error print > only affects PSCI as other options never use this error code. > Should they do so in future, that may well indicate that they > now support similar refusal to boot. > --- > arch/arm64/kernel/psci.c | 2 +- > arch/arm64/kernel/smp.c | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > Thanks for the check and clarification that -EPERM is only sensible to PSCI. With the clarification: Reviewed-by: Gavin Shan Thanks, Gavin