Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1328086lqb; Thu, 18 Apr 2024 06:56:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVVJ0j5YA8RJqCssoIBi5xJqGZIboELzMGWz1c0t2bw/ePLv+2W5V7OjOgWX1UYc2WE61Ji+Ogj8d9ekdnmCbC12a4Vtk5wBpocfG/Ivg== X-Google-Smtp-Source: AGHT+IFfLoeJ460IObZiJVguq9rnV/6AYAHCjz7RhZ5ETaOdU25/GwSCrUOmU6OMxtCc7P/nbvFa X-Received: by 2002:a05:6a20:9f47:b0:1aa:8b4e:17e3 with SMTP id ml7-20020a056a209f4700b001aa8b4e17e3mr3208439pzb.56.1713448573122; Thu, 18 Apr 2024 06:56:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713448573; cv=pass; d=google.com; s=arc-20160816; b=p7i2uE0igirPIMP7Qk48x1JRrVHgX+/E3CI7k0GphDp2hzrZRqrXNcDQWczL1rPr3o 9THlgJdH31qrz2eY1dFRXclFYHDpa2aIF07M4wmxovR7+EdGIBF+2UME9Dc4PSTPs6qa j8TWokOkj0iSmw3shxegnSK3+FK1QGKh5VP23DdUwXMxA2wROrEmKyj0icSsg1F95rrx lCKfBoaVjyP0xot6NRvbvqY2YPIRPAZTD+WVaZQC52GcH8VcBjhb0r76bj0Z3o6Q1YTN IF7NQnICNrdxOmV4XB0UVGv8mSKTwCwmmIXTqNE0kbCf5pyGNqzl7g8vk/Hflq5Ispmr yk+g== 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=9hnyJdfM4pL4LmrmWCvRXHlowwm2YPQTajy+APiUrP8=; fh=wmH6eZgtoFCyes/zVTYi+VaxxdPmNW9hqdNd8ZTZ4XU=; b=XMlxlRy0F+BqvmYeq7rBrk0Bm3qydBykNjCULbTe90++0mf/dO6tYJ/49qntBv7q9+ txBo+8js8NMF5Oy7xNTkcXmqOdPhD4XY/1+6AnDaV0j0ZKvWVkupDxS283ImMQu1jbRv iV+JpU41FIlX2Q/0Zvs4wct9M+h3rdhJ6XnRVfEIaU7SLxb5JbrfgS7rEDTK1HgW/7Cu frg/dAUASxiiYUBA72YijUDnlWAdgLtacl+zYPO3kUJRC4/7Ji41b3Un0bU3wyGXZx0J 30gQXqkwy6yP+3+Lr8luO/NwB4LZ8barorTBZlKjAaYhEwNGphW90sFNbPcYVZNnqan9 HVnA==; 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-150215-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150215-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 fj26-20020a056a003a1a00b006eb3b8c8fcasi1542740pfb.342.2024.04.18.06.56.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 06:56:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150215-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-150215-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150215-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 B69E72862C7 for ; Thu, 18 Apr 2024 13:56:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2A38165FB1; Thu, 18 Apr 2024 13:55:50 +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 43D9316133C; Thu, 18 Apr 2024 13:55:48 +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=1713448550; cv=none; b=eL20220vpHrDa9wuowXhc3g1Y0Nvh7WDPAUpNudL9yz0AVEgouXAI8gpyUT/WDMAPAGKmVYylmSa6z8Lytv20vvPUrHTNDgnKd37uAyxSJQrXkXXXPgum04xxQirnsiuOqt6GiMkufc22VHcuqvllomLwb11HFKavp/1YjYrsTQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713448550; c=relaxed/simple; bh=gyNFptB6Y3Qour6RrRLA3wJw/nrlgnS1Xva7X2273JM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=r2TmiMQHA+Idv5pBCjxOWQBBLdwHv3ANFBKtCtePKL+3ND099t4tunL5RHWXZCFGSectsr8EgwKcnvJOxH51Y2lphrZU8ETKKGZBGWeEfzHB+QSfcviVPKl/LS0yhYWAqsOTvM3dmcgT5VgnTAQpfT8BZZ0MmgYEkeitbu0DMu0= 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 4VKzlB5l9Lz6K5xW; Thu, 18 Apr 2024 21:53:42 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 294431400CD; Thu, 18 Apr 2024 21:55:46 +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; Thu, 18 Apr 2024 14:55:45 +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 CC: Ingo Molnar , Borislav Petkov , Dave Hansen , , , Subject: [PATCH v7 03/16] ACPI: processor: Drop duplicated check on _STA (enabled + present) Date: Thu, 18 Apr 2024 14:53:59 +0100 Message-ID: <20240418135412.14730-4-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240418135412.14730-1-Jonathan.Cameron@huawei.com> References: <20240418135412.14730-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: lhrpeml100002.china.huawei.com (7.191.160.241) 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 Signed-off-by: Jonathan Cameron --- v7: No change v6: New patch to drop this unnecessary code. Now I think we only need to explicitly read STA to print a warning in the ARM64 arch_unregister_cpu() path where we want to know if the present bit has been unset as well. --- 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 7fc924aeeed0..ba0a6f0ac841 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