Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6788060rdb; Fri, 15 Dec 2023 08:18:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJ8NT5Im/qACF7aSD7MD+n9oSkWezwYAJhuYnbYEdnTbYUr0c1NqhpWOYf9QvLqe/fwOHW X-Received: by 2002:a50:aa9b:0:b0:552:8b91:811 with SMTP id q27-20020a50aa9b000000b005528b910811mr1180146edc.3.1702657101038; Fri, 15 Dec 2023 08:18:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702657101; cv=none; d=google.com; s=arc-20160816; b=HRJHWJLTgh1zK5zBKXNVtR0MNHT+q4ACwxisoTNEgfLpwX/hKKVr2i5CvJcD3OxVC6 zUIG26EZrrKpIqQ7Oy1zKCpLPLP0lX4xY1fmbUxRKPQGcsKvGOU71jr0Q5ZRFp8ykOtI wYHZZET3LuFG4DMHJNSpiPhs9tEBffBmd4vzbfAhgIEAiMc/ktH5pZQg+cVsfkBQh46I 0MtGyfaICWYk11eFBV432lu7zdDGmOzXBJ4CX1Bkn/AcgumGo/D/gFPh0gRiJxaZ0xl3 pHUBnDTYdhIERHZmlkuF1QRNwrAwxWri9x3ccm42qP0LxzPy/DmzCjXW2pWQC80evyfN +95w== ARC-Message-Signature: i=1; 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=Ab6YkPLXecRijZcqVsnfx8kndgyOAa7KoNj/RUySAsY=; fh=4iHbZ733mqZc4Bx83AV0konbWC9aXbRvmPAEmCiuGYk=; b=E4hmpc0OT3SU8iZc2gqGgThakImOEv9xilZ/HDrzOJ3K1rkCHOBm5SE1yQe04qFIiI DiiXnCl+2jgHAjUVvkTz6kZR69msjXObmSDaVQbkjgBT2TfHg/eSuNyMKOWShPz/xbvY wOX2Nsyhyd0qMh9oy30KdKGtqCzXwQCQb/dgN0Hq1iv0KgxeksjBo7Am75bu7shslI3f Clnl9UfNKItvoEqH1aV0ZCoHcqa8Uw1lrJ0UvWS1MICIICUuwbvYWZI0oj1NksTyPP2m gcHRWCAzBIhf3PxrlAlCZuD1w71TNH+YJaeg5UzkzBZlxUTq7kjUZk8FMxCkhrTNTyDy QboQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1279-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1279-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dd6-20020a056402312600b00552d903197bsi481681edb.452.2023.12.15.08.18.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 08:18:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1279-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1279-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1279-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C6AF71F25166 for ; Fri, 15 Dec 2023 16:18:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CFBF3C460; Fri, 15 Dec 2023 16:18:09 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org 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 9E50C3DB84; Fri, 15 Dec 2023 16:18:07 +0000 (UTC) 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.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4SsDrC5nzSz6JB0q; Sat, 16 Dec 2023 00:16:59 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 7FBAC140133; Sat, 16 Dec 2023 00:18:05 +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_128_GCM_SHA256) id 15.1.2507.35; Fri, 15 Dec 2023 16:18:04 +0000 Date: Fri, 15 Dec 2023 16:18:03 +0000 From: Jonathan Cameron To: "Russell King (Oracle)" CC: , , , , , , , , , , , , , , Salil Mehta , Jean-Philippe Brucker , , , James Morse Subject: Re: [PATCH RFC v3 10/21] ACPI: Check _STA present bit before making CPUs not present Message-ID: <20231215161803.00002d8c@Huawei.com> In-Reply-To: References: 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: lhrpeml500003.china.huawei.com (7.191.162.67) To lhrpeml500005.china.huawei.com (7.191.163.240) On Wed, 13 Dec 2023 12:50:02 +0000 Russell King (Oracle) wrote: > From: James Morse > > When called acpi_processor_post_eject() unconditionally make a CPU > not-present and unregisters it. > > To add support for AML events where the CPU has become disabled, but > remains present, the _STA method should be checked before calling > acpi_processor_remove(). > > Rename acpi_processor_post_eject() acpi_processor_remove_possible(), and > check the _STA before calling. > > Adding the function prototype for arch_unregister_cpu() allows the > preprocessor guards to be removed. > > After this change CPUs will remain registered and visible to > user-space as offline if buggy firmware triggers an eject-request, > but doesn't clear the corresponding _STA bits after _EJ0 has been > called. > > Signed-off-by: James Morse > Tested-by: Miguel Luis > Tested-by: Vishnu Pajjuri > Tested-by: Jianyong Wu LGTM Reviewed-by: Jonathan Cameron