Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp711984lqb; Wed, 17 Apr 2024 08:40:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVH01tSO+J9+jG4xHFjZPsPxal8+itT+s1OZcAZDlnOtyeTz3PgeVnd4orQlMvXOQREy8o9KPw21dEC9WdU2NHJO5wneqgs+Ds3bSGclg== X-Google-Smtp-Source: AGHT+IH7XmJcHHrN5jr3ffKDMlqgU0F9hEk4Hh/jyEJZKM5lvgqg1aB8StkuQca6fOtkzt8KzsQa X-Received: by 2002:a05:6870:a916:b0:22e:b363:73dd with SMTP id eq22-20020a056870a91600b0022eb36373ddmr19313547oab.19.1713368437642; Wed, 17 Apr 2024 08:40:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713368437; cv=pass; d=google.com; s=arc-20160816; b=LleioZtyE0TbrJJguT1Z5X5+oXbmlNAwaZ0DkxEF0hGTFkCrooDnqMHWCXbwkfvhj8 yX1Ef0mVtEw6SDzYMIwA49gMDwCinN6s4WMoQYGlJk9A46tcC6K3DC6keL2p1mP5TxQF I8CyFhOUoOS068892gc0WiXMgNqDpZcVs8hhc5+gNpDEeGXmUz3bEZLEyTM6EdiYcYGe ODXaSKfgpP97/7wG74mYoVRuQ3L7Lvh4ozVJ4EOzBWVaubFEms5dnutLnTQ5t5Gx8uyW bV7Znh8XtGhjh9H84mAmda8HX++VhQloJeRs5YXB/QXE91DIK1RL5x2jVTGMHMnZg+kC NBjA== 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=wWw6YOi4TXqrG588yo0gfKybDaibtUkDnY+Wp5/7Q6w=; fh=raVXkpv41GKuJfobPM/EsdqWgAnM8RgwHspirpbY5wI=; b=vV87Va+QJdaaGyO7G89mbDRkNpczMU7gbD4eBVnZr7nFLpFZCMAEMImafzdPf+7FcE GlXsnvxqa9ufSB9fFf257jzBtE0DnXo7kwpmwsQE0+/mTf5W5DewAerNId0rJ+SzuBhq n1Ig/RC/VzqOebIQaLTT2Xh6pMUox+fHcj/rJ6JKB+YHenKy6hp/EqzUCq7CFHKrXLiJ 4vtGns4SK7q3QgKX0++qtHDRkO22SY79miGKkbsGeK6/QnxUune1XEUhHuoh3PqHgfn8 U6r43jhGnXxQKec93OI1+CDGs8L9Yf6pOT4a1oCZ1QP4gOasuidXzzy89XRlctWsUJNs OaQg==; 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-148781-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148781-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id y12-20020a634b0c000000b005dc6d15c299si11675382pga.240.2024.04.17.08.40.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 08:40:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148781-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; 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-148781-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148781-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 07478B23696 for ; Wed, 17 Apr 2024 15:19:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F07C147C8B; Wed, 17 Apr 2024 15:19:26 +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 42BB7147C68; Wed, 17 Apr 2024 15:19:23 +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=1713367165; cv=none; b=TltPlXpLOFJ/q6PIpzunIOhk0yhVLdXPLJVNUU8oqeu0y3Joika1q7IVeZO13kt6E3UwDWIQVLPRNbaXQsniZNDQOk5DDwCSx/PfxdClJUDuP3iWrZx0g5OCd9MzAbzKeJIq39LVJe4sy6yeC4DCqMkce3tM+dN4Q8DZFfb526U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713367165; c=relaxed/simple; bh=pSwnn1LkiCfiG0bDGosb0X47I9S4gmfe3u/wLjepEK8=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=X+sStYQA9KZJo79UAgNU8IzMKOpLwODjCYh9JKBUAbRx+3a7o3EKw4C/lry+ybYk/gHP6THF3+jvOwa0sJ2O5i5Q+zRQ2VOhlTCwpp2/zxCquGPPLu1bn4hFd/j47SHfqB0R2JaWnw6WW8fGioNKmCC5AUrgA2TsEmPIRxGDN70= 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 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) 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: lhrpeml100004.china.huawei.com (7.191.162.219) To lhrpeml500005.china.huawei.com (7.191.163.240) > > 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