Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2084953lqa; Tue, 30 Apr 2024 07:49:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJd1sHEsoDwnAa+P7TpaKdXmGRCWepw/u9Ze8n8Puv3A8abj0+pY57umwU86SAyjoQSTlrNePJQwsleEEFG+c14vSM6KgJttQCyz6kIw== X-Google-Smtp-Source: AGHT+IGvW9DVKTuqoNyU44vFkx3hGJ9vXuVzmkRkKnFq3+VD1+OsEg6AsEWHkjYg1R7LLp3bQUf8 X-Received: by 2002:a17:903:98e:b0:1eb:704c:43b3 with SMTP id mb14-20020a170903098e00b001eb704c43b3mr12384984plb.24.1714488597034; Tue, 30 Apr 2024 07:49:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714488597; cv=pass; d=google.com; s=arc-20160816; b=uDJrYutMEDgyCAIDLL93/1HT9HmvHyY3Qj80yUPyVpBkvN5xF1T8PkgwUEqwoFieeQ SvhB3+WakCyVVAo46l5euH195FuR3PpsIx1Nte3tiOaeaRF6QLJ0WZN9Gup7b8o1fjox y7fuEgHWZoMe1cTqF9w7FtxUqU7gw0pb1hMn8PgYIcQXIpp2RAiB7LFAO11kUz4F8TxI uWSTmZV2BVdezA7NFJ4adm3fq5i2e/CTtgZ4f5qqMPvqlgdOnFsRGA9Kx0ykK5rLVdE8 KFXlT3T6j50AU03lPZWmTcxAJVm2y8QjyrPot9xGDorgWi6vTLlEzIRXbWvLYs84r2EN dfZw== 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:references:in-reply-to:message-id :date:subject:cc:to:from; bh=yKap8wQFtKoO0RWnNmMyyn1E7qgI0aVrxWG3yksQC+U=; fh=25IklNjpQtm3+ZI4w1ifckV22BkO2b6a/wyTwiBBJrk=; b=raSpYYMVwr6eK1fvb6+N+B6K7GL9dX+7MLAk9xm1veNLCJYXPTNVtE3xvxDaqnLMhU 3mR2kA3QPWK0bdX9RqYkxeRqGB2bz07zKyKmfch6hV+VPtmEKnWH2/oW3cwIOQkkcwF/ 09AN6eSbGrPO15HMRos3y66l051Cdcs77L6m5ov35uophWzjkGUl448pHt+Q2rl6ZspM zKh2C0FLr9HHYcAq/1F5TrF2aViT6mFMGd+t/ucZcfLAwmKGtZlA6k2fEueU5xWYLc2O ASo0bwPydiGebEbUnVGJu4PXUSHlbo87RiCjUoiNXTTHvxYeDjtSi6eCnu7yIp3Mb5pA BhBg==; 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-164136-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164136-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 i16-20020a17090332d000b001e2832e333dsi22857048plr.511.2024.04.30.07.49.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:49:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164136-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-164136-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164136-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 76ABBB259A9 for ; Tue, 30 Apr 2024 14:31:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4946817997D; Tue, 30 Apr 2024 14:26:12 +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 687CB1527A2; Tue, 30 Apr 2024 14:26:10 +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=1714487171; cv=none; b=HChPwYitJi80zuakRGoZQtXjfQam0jQuwRgqa6A/Cm+lUhqFvgyPMSzt7R1K8wfihjflpg8V421NjjKJqac7B5zONV/uzq8cavTOJjmp0xmojtlNqwL8LpnSt8/j+Pg+ddI2l9UwLKz48jHzEDv5h80i8HtMDG/jHeWcFG/IWwE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714487171; c=relaxed/simple; bh=V+CNc1FAdW4nKsZzbBKux8NdY7HWNHaXzUQO2l60D1g=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=mu5mw2YPjZHD5Tx2kR4UZ6vvrGytJYLhx6GBxxl8p7JtLOPRnC0QBYTqbDaV7CQr1swercT3lIkMyf/6iF+QXSRKLAoUd7E2RGEUZxaqyxefCUD78hbm12at15IVDkj9JP8dO9a73muCWE5wDzqwtjHKplGbF6LaFzuSokLj8iY= 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.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4VTMtk2zNHz6DB6r; Tue, 30 Apr 2024 22:25:50 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 76AEF1400DC; Tue, 30 Apr 2024 22:26:08 +0800 (CST) Received: from SecurePC-101-06.china.huawei.com (10.122.247.231) 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; Tue, 30 Apr 2024 15:26:07 +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 , Marc Zyngier , Hanjun Guo , Gavin Shan CC: Ingo Molnar , Borislav Petkov , Dave Hansen , , , Subject: [PATCH v9 03/19] ACPI: processor: Drop duplicated check on _STA (enabled + present) Date: Tue, 30 Apr 2024 15:24:18 +0100 Message-ID: <20240430142434.10471-4-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240430142434.10471-1-Jonathan.Cameron@huawei.com> References: <20240430142434.10471-1-Jonathan.Cameron@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: lhrpeml100003.china.huawei.com (7.191.160.210) To lhrpeml500005.china.huawei.com (7.191.163.240) The ACPI bus scan will only result in acpi_processor_add() being called if _STA has already been checked and the result is that the processor is enabled and present. Hence drop this additional check. Suggested-by: Rafael J. Wysocki Acked-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo Reviewed-by: Gavin Shan Tested-by: Miguel Luis Signed-off-by: Jonathan Cameron --- V9: No change --- drivers/acpi/acpi_processor.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index b2f0b6c19482..161c95c9d60a 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -186,17 +186,11 @@ static void __init acpi_pcc_cpufreq_init(void) {} #ifdef CONFIG_ACPI_HOTPLUG_CPU static int acpi_processor_hotadd_init(struct acpi_processor *pr) { - unsigned long long sta; - acpi_status status; int ret; if (invalid_phys_cpuid(pr->phys_id)) return -ENODEV; - status = acpi_evaluate_integer(pr->handle, "_STA", NULL, &sta); - if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT)) - return -ENODEV; - cpu_maps_update_begin(); cpus_write_lock(); -- 2.39.2