Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2893577lqt; Tue, 23 Apr 2024 05:09:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVRqJGiogd0SlYZSAFMjBNi86PGTMt8Mh7eMIdKNE9HDmXLJUy9dGzWgNApHN44ub2lc58xX6VMAFRGLuWtMPAgPrjg9wA2ltFV/d9Nww== X-Google-Smtp-Source: AGHT+IHN0LyPwgD1VDS2WfaYoNs5+nfaH9QluPvAsYPPSPFcI/NMVQKLWcW+TvqzjvimhpFNEWf5 X-Received: by 2002:a17:906:3846:b0:a52:1086:5c7e with SMTP id w6-20020a170906384600b00a5210865c7emr2577567ejc.24.1713874158696; Tue, 23 Apr 2024 05:09:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713874158; cv=pass; d=google.com; s=arc-20160816; b=M96jB9LgX6vVf8FGDjjPxG7d5ZPor4g+CN2u5PPlpLKT58DhAwX5/X3Z1jo8Qhd1x2 dCya74VP0UUmaTS4xDDR+Id8npkRSHVvCtHDFHQefKEzE8D9ATRiFBkrTxkuuIaSrBtT 1RUaUxHu7mLdn98VS4r7mPcoOIY18WoMMM1BCW8PcJb6mQ07laswEHj9lAN//PtzRoGf q6HOpcDQu2FncnExDrneI/PedeDARnqXLSQ4sKeLQ0GCl0yTZX5h0KQ2Zs02SemI17vK cFko+6YPmQ4JTReV+898ZmGyhTwKr2f684H4+QG/AOXLl78iSLWCqlrfVnq619IZ18/l 5vDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:from:references:cc:to:subject; bh=RWGeCucmpXFTu4d5zaSDsKG0fh5zU/0tzkA04zhK1+4=; fh=S7HzysLzJEf2t9xHfpKwrx1jR0+E6OoCAaKUKAWYRPs=; b=Oep4EBcha5iS1j8WwVQcpcoyDaxsKN3TVLWGIkn03h+IoeXZo6k11oihnG7v1a7ml8 vucNRLv17vET79ly1UvdJKs0BsjUshTVMksLcidrNvFtOhtuhG17MWuuhAaqslu6Rw0y G8jJrrqwK0B+HXxad6PSGydt/xoMAbRD+Sqeu/MGP6AkExbDIKP8uhAN+IMru0ZdwiiG 5DmybZr/0w/SFW2MqKLSXaSnVwwmDB63ZAmxE9hNjF/hcbLUz3a8A6hrZWZi5sNLhEQ8 445/Cfc3GsiUMTy4pBRp52x8GODDLuX47alH0b4Pwn/ed7I/KT+bjVz8JXIJzu8RACbw hUNQ==; 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-155126-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155126-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gt6-20020a1709072d8600b00a46b41d7f6asi7237560ejc.1055.2024.04.23.05.09.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 05:09:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155126-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-155126-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155126-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 6DC391F21BB8 for ; Tue, 23 Apr 2024 12:09:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61FBA12E1C8; Tue, 23 Apr 2024 12:06:56 +0000 (UTC) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) (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 E662584A44; Tue, 23 Apr 2024 12:06:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.255 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713874015; cv=none; b=CuZhfU69cYqGSbbQKvlvl+T+skzU2HtS+ZvxwmlHMbkd7fmiYosmFR5CSl9A0wZ7i9QXGo36BzuK8rE3FPEDNwXYzZR6G3Pa+7Wqo0rBN+qTPDuuOgjmuAfu2HgEsROJF9KNceyDy8wmJIZL6rPm8gcVNmMXjHl4db9nuOAwv4s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713874015; c=relaxed/simple; bh=WlZYqWhdAH7netYQkFAGYZjAaa89jWNhRzERNv5h2Kk=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=ixEfHzr9ZYPGoDSDPHbyt4XHoU43FiAUjZk2C2OWEIzTO7HpFzvRRWvVqPXXOiYQntBMTUzWo1r1IkiHFRxzUU4mZN4XjRexwwmfQ5VAPtHQFqrVg8rpWMKLK6wS2OGI6qycxfLo/q2NdlDlC8JstJgBHdwe2m4eM+gDtt2RM+U= 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=45.249.212.255 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.19.163.252]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4VP1460Qk8z1R9LL; Tue, 23 Apr 2024 20:03:50 +0800 (CST) Received: from dggpemm500002.china.huawei.com (unknown [7.185.36.229]) by mail.maildlp.com (Postfix) with ESMTPS id 4D77118007D; Tue, 23 Apr 2024 20:06:50 +0800 (CST) Received: from [10.174.178.247] (10.174.178.247) by dggpemm500002.china.huawei.com (7.185.36.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 23 Apr 2024 20:06:49 +0800 Subject: Re: [PATCH v7 08/16] ACPI: Add post_eject to struct acpi_scan_handler for cpu hotplug To: Jonathan Cameron , 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 , , , References: <20240418135412.14730-1-Jonathan.Cameron@huawei.com> <20240418135412.14730-9-Jonathan.Cameron@huawei.com> From: Hanjun Guo Message-ID: Date: Tue, 23 Apr 2024 20:06:48 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240418135412.14730-9-Jonathan.Cameron@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm500002.china.huawei.com (7.185.36.229) On 2024/4/18 21:54, 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 > Reviewed-by: Gavin Shan > Tested-by: Miguel Luis > Tested-by: Vishnu Pajjuri > Tested-by: Jianyong Wu > Signed-off-by: Jonathan Cameron Reviewed-by: Hanjun Guo