Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2161651lqa; Tue, 30 Apr 2024 09:36:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVFfAWHpGfBCPX2vlyxekr8iYUJMNfwEAswnfrfEK0KAPGqf1dDjAa5R/t4eQz6Vp5dx2MSO9Kqllftdj3mIpk9RrBmOp+BUg8tGIu5Ag== X-Google-Smtp-Source: AGHT+IFmQP2eFa/TslvD92MtqWaQzrGL6+IjkUuz0mTExaBl27Ul8qy9tfBpQcfp7AOuohgmRjNk X-Received: by 2002:a05:6a21:62f:b0:1ac:efbd:dc46 with SMTP id ll47-20020a056a21062f00b001acefbddc46mr370494pzb.2.1714494973159; Tue, 30 Apr 2024 09:36:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714494973; cv=pass; d=google.com; s=arc-20160816; b=wnmUkyYDUMdNlUYxwUnMpPnPzWY2EXMnoB7rPIxMtKYiiWufsGRGr+zbeXAAN4QJxn K3Wqhy6Aqz5lSetRIxX0YgD3FvShO4Vi8EwyzTKXEEq99wGXBsF/jaRwPQ/x3BX9UWDd wbgY7AVFqoMxfRLFW3n1f2zY6S493iCE91kCNiTnUv4Z2sN8/UAIClws8kV6qkA2mQbB aJ6ZGzD0gZ6lKamxcvIgXOzOljeBeKhNSeDuPSNHCJ4Co1w6XAM1Rj8nG0EW4U4NgylV kqZZA/G1mKKx2551dqGQfZxHW5uD4DoC0hQvSpK3AljQ2V6ZRxBPCjQKrOm7QnQJzboK BXNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=mOxPEb4+jizsBt45/gLtrGDBIWkjzNC0N8x7M/YYw54=; fh=O3nMdHYhGxVIBnGrcbuU2gvWhWdjwd0dSF68kVqRRYE=; b=r3k43wtYAhNpl84PloCOKJACewdkVNoZWwkItSiH3Sp7lN7vRXFEUI1uAeFzz8DUTh KJVGRqMnAMMUu0pch6aRo4NdjGsNyI0NyFxwindbLuL0c+dw6T/AQA72JvHZdhqmog95 aAFaEXaRn0LPt5/7sDfLrpflLdL3yNolz12dm21dlLil0VHPDM88Nb9xnrgwoNeG0nhK K/Zuk/TEsxUlJFOh/hgBlk7ZmzQmgg5lOHKaYkr4BQHAMDAMnTI7kbjvMNCCBTAobfqW UoQ9Bg5rFSOzxGB24Z3ByFT0J7nr+ED7+yJHB3K0n+I0zmO4SI4KCxX8dxtb8n6TVK5A 7xZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-164344-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164344-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k70-20020a638449000000b006049b7b6656si13097038pgd.413.2024.04.30.09.36.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 09:36:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164344-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-164344-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164344-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E3F6CB21BCC for ; Tue, 30 Apr 2024 16:16:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 239AA176FBE; Tue, 30 Apr 2024 16:16:20 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C07E4175560; Tue, 30 Apr 2024 16:16:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714493779; cv=none; b=hz1hk3uiyUpzlZwUW1l4wOG9iLotTl9nX2oagvhWAew6sM2V9UC0O8q9z7JxEhCL9+rEF84oxB8QoVNXvnEjd+qC2O0P1xXFJYrR6vCo+I0r9ppuLWBnmP2wERa745Aptvv/U+nogY19chA165VoQH9cIiLQTB08FTF3pgi62tg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714493779; c=relaxed/simple; bh=cLaj4cEA+dcWsFhapRjcDitwcSh9v3HR49WdmWsq/LM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hxx31Tudr6a3IeAjMkm5lPjVj9vN34bFEgYysnqxW8MEbbahUfwU03ENDh+/s5XllB9iS4aXKkDSivpcYwVD9tL4tdZKH4p9Edy6+H3UwhusrfIK+7CgfKdrbRcT18Ku9FwiPCMi6N5HEGdQK1TOIYyG94oZmf2cIjBjUg2gm3w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 36A802F4; Tue, 30 Apr 2024 09:16:43 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D4DBA3F73F; Tue, 30 Apr 2024 09:16:15 -0700 (PDT) Date: Tue, 30 Apr 2024 17:16:13 +0100 From: Sudeep Holla To: "Rafael J. Wysocki" Cc: Linux ACPI , LKML , Sudeep Holla , Salil Mehta , Jonathan Cameron , Zhang Rui Subject: Re: [PATCH v2] ACPI: scan: Avoid enumerating devices with clearly invalid _STA values Message-ID: References: <12427278.O9o76ZdvQC@kreacher> 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-Disposition: inline In-Reply-To: <12427278.O9o76ZdvQC@kreacher> On Tue, Apr 30, 2024 at 06:02:20PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The return value of _STA with the "present" bit unset and the "enabled" > bit set is clearly invalid as per the ACPI specification, Section 6.3.7 > "_STA (Device Status)", so make the ACPI device enumeration code > disregard devices with such _STA return values. > > Also, because this implies that status.enabled will only be set if > status.present is set too, acpi_device_is_enabled() can be modified > to simply return the value of the former. > Nice! FWIW, Reviewed-by: Sudeep Holla -- Regards, Sudeep