Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp350714lqs; Thu, 13 Jun 2024 11:49:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWF5s39aBDQUASVtuGtE/481AjY81jlNM4gkC0VrRz9zPJfbK+FAMGmgSsK1Lh8cKkDi4CjcTj8jfOmiQiVKDJHtsf4aFE/uERrfCymZw== X-Google-Smtp-Source: AGHT+IGOVE1p6i2AMMa/V+ps0N1L20ePIprZYZyOXdDbe+OWK2LGe4wov4/JlQStry4A1wuKrNTb X-Received: by 2002:a17:903:1c7:b0:1f6:3580:65c9 with SMTP id d9443c01a7336-1f8622ff5e8mr7936965ad.26.1718304579559; Thu, 13 Jun 2024 11:49:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718304579; cv=pass; d=google.com; s=arc-20160816; b=x0uT8OQt0pSzC6eQIU/Jfad0+DhfnJ6hNJicMi3rXkYCEtPjLzQi3Rf36n7y3Ah2jg lDZRCwfZqkKQQ6dKpkMr0QgBGBT3lalfKtFnWnQb0Zm/srE9HV63m89RtaZ9gu8uz0wT 6is8AjQx0brDS5TlD0pNpwjuEi+H/sdBmLJ+5Hm6zRMf4YI2gIRHK8VSNNpXiH8AywU/ jEsmRlT6p2/X9D8pdmGtYfit4x6SwEdlHTOCNvxr0q4DDQFBhscW/0kUSwlybCOeQ62u p+0gcfrz93uKQfzLW6vVY5Ie26UgIQ+GZ/5d8hIQ72KUs75jZGwTkvFut05nyHafFlVC UD+w== 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=svy2vzeQbHYkTaZ59xo3IFrth3vwTXIYyNy91BwHH6o=; fh=odYPhUMAUXZ+ykbFuvsxFVkQ8WnjxkP4GUGnHVOFdNY=; b=NjcA52FWzisHf5s/Kr4za9jYlEwnWMEcJ6p4Z3PqLaSWlgEK7thoVKEcWoXqXVXh3U 2aZpaJWWV1HaF5fdZbCBBLmO+OWuv7x57mD+v8JqlIFr0kEMa5l8INEHgYPTufJlv1Fv VIqxNIlOBw6sRZN7h3bIwsFeXKnZRxZuXn+N9ILXzrmdbXrgye+IAfN1jYW+AJhmuqCx zetVUVN6vqLfF0Q1/JArsLCElJ70zvDG2FDPeA4IQNlpALOWD2Y3a8KZdZ8ayF1swA4w OfD28hBMdKBXMmdKbZn4CX4JfDuizQv83SXE/x0MtiCMX73ClV1XQXNG2yXkqssDIyUm z4IQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BexmCDAv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213861-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213861-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f855ee345dsi18204395ad.368.2024.06.13.11.49.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 11:49:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213861-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BexmCDAv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213861-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213861-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D9E85B21D62 for ; Thu, 13 Jun 2024 18:49:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F5F814B940; Thu, 13 Jun 2024 18:49:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BexmCDAv" 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 35E56139CFE; Thu, 13 Jun 2024 18:49:25 +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=1718304566; cv=none; b=dIm8QPOKk2hqItcnhV+wzOxacbk2dRRJpMf3EAywlcsGE7dQ2WUvPKvtKCn+PxVEwMJ57VX60AsV1E6uhPvsIZ4BtwlPxScwPmoIIusjxbpLJxEm6yRA/dcB7UZEUIiKyyS0t2TUQOji7a16hF0qBjiywno3pQsz6JMROm1XPhU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718304566; c=relaxed/simple; bh=2ik+Qo/zt+8LDrO1DIrupts/0wjBHoGmG3SQ2ZnUMPE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=OyY5q9SRDwi0MmLuciWdmGSOZqamRxr5qsWIEyZR4KNL/JjCP6p76+0SxVMF73JUGK2Tq+DsH+OMDwJDO06qQBy5ASJwJlljTXaffkntjEzxQxqSMCIXGaR/AusJOHxZstpJJFrFZ/k4x3KxAnkwJQU2PVs+u2ywJ69OV0vHJu4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BexmCDAv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1658C2BBFC; Thu, 13 Jun 2024 18:49:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718304565; bh=2ik+Qo/zt+8LDrO1DIrupts/0wjBHoGmG3SQ2ZnUMPE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=BexmCDAvSVztnWtbz+Hq45Tl24kb7DVWbuZSyn0W4Nd7c7N1VlfrOu/bLYwK25kOA NKoXoIkRmcoL/Farwe38kFs/Txuf+ZLDyOrhvuHylJT+36XI9/tyfg7nJCrAx+2lVD ZZaZa3/oLlm4pI2ZYcwKhgL08jmzNhJdYuJsFYMhAzGumPgQnWsc+xwWmwz5JPzrdX hPBNmkG7+5ZShiDekJ4EfW2+j1oZdEld/Jl9RPm5NtBwIPWT1Ns8HIFUXTWb+VAgmM icKLuOa1Ol/lf7mXwIS2yOpGeTeHPMHUDWqkfzLo88zV/HnkXnMNYUgjL8ezHspbPc aN68Ziv7IDMkw== Received: by mail-oo1-f44.google.com with SMTP id 006d021491bc7-5baf76164fbso79666eaf.1; Thu, 13 Jun 2024 11:49:25 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWewWgfF9lovCs30gjw8LYG+AVHHZQR7SVm7ialVS9DRim0n++0blltoCxMoZBaWqxtDgl8Fhd1JBDbuC6vuNuBLcSFWYmoXFq4g8IYt5j7SrrAGGWiN0syxQ7jx/ZTm8TI2oL5vIRg0A== X-Gm-Message-State: AOJu0YyMX5nu9GVpCvNQlP3gse4yfgEfkcxx8wucYDWkfYl3C4QMSw+3 sxGGBZN4BfexeTyAD/CJs99mv0xSzZr8jUkiYg5ikdextW2n0QpdHLUzzjK2GIl42vShevaQhRM t2K6As4Z+rghYvB6YfzgTqRTbH/8= X-Received: by 2002:a4a:d6cd:0:b0:5bd:af39:c9d9 with SMTP id 006d021491bc7-5bdaf39caa2mr120946eaf.0.1718304565026; Thu, 13 Jun 2024 11:49:25 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240609210908.4470-1-W_Armin@gmx.de> In-Reply-To: <20240609210908.4470-1-W_Armin@gmx.de> From: "Rafael J. Wysocki" Date: Thu, 13 Jun 2024 20:49:14 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ACPI: acpi_pad: Still evaluate _OST when _PUR evaluation fails To: Armin Wolf Cc: rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jun 9, 2024 at 11:09=E2=80=AFPM Armin Wolf wrote: > > The ACPI specification says that if no action was performed when > processing the _PUR object, _OST should still be evaluated, albeit > with a different status code. > > Evaluate _OST even when evaluating _PUR fails, to signal the firmware > that no action was performed. > > Compile-tested only. > > Signed-off-by: Armin Wolf > --- > drivers/acpi/acpi_pad.c | 19 +++++++++++++++---- > 1 file changed, 15 insertions(+), 4 deletions(-) > > diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c > index bd1ad07f0290..350d3a892889 100644 > --- a/drivers/acpi/acpi_pad.c > +++ b/drivers/acpi/acpi_pad.c > @@ -25,6 +25,10 @@ > #define ACPI_PROCESSOR_AGGREGATOR_CLASS "acpi_pad" > #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator" > #define ACPI_PROCESSOR_AGGREGATOR_NOTIFY 0x80 > + > +#define ACPI_PROCESSOR_AGGREGATOR_STATUS_SUCCESS 0 > +#define ACPI_PROCESSOR_AGGREGATOR_STATUS_NO_ACTION 1 > + > static DEFINE_MUTEX(isolated_cpus_lock); > static DEFINE_MUTEX(round_robin_lock); > > @@ -382,16 +386,23 @@ static void acpi_pad_handle_notify(acpi_handle hand= le) > .length =3D 4, > .pointer =3D (void *)&idle_cpus, > }; > + u32 status; > > mutex_lock(&isolated_cpus_lock); > num_cpus =3D acpi_pad_pur(handle); > if (num_cpus < 0) { > - mutex_unlock(&isolated_cpus_lock); > - return; > + /* The ACPI specification says that if no action was perf= ormed when > + * processing the _PUR object, _OST should still be evalu= ated, albeit > + * with a different status code. > + */ > + status =3D ACPI_PROCESSOR_AGGREGATOR_STATUS_NO_ACTION; > + } else { > + status =3D ACPI_PROCESSOR_AGGREGATOR_STATUS_SUCCESS; > + acpi_pad_idle_cpus(num_cpus); > } > - acpi_pad_idle_cpus(num_cpus); > + > idle_cpus =3D acpi_pad_idle_cpus_num(); > - acpi_evaluate_ost(handle, ACPI_PROCESSOR_AGGREGATOR_NOTIFY, 0, &p= aram); > + acpi_evaluate_ost(handle, ACPI_PROCESSOR_AGGREGATOR_NOTIFY, statu= s, ¶m); > mutex_unlock(&isolated_cpus_lock); > } > > -- Applied as 6.11 material, thanks!