Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp212640lqf; Fri, 26 Apr 2024 04:49:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWHwfXYA5yt/gq30OqdLnzJnHrWTln8SmE6ubpFjFj8oRCemnjOhhj/L0T5uGKhoEY2c8D5Sc5I8WvvnFaY+Xu6hBiN+zVpaPuV0tL8Tg== X-Google-Smtp-Source: AGHT+IEju3HYC9aueY096lNAk2oSzUkHfF48OdNOtFUYTZI0q6x15NTl1hEvLMrtrkGhcDhc89F8 X-Received: by 2002:a05:6870:b682:b0:233:2f5f:9e1 with SMTP id cy2-20020a056870b68200b002332f5f09e1mr2435751oab.54.1714132159399; Fri, 26 Apr 2024 04:49:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714132159; cv=pass; d=google.com; s=arc-20160816; b=HXIiPjwf573aFw2jXCEpRg8x7riFdG1DN3gvr6+cBvRyjNSQ9EqtfEDFWKMiB7Y7X4 wkhPaQ4976QFFZOydnjcswrIHWKvV5N+TdoaxTnJrNcYdpV9l5vQKCocWy75idUvTDRK vaDYDH2Jw+ZL7wHXYgF5+YELuKbO59aYxDUmZlzQTPCEeMAfw/X5r8wg/ChH7h+Xk/G+ A9zK9ijDTVeBP8vKiQ8fudknY+jZtzByhMR+pGjTZIS4I0Mfhe7zmnDVVf51NVdT9E6K uKitS0NM2e98hmaBdiJr/w0SESxp5fQIo+YyQpujrhXob014OIKdsDQ7t4UZoO56BmiE hyFw== 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=3+2Sh9M53Y3YFO74YCpwtAOAY3L+dCFNsDJe0Htcaso=; fh=RQXTm33KvI+1lPyqaP6x9TeC0QZ/hNtrweTtJTWLLdM=; b=gNdsJJ/CLSKQsEs2v+QIP/32AxF3W4ui8kK12EoKRyeEXQrQzWthxCjBmPX80Okb64 YxZS8jNOOFBsG1kELTcpx93r442vTbCieDmr/fuJBt8usHrA5jiz/E6ZA4KRXAiWWsDr q28x7Yas5225GFzIp4DxHA5QJRxv0s1wLKC+eyCuY7cjY+M6NO5tcdYTEI82EqOZriD9 Z+vlfJ85KV1tRUpgazIXMz/+n9XvPs+vKABGmnIFM3yujyFl15TMRksMPV4ShlPCDG09 D0uVEQcSNbH0xXpis47N5n43dOBkD/mGFBTnLhUU4UkePVOvBZRlgBsoJK7o2p3xRiDx 6fMQ==; 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-159953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159953-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y1-20020a631801000000b005dbde0102b0si14840748pgl.288.2024.04.26.04.49.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 04:49:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; 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-159953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159953-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6AE58283658 for ; Fri, 26 Apr 2024 11:49:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 78F7E145B11; Fri, 26 Apr 2024 11:49:03 +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 2F7283A1B7; Fri, 26 Apr 2024 11:49:01 +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=1714132142; cv=none; b=MYH9GDeI2quZz8MQWm8AMg19p+qWDVs7UTU+sz18jv4DEH3g2LPAn781xy5onEpWwVgqEPquw2vVl9OixWrQBTU4Z7hmIZqbcnnSX/3SLx8gyGe9dyQ6n75MLSbl41ft6bIBp3s0ACI+aude7BoapszGoudBX/gxwzUyVYGRwhY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714132142; c=relaxed/simple; bh=vuIcmnGQq4w4qRhii36oQpxwxZeKTg+NU3UP9tdpmnQ=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=h0CLBWABBF+LonSITg0im/YxbcW6xqv//aok8O8i4miyzA7P//LhcuvK3LySuLwgZLRkzCjWHLJGRk3C9xA8LQlStUT7QUuGhSWiv6L66RkwbeCKyjXOpRTgjzmLjlg5/fAlnd/J3tkF+/Fcn/XNeJUpaRIt+0FB+wgPf83L7Gc= 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.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VQrbL5Lklz6DBjc; Fri, 26 Apr 2024 19:48:46 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 46E26140447; Fri, 26 Apr 2024 19:48:58 +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; Fri, 26 Apr 2024 12:48:57 +0100 Date: Fri, 26 Apr 2024 12:48:55 +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 , CC: Ingo Molnar , Borislav Petkov , "Dave Hansen" , , Subject: Re: [PATCH v7 08/16] ACPI: Add post_eject to struct acpi_scan_handler for cpu hotplug Message-ID: <20240426124836.00006cde@huawei.com> In-Reply-To: <20240418135412.14730-9-Jonathan.Cameron@huawei.com> References: <20240418135412.14730-1-Jonathan.Cameron@huawei.com> <20240418135412.14730-9-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: lhrpeml100002.china.huawei.com (7.191.160.241) To lhrpeml500005.china.huawei.com (7.191.163.240) On Thu, 18 Apr 2024 14:54:04 +0100 Jonathan Cameron wrote: > From: James Morse > > struct acpi_scan_handler has a detach callback that is used to remove > a driver when a bus is changed. When interacting with an eject-request, > the detach callback is called before _EJ0. > > This means the ACPI processor driver can't use _STA to determine if a > CPU has been made not-present, or some of the other _STA bits have been > changed. acpi_processor_remove() needs to know the value of _STA after > _EJ0 has been called. > > Add a post_eject callback to struct acpi_scan_handler. This is called > after acpi_scan_hot_remove() has successfully called _EJ0. Because > acpi_scan_check_and_detach() also clears the handler pointer, > it needs to be told if the caller will go on to call > acpi_bus_post_eject(), so that acpi_device_clear_enumerated() > and clearing the handler pointer can be deferred. > An extra flag is added to flags field introduced in the previous > patch to achieve this. > > Signed-off-by: James Morse > Reviewed-by: Joanthan Cameron Gavin's earlier review showed I can't type. Fixed up by dropping this RB seeing as I signed off anyway. > Reviewed-by: Gavin Shan > Tested-by: Miguel Luis > Tested-by: Vishnu Pajjuri > Tested-by: Jianyong Wu > Signed-off-by: Jonathan Cameron >