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 A8A31C4345F for ; Wed, 17 Apr 2024 15:19:41 +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=cAG9uNYy5Xx8eFHzD0UBOwQvTuo8xej2sa2eaDVoBLo=; b=M/x9i6zJ901o50 H0GtddPv5qT+UGRlEggfL3dCBt8FxNfr1XnsbIlkDFxwDRSkmBch19b9UQM5COmB0zZcC+KbL2g9V pek23OjxaHKCPVQ9XkjoTtY0Urk4I6GTbz8FCZ52hnmS63g30SvMY3wklW1DvxRn7Os1DKqtndmgn 1FCVogqeLiLp+UAKc3jhgg3IEOgOL+NhJC5D2qQMeNcySgdFjN3+QKceiR/NqqIpHIxIU2VNWHMaH ELH3Mtl0kdrWkKHshv2HVOqx+m245IOAQofVLHqr+ueuTxeyA00KUXUo6+MT8cNi25vHEm86YU1JO asYRNb+3XsUo1y/X5KnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx74M-0000000GYDx-0Pvt; Wed, 17 Apr 2024 15:19:30 +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 1rx74J-0000000GYCF-0mao for linux-arm-kernel@lists.infradead.org; Wed, 17 Apr 2024 15:19:28 +0000 Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VKPZl2tRFz6D92K; Wed, 17 Apr 2024 23:14:23 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 2695E140A46; Wed, 17 Apr 2024 23:19:21 +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; Wed, 17 Apr 2024 16:19:20 +0100 Date: Wed, 17 Apr 2024 16:19:19 +0100 From: Jonathan Cameron To: Salil Mehta CC: 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 , Jean-Philippe Brucker , Catalin Marinas , Will Deacon , Ingo Molnar , Borislav Petkov , Dave Hansen , Linuxarm , "justin.he@arm.com" , "jianyong.wu@arm.com" Subject: Re: [PATCH v6 04/16] ACPI: processor: Move checks and availability of acpi_processor earlier Message-ID: <20240417161919.000070b4@Huawei.com> In-Reply-To: <32aaee486f984859af713138e460075f@huawei.com> References: <20240417131909.7925-1-Jonathan.Cameron@huawei.com> <20240417131909.7925-5-Jonathan.Cameron@huawei.com> <32aaee486f984859af713138e460075f@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: lhrpeml100004.china.huawei.com (7.191.162.219) 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-20240417_081927_412598_C23BD81F X-CRM114-Status: UNSURE ( 9.92 ) X-CRM114-Notice: Please train this message. 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 > > result = -ENODEV; > > @@ -469,15 +483,16 @@ static void acpi_processor_remove(struct > > acpi_device *device) > > device_release_driver(pr->dev); > > acpi_unbind_one(pr->dev); > > > > - /* Clean up. */ > > - per_cpu(processor_device_array, pr->id) = NULL; > > - per_cpu(processors, pr->id) = NULL; > > - > > cpu_maps_update_begin(); > > cpus_write_lock(); > > > > /* Remove the CPU. */ > > arch_unregister_cpu(pr->id); > > + > > + /* Clean up. */ > > + per_cpu(processor_device_array, pr->id) = NULL; > > + per_cpu(processors, pr->id) = NULL; > > + > > > Shouldn't above change come after acpi_unmap_cpu() i.e. after next line? > > > > acpi_unmap_cpu(pr->id); Agreed - that is more logically correct. I'll move it for v7. Thanks, Jonathan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel