From mboxrd@z Thu Jan 1 00:00:00 1970 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 2F76A14532B; 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=1714132144; cv=none; b=RyAYLfDufqam67XtQrZ8xuJbDp/6sMBFw1I7Lca1BhWXO6lWnZbirIUt1+ZKpvWzaq7WsazajXTBncoAT1DJ6bLvmtzGd8/L9wRWQeJPhWhC3l3i6sEly2QfPkFwDCRqEZ91PdzSmj36fnQ3BCRtgNinrp9j5k+h1lqRnXNN/P0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714132144; c=relaxed/simple; bh=vuIcmnGQq4w4qRhii36oQpxwxZeKTg+NU3UP9tdpmnQ=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BUpJEatkY61ZR52MLv9p+q6oNJbuO4x7WW0QLrBWXmhDExLFNrqra2Bbravji0LiRwhOzIMRe7dkAU0dNKguNYPYOyHUfi54HW2310A0PvZUizrwEBastQH/cglUedtQEtp1qdXy5SZGLi345aulnFLLiNSZ5na0GGua3Vr8c6k= 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: kvmarm@lists.linux.dev 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 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5DB6C04FFE for ; Fri, 26 Apr 2024 11:49:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3EJVlRdNoFBcguLzbanC8NVhqb6ErOoqiTJpva9m0ns=; b=QdcLXaFv8UIp7d W+li27pdT9381vVI953McKEoeXU6J24CdFaLV5fg8cMoVNYL2x2rTDXGxdqU3KxjwE007gl81z71A THgmjuCWdMeP78MATOUYFi7we/LH+Owxk8tpkYx0+fuOJmEFQV+T2AAoFPpZcWv+T+P6X77eLCqpv emEvj1nRnxtzRVjP2Lqc91LV8qII4Pazq1kitMy4hS2p9bFNxzi3p5BmVy2iGtbaymttoHA63Xd+y zAvIVrP+B1bvVLBIjxTfz/6O48h1jt8eKR8tyX9jymhtJJ9z81uAPiqIQUBwymYqTRoKGEOFLJR5L /MH7G1Rxy1E0kYScRf1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0K4k-0000000CNxC-3KxM; Fri, 26 Apr 2024 11:49:10 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s0K4h-0000000CNtt-0JBy for linux-arm-kernel@lists.infradead.org; Fri, 26 Apr 2024 11:49:09 +0000 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) MIME-Version: 1.0 X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100002.china.huawei.com (7.191.160.241) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240426_044907_292226_76FDB59B X-CRM114-Status: GOOD ( 15.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel