Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp638584lqb; Wed, 29 May 2024 06:37:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWbJS6BW9KwxF6e70yt8WpkE4d4y6Ae9BI0ZjQbNh5zSE6W7BKVZqSQ/JOIyfMCR8iFrWWuQjCkldomWY025Cj63xuV8TBdHNp3aA571A== X-Google-Smtp-Source: AGHT+IGPDSiAUMNChPS69X9dD9z5EwOqHtgqmna37yf87EZOOWWwK8QziqqB8XXeyhcrHTAfsN4f X-Received: by 2002:a17:902:f686:b0:1e2:45f3:2d57 with SMTP id d9443c01a7336-1f4e9c7dc04mr36000955ad.6.1716989821244; Wed, 29 May 2024 06:37:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716989821; cv=pass; d=google.com; s=arc-20160816; b=A8T1UB2Ln5+cqazmEHxkcqnY+GwjXCK4M5tFe0tbjlF1a1zL3a1RdvTZv7H39YCU+w XSd56H9eJ19hnthJ9R5xQi8LlFLTnpc4wRR434sS5y602KfI5ORx2aUpivwMMhnW1E60 u+abmY2UGCuOWCBo2Lje2cLvcInuunbIC+dlK89s4/tWRVYfdedR8sP/ji/o860HkLn3 6DbrvQKf3TTQm51JlmB2U05WJtaFfFfeCzYBB9WMVfcjeRplWS5zDcd+wsAnIJiZvZSO SjWqtTnQRwsFE3jfCeOJylTsF2JyGZXhZqGrseuyfoHQh7KFF/Zx2jDeWlywqrWVEvwv lnYg== 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=Tx1i6KyFczamF6+QBwuRX+0dPJD3a2kql0EmQMAdeCo=; fh=NxmCHexitX7P6x/7ARv3vZBmyAUGQGWkF2RSnxwWsIo=; b=YtCnpomXWzG6Io3NtENp7zKq2fwykKP01u+r3PMN/nnxqVljSRFGIzo8t0piifjN6t VWQcSvkpLhMpnos3eoA318by5/RL7L9EptLxYgiSpQlcwZtaxUgoIUcW7m8mjJ1DCiMG SjdYGJCRTMdxFc65XxiuHZ7nvLCBdlqHifZTSlg2Shp5oVbIXMMbujun+Sd0xGsooeEt EOh1kgr3T8Mm/CT6+iKwWPMzLYd2o7OIEw166CUVVvDh0lVcMv1h/kESE0oSRbPEHxkp W2UDlU/NIIAEjGqvaftSRl69oaMMbCJHeLOxHu6jgtvjG+qN4vs0Kc4mJM23n1FlaeyS VNWQ==; 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-194166-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194166-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c9705d6si97338525ad.260.2024.05.29.06.37.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 06:37:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194166-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; 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-194166-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194166-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 75C09287CDE for ; Wed, 29 May 2024 13:36:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42B3117C6C; Wed, 29 May 2024 13:36:24 +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 45E2117C67; Wed, 29 May 2024 13:36:22 +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=1716989783; cv=none; b=XUzPC7KbkbCyMA4hgT2eVbocRFc+Ut6uED4xNERiLwIXiasMCq3F2H1UtR2UHAialHnOf7BRfpAcURxvSN5ldQKYAfrzcEqT6i12MAsZNjVePpoo+rTIEOzRMSe1A2hmL4x3DokbjYk1/mlxDBKIFSfvhKeEDIrwm6agLsItD0s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716989783; c=relaxed/simple; bh=2Ggqc3GbFr0UdmL9qsSTWzCFvqSXoVOlbUJr61MIdCg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gqUzmjCBGz6sJvEo5NRR5R6DYPErJc/8b9icedLoZGc1s2mRP0HhUFcAwQpbLaoXj0G9bPChD9RZeFtPLI8uVEPzrsRJhCdnDGNgKv/2CedqYiS/WiHSxb43v9nZXxnb83LsyUxzcRWVJkgz/kthf5E05vFhHYtyFozMxaMjo/M= 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.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Vq9P327Mwz6K9F7; Wed, 29 May 2024 21:35:19 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id EC0AA140B33; Wed, 29 May 2024 21:36:19 +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.39; Wed, 29 May 2024 14:36:19 +0100 From: Jonathan Cameron To: Marc Zyngier , Will Deacon , Catalin Marinas , , , , , CC: Mark Rutland , Thomas Gleixner , Peter Zijlstra , , , Russell King , "Rafael J . Wysocki" , Miguel Luis , James Morse , Salil Mehta , Jean-Philippe Brucker , Hanjun Guo , Gavin Shan , Ingo Molnar , Borislav Petkov , Dave Hansen , , , Subject: [PATCH v10 03/19] ACPI: processor: Drop duplicated check on _STA (enabled + present) Date: Wed, 29 May 2024 14:34:30 +0100 Message-ID: <20240529133446.28446-4-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240529133446.28446-1-Jonathan.Cameron@huawei.com> References: <20240529133446.28446-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: lhrpeml100001.china.huawei.com (7.191.160.183) 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 --- 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