Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp531468rdb; Thu, 22 Feb 2024 11:00:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXpNabE8k2AClOwv9tUkJaGRw2RftzIBZQqhJg2LH8SCmRg97Wkk1iLXp4Yaf3I5r7WwvokpcjwEYm0yz+shroYmsTWIXM6VQa/VTwbbg== X-Google-Smtp-Source: AGHT+IFQ0kIwvSXBObh9P9fzOck/lWih5doF+SIlVTh1Wakc50+Ztq6eXPBlvc0EN4s7PVWsgLLO X-Received: by 2002:a62:d41a:0:b0:6e3:fa52:2f26 with SMTP id a26-20020a62d41a000000b006e3fa522f26mr12143751pfh.8.1708628430575; Thu, 22 Feb 2024 11:00:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708628430; cv=pass; d=google.com; s=arc-20160816; b=cNBERZ3WiaxGXTJ1KkkhQFOwc2UbPFMVsddMcCd5WE5rjpI3f6Sauvnu9yaBpwZpIr xZBlFTBu9KVXrghJanRuIX9IyeeRRvf+kNBsl8B72R5Hq098I3gXkP6HzaVvSeS1vIC8 ZPWgdVcuZDtdcHUSmqke6EF3ap3LkJHgSCOS25c0TaUfF/yGb02S5pQ6L1WL9H+cUjYd BzIobQt3F0rGblH+mvY/OhRjcLH1S79/W638en4Ni+hVOXyQtQ7OJf/xdihPeCIy+NVX WDKqycV5aaOlpLpUcCA4z0zLnu6114L1iTQ4YblqnxyBpe4AnhWSTbOG94vzTeipgf8a WUzw== 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:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=LO/R+Ty0YOkn5I4Gp5cDTqMukXXYGtsUn+mBPHsdWFI=; fh=qca6Lao8FW7Clj+3Gs90PIlM0S5qGE+Ig2lyYgPloPw=; b=fhilxb/636cBaZLq7D97DWfy6mLVsoP2WebTkpiN3KYjP+9c9IlfgbuI9sjgosjahF aIBzI3xeM2D6uYS9xqMnVHrEFt/vpUOupw8/HSRocbbG31QwOsa9e0U1kWnNBhIzGxzR KIecxebQOxncgtN2agoGvoUdE/kYord5pEBRai88NxtKR+B7cza5rAuOR2tXJkUklp7F 4qSfDCauSecnwnrAAz/+CMalKKDd2tc/O1JAqX56wkkJQwDc37K+KN3+l5hbIuTFBVBE y2WfKNEm6NuwlCrayonD+GyZ25mfHp9X6iO3tP0VjjNDzbGid5POTdCCC7uzp9to81QL mC5g==; 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-77199-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77199-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 ay8-20020a056a00300800b006dbc98ff8desi10544414pfb.147.2024.02.22.11.00.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 11:00:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77199-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-77199-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77199-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 22E52286A68 for ; Thu, 22 Feb 2024 18:55:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EE6A71745; Thu, 22 Feb 2024 18:47:48 +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 08F006E5E1; Thu, 22 Feb 2024 18:47:44 +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=1708627667; cv=none; b=FlcVVQYpcoQ9vxxDfHhNtzCGKQjwcd4sez0MDHbBWjTTmADyWkoFqcYDOGz9jcdEHVFLTcHB9CQag4e74JfxsxUhwkOTgcyF1rBR4JviX91ctPPvutDKmYpXl43ht5vpn/YlpWVPtZ/3Ug1D5fbrzx4odWoA80jjFgst1qZfWkY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708627667; c=relaxed/simple; bh=GDp40XzKQ0cQgRksU/oyFZVrTyRlcWTheyhy8HJaaAo=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NF4jdWiEift7gy17B6LKvRXreDHnRZ0EuJR+Xkjb0yZR12bJwYRFT6nh0XRIYlTk/FCHLNs4WZnOyYwb2ljmNgrdOHMnMBfDjtTHLcZQ0F5bDqMGG4bAD1/cz7f83sFrXUOCZBg7FbZtNhgX6H8MquO/HFwHKsQInL6Vbfx0vto= 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 4TghqC0q26z6J9St; Fri, 23 Feb 2024 02:43:19 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 66F81140119; Fri, 23 Feb 2024 02:47:42 +0800 (CST) Received: from localhost (10.195.247.94) 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, 22 Feb 2024 18:47:41 +0000 Date: Thu, 22 Feb 2024 18:47:38 +0000 From: Jonathan Cameron To: "Rafael J. Wysocki" CC: Linux ACPI , LKML , Mika Westerberg , "Rafael J. Wysocki" , "Russell King (Oracle)" Subject: Re: [PATCH v1 4/4] ACPI: scan: Make acpi_processor_add() check the device enabled bit Message-ID: <20240222184738.00000bf7@Huawei.com> In-Reply-To: <3298279.44csPzL39Z@kreacher> References: <4562925.LvFx2qVVIh@kreacher> <3298279.44csPzL39Z@kreacher> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100005.china.huawei.com (7.191.160.25) To lhrpeml500005.china.huawei.com (7.191.163.240) On Wed, 21 Feb 2024 21:03:17 +0100 "Rafael J. Wysocki" wrote: > From: Rafael J. Wysocki > > Modify acpi_processor_add() return an error if _STA returns the enabled > bit clear for the given processor device, so as to avoid using processors > that don't decode their resources, as per the ACPI specification. [1] > > Link: https://uefi.org/specs/ACPI/6.5/06_Device_Configuration.html#sta-device-status # [1] > Signed-off-by: Rafael J. Wysocki This does the job for us so if you are happier with this approach that works for me. Reviewed-by: Jonathan Cameron > --- > drivers/acpi/acpi_processor.c | 3 +++ > 1 file changed, 3 insertions(+) > > Index: linux-pm/drivers/acpi/acpi_processor.c > =================================================================== > --- linux-pm.orig/drivers/acpi/acpi_processor.c > +++ linux-pm/drivers/acpi/acpi_processor.c > @@ -381,6 +381,9 @@ static int acpi_processor_add(struct acp > struct device *dev; > int result = 0; > > + if (!acpi_device_is_enabled(device)) > + return -ENODEV; > + > pr = kzalloc(sizeof(struct acpi_processor), GFP_KERNEL); > if (!pr) > return -ENOMEM; > > >