Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2479089lqt; Mon, 22 Apr 2024 11:51:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMBjRT2Pdureyc3Vg6Th6wuzWL0DWM1Bw/0YlCWwsBd6TQqVUOmUPRMxpH2N7g1PPSBJuhHIixCdnqwvUcMWS8PPy3YM30a+B5dngk4Q== X-Google-Smtp-Source: AGHT+IEc+NFfYjc9azXC7HUQmPWl72fkgGv9UhxRBqGV9+2BOOnOwDHdSzW20kFfYCL3YgwHquo4 X-Received: by 2002:a05:6214:14a7:b0:6a0:764a:8d82 with SMTP id bo7-20020a05621414a700b006a0764a8d82mr6444761qvb.5.1713811867671; Mon, 22 Apr 2024 11:51:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713811867; cv=pass; d=google.com; s=arc-20160816; b=wPFlwrEpYPDFiVzxkGr2n6vod9H1Yx0JkwlHXihzX6Nc4VUfS+9LoZ1es5KL4R1r1y 9OBP5Mm06Lg0XqkiR3dLmtWMXg7x3o/TMbFJncc+VUTBSBznNCNujF/kbz//Fu46U2gX qXmcpWpf2NJbNnwsaD6o6mK31pcVh+YPW7Iub2lF35YDLLP4O3AXRANVR6se5Dbo5sm8 t6etckuBC7GpYHtE+lkT0eqeb3mZ7bQFGIj//Cga90iBDMkuzgbbpGF+lpe2Ph/E/xJK xcADRoEOr3YzcbPx5U8OfSUSyBmwIHobXtKIu5Y3MtD+ad4NNcbNYsWWjRB0WDu/9kzL wKkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=yX52J99rtea2R6N6uDyx+wSzTnFh35N6KMPm26m0svs=; fh=FIwL3iPcwUxwCyrdKPdnGkdir4W27av6DrrFhYxtdoU=; b=PKMLOSfggf4Viu5amBdSlRdjMrxOJvMYep+F774bB1OEN15u1VWlxtwnoclZlPJZNV VIEh5u0GJ+ntAoYbjT9kMrBHcbaTR/++PQRl03a6FEAKwInsv1uwIUAFh9Ed/UM+41Zu YTL4/6RWuR4r4eWVaUbpig6BW9Cx4mJjrSCL82Ai2rIFHzT9wYMWE0vMCOrXptSRaeWf vRNqwulqOqK25oftjmv2nAFgHul7sRqfZzouubhyoDHwsqSrJdBmCYY2DYsUxhPJw9KA 8Kwa5ILwf16mPCU3bnM6ijlV0AofDr+LW8WYKI9zWn+tCKZgHr8CZpqa88BhOvoezM2j pASA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pzVBCQSx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-153873-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153873-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r12-20020a056214212c00b0069b51882422si10966314qvc.525.2024.04.22.11.51.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 11:51:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153873-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pzVBCQSx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-153873-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153873-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4B6921C210D2 for ; Mon, 22 Apr 2024 18:51:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D51E3155347; Mon, 22 Apr 2024 18:48:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pzVBCQSx" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E9579154C16; Mon, 22 Apr 2024 18:48:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713811693; cv=none; b=PPBZWWz4lIhPyAuWb4oVI/ysOZx9zcCBafCB9t2aSXwYddFVUQUNWWhVuhMRb+ob9IyF1CLuryZ4xfB1BKQ7k5lWaXV8LhVf/2RYKZN3EVEO+Ik7x3CnmC+7WZvMgsJQBCM36yoEnInBVf/Ylz3E5q/N/w01jWYRPSm6gCxsBl8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713811693; c=relaxed/simple; bh=rpA6N07dzG+TJH3XYFQyU87OVzoWXjM0LCk9vtM3N3Y=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=j6UsD61ggpjKgC0P6pKW9NGoWZc5LB18zyCxAZZHD+Add1Q2YOFCiQOAh5YdZ+66NxrZ+YrGzxjLlNT+/dmeoWHHsfFgn3b/H4HvnM0XpBi7M/P5ItxBWJmB8ngMAlMYdDjdskWVrA9w1onQ1ioPASns1NC9Zlg8DKzJ9FhSA4I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pzVBCQSx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8024C4AF0F; Mon, 22 Apr 2024 18:48:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713811692; bh=rpA6N07dzG+TJH3XYFQyU87OVzoWXjM0LCk9vtM3N3Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pzVBCQSxqnWh4x3MbkKicc4qA/nAbOE4JvvaoaeC+gJbzKr+ktYIyDQ3uXHJWvEr6 pWdbfWZDMnNIlq+UmU4CyvxIml1OXPHnHfKca0OKLH8APjPJUWQBvPYts84peEjUWK qSUq+eRgJNMTFL3X7cF+ewXLP7ozXO2VNYVBPjVUHrLJpNOCvG3rDTwcNtmAtPCI7B roCCL51+T9+fAp/A4jkX8IlqYFr7uF34oE2O/EatP32GpuOF5yT1f6HbMSBJpb/LSH eJ5L0t3HaLJ7/Ik5iCLUxKMnFVkOvlSioYxvOHTkfdOAaY0iyvXv9n4RVNZYabHFCN rmHxZ9SI8GusQ== Received: by mail-oo1-f54.google.com with SMTP id 006d021491bc7-5acdbfa7a45so1536090eaf.2; Mon, 22 Apr 2024 11:48:12 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUOY4qZ+EySN7WC/vyNeHGHJOiRCea/oy1t/SAmrd5d+VIOoD03cQTI8TF3QMgV6LfMwDGMRb6rbbd72XQpkcAQffQTG9eVb+TLWAmz2sYU6H++pbuV5a2wlmTK6Eblc6KEQ2HkbcB8l9G9vUHIAYYEM0jkDKlAx8joapTlxHk8XGv2z/DAe2SrtHi/cfixCeTxxK1q4UfoeJvfQaKu4g== X-Gm-Message-State: AOJu0YzksLusupozqrOO9H/CrOj3QyLwvpwt1OqnIAbWptNLZoqjJ1Dl 9DqZ34if4xEq8jn4sl2+BHKMVe4f1VM5eJJHJxKCPjtJpkgRiCJbjMLB682YQANsMlraegr+TfE BTHP7co+Cv8YJl7a/UFnZ6CPQ61w= X-Received: by 2002:a05:6820:2c83:b0:5aa:6b2e:36f0 with SMTP id dx3-20020a0568202c8300b005aa6b2e36f0mr10951143oob.0.1713811692094; Mon, 22 Apr 2024 11:48:12 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240418135412.14730-1-Jonathan.Cameron@huawei.com> <20240418135412.14730-4-Jonathan.Cameron@huawei.com> In-Reply-To: <20240418135412.14730-4-Jonathan.Cameron@huawei.com> From: "Rafael J. Wysocki" Date: Mon, 22 Apr 2024 20:48:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 03/16] ACPI: processor: Drop duplicated check on _STA (enabled + present) To: Jonathan Cameron 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 , Salil Mehta , Jean-Philippe Brucker , Catalin Marinas , Will Deacon , Ingo Molnar , Borislav Petkov , Dave Hansen , linuxarm@huawei.com, justin.he@arm.com, jianyong.wu@arm.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 18, 2024 at 3:55=E2=80=AFPM Jonathan Cameron wrote: > > 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 LGTM, so Acked-by: Rafael J. Wysocki > --- > 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 =3D 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(); > > --