mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@kernel.org>
To: "lihuisong (C)" <lihuisong@huawei.com>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sudeep Holla <sudeep.holla@kernel.org>,
	acpica-devel@lists.linux.dev,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Saket Dumbre <saket.dumbre@intel.com>
Subject: Re: [PATCH 2/4] ACPI: PCC: Preserve shared memory signature in OpRegion handler
Date: Tue, 21 Jul 2026 13:27:04 +0100	[thread overview]
Message-ID: <20260721-honest-shiny-teal-da9d6d@sudeepholla> (raw)
In-Reply-To: <b75fc80b-6d1c-44d9-986c-be2c0a6e7711@huawei.com>

On Tue, Jul 21, 2026 at 07:43:53PM +0800, lihuisong (C) wrote:
> 
> On 7/17/2026 4:10 PM, Sudeep Holla wrote:
> > ACPI 6.3 introduced PCC OperationRegions. Section 5.5.2.4.7.3,
> > "Declaring message fields within a PCC OperationRegion", states that,
> > for all PCC subspace types, the PCC Operation Region pertains to the
> > region of PCC subspace that succeeds the PCC signature.
> > 
> > The PCC address space handler currently copies the OperationRegion
> > buffer to and from the start of the PCC shared memory region. That can
> > overwrite or expose the signature at byte offset 0, and it also misses
> > the last 4 bytes of the actual PCC OperationRegion data.
> > 
> > Offset OperationRegion copies by the size of the signature and reject
> > regions that do not fit in the shared memory after that signature. AML
> > that sizes the PCC OperationRegion to include the signature is not
> > conforming to the PCC OperationRegion definition.
> > 
> > Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> > Fixes: 77e2a04745ff ("ACPI: PCC: Implement OperationRegion handler for the PCC Type 3 subtype")
> > Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
> > ---
> The below commit description said the PCC operationRegion contains the
> signature field.
> "77e2a04745ff ("ACPI: PCC: Implement OperationRegion handler for the PCC
> Type 3 subtype")"
> And I find that the definition of this OperationRegion in ACPI spec 6.3 is
> the same with spec 6.5 and 6.6.
> That is, the original implementation already didn't comply with ACPI spec.
> 
> Patch 1/4 also requires the change of platform AML about PCC
> OperationRegion.
> These modification may lead to the existed PCC OperationRegion method in
> some drivers doesn't work.
> Because the platform AML still contains signature field in PCC
> OperationRegion method.
> I don't know how many drivers in linux have used this method.
> IMO, we at least need to reclarify this usage change and provide a new usage
> example in the commit log like the original commit did.
> 

Good point, I didn't realise I had wrong example in the original commit.
I will add the example of correct usage in this change. Thanks for pointing
it out.

> Anyway, this patch also makes the driver more compliant with the
> specifications.
> So I agree.
> Reviewed-by: Huisong Li <lihuisong@huawei.com>
> 

Thanks again for all the review.

-- 
Regards,
Sudeep

  reply	other threads:[~2026-07-21 12:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17  8:10 [PATCH 0/4] ACPI/PCC: Correct PCC OperationRegion handling Sudeep Holla
2026-07-17  8:10 ` [PATCH 1/4] ACPICA: Fix PCC OperationRegion command offsets Sudeep Holla
2026-07-17  8:10 ` [PATCH 2/4] ACPI: PCC: Preserve shared memory signature in OpRegion handler Sudeep Holla
2026-07-21 11:43   ` lihuisong (C)
2026-07-21 12:27     ` Sudeep Holla [this message]
2026-07-21 19:20       ` Rafael J. Wysocki (Intel)
2026-07-22  8:47         ` Sudeep Holla
2026-07-17  8:10 ` [PATCH 3/4] ACPI: PCC: Free channel on OpRegion deactivation Sudeep Holla
2026-07-22  1:15   ` lihuisong (C)
2026-07-22  8:45     ` Sudeep Holla
2026-07-17  8:10 ` [PATCH 4/4] ACPI: PCC: Cache OpRegion command timeout Sudeep Holla
2026-07-21 11:53   ` lihuisong (C)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260721-honest-shiny-teal-da9d6d@sudeepholla \
    --to=sudeep.holla@kernel.org \
    --cc=acpica-devel@lists.linux.dev \
    --cc=lihuisong@huawei.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=saket.dumbre@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®