Received: by 2002:a05:7208:b08c:b0:82:bbfa:f723 with SMTP id c12csp375901rbb; Fri, 26 Apr 2024 06:53:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVaUMwRHz3MklHmNDFHgVWvYZ2DyCPfUG4D7R//N9jwpQ4nwHuFimr+PSDGl2hVpdl898n5S1zQV2RZp5R8mhvZdJitNOPCopCr9HeFwA== X-Google-Smtp-Source: AGHT+IFtuEIOZ/kFWB140tjf7I1qIm7errxXa/PEJe7ASGAiapyHUizu/x15z4QSTpK+Ojpgu0hF X-Received: by 2002:a05:6402:229a:b0:572:5f53:816f with SMTP id cw26-20020a056402229a00b005725f53816fmr485082edb.37.1714139593610; Fri, 26 Apr 2024 06:53:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714139593; cv=pass; d=google.com; s=arc-20160816; b=gQpHjAcrVA3YpgAc0gY1SDfjgWq9YD0fo9lhtEgpvf/1TQodThc0uTXMn2T9gv9OJT BQUmbZyAw6VDvebYlcYbWN7bDTXugqJJHodkFMTMDiWvZhIvFLs0Jon6xKPl+EICuXR8 K3FbFiP8W2W0lun1B6bdrhGMUBNmGnGTbft15eB7ckx4PlE2efGEZoNIv6ZLLVikgY54 aAc+DD2iEcB2yggDuXc1E3+ZRu6BOteq8Q9/1z74dsPdB9nGOWdjhcDy5LZYLdege30+ 1cuE4kZMeC69HEJBmZoRNMdpGnZBwdMwQFxazjFwF3HNPfDuGQq0aNclaShLNY6APRNZ PqLg== 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=72cuTI9GwKvphiBG5VLo7EkOqZpAVgfM56rR7w/R2e4=; fh=QfGN+Nlycv3VEqD8X65neWxvyXXboUCZUO7iSMK6eUk=; b=WZ3+GJeGfdQm3LU3RiBZlN2iiPu1kTTaj5RR9bWsBeP6G0DWSjGAGl2EHiDZj0dIYr wh8xMiwoJTDP8MyN7+QPp0V1CZLkC7970nUDPNfWyVUnv6f4xpZM3TgvMqGp8TEi9pmS TMSjRM3BewZlBTN9nQm7XOn6oH0f9dxsbOHu3w0F95V64qggt1jeSdtZYXX3sdvvKfVp MUAs1SgyFBq96E2YgkSlED70rBMFWx2TVGg0uU26usp4jF9TUJaINOh4OmvZwiVjuX11 wAS/S8z9H7SXIMdW2J1ZSr3MAXQimyBTePPNPLVqZmNkio/jRl/sHgO/yLnzcL5ZOnRG wS4Q==; 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-160091-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160091-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a66-20020a509ec8000000b00572550feb4dsi778681edf.15.2024.04.26.06.53.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 06:53:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160091-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; 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-160091-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160091-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 560601F2288B for ; Fri, 26 Apr 2024 13:53:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A1381487C3; Fri, 26 Apr 2024 13:53:03 +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 65AB0140389; Fri, 26 Apr 2024 13:53:00 +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=1714139582; cv=none; b=pw1xvfQyCVnyRiJDOzIQgxDWi3SL1deOTXlAJCkoCnC5j0hKY0QFjttUhaVvqB9WoV+zmaZEbzeVcnUJBH/9JOryGsXFkHM3rBFnP+2u7DeD1jGX7acsnM75F0UaYDy/qVKhkx2YggQu0AvWA24ExXLpAvavabTeoj8unpjdxK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714139582; c=relaxed/simple; bh=KRQx/jhSBpJ+0bXJyFoiwePzWCxc8iV5eQ951SofEq0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=vEF91wlA64l2JWJR+tfLVQmVBfTuKkytsfVB4n4nhp4fw3t++h7+NTp6QpTQIlyaLwk0FFfAAjz4DHUllfuU0HYIG4awxPU6V1lSZjZ1H3q6Ja1GW7uFgurh2LAEVDmIesG7cOpw40SAT4nKBgQ4nwRRG4bp0ZrrnwHgB+lXCEk= 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 4VQvLQ3b19z6DBLP; Fri, 26 Apr 2024 21:52:46 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 28136140C72; Fri, 26 Apr 2024 21:52:58 +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; Fri, 26 Apr 2024 14:52:57 +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 CC: Ingo Molnar , Borislav Petkov , Dave Hansen , , , , Lorenzo Pieralisi , Sudeep Holla Subject: [PATCH v8 03/16] ACPI: processor: Drop duplicated check on _STA (enabled + present) Date: Fri, 26 Apr 2024 14:51:13 +0100 Message-ID: <20240426135126.12802-4-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240426135126.12802-1-Jonathan.Cameron@huawei.com> References: <20240426135126.12802-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: lhrpeml500002.china.huawei.com (7.191.160.78) 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 --- V8: No change (tags added) --- 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