mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes
@ 2026-11-20 17:17 Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 01/42] ACPICA: components: Fix typo "Supress" -> "Suppress" Maciej Wieczor-Retman
                   ` (41 more replies)
  0 siblings, 42 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:17 UTC (permalink / raw)
  To: catalin.marinas, pawel.chmielewski, kyle.d.pelton, lenb,
	guohanjun, maobibo, lpieralisi, will, sudeep.holla, erik.kaneda,
	rafael, robert.moore, void0red, maciej.wieczor-retman, superm1,
	chenhuacai
  Cc: acpica-devel, linux-arm-kernel, linux-kernel, linux-acpi, loongarch

The following patches are ported from upstream ACPICA and contain the 20260930
release and some follow up fixes (so generally everything after the 20260408
release). Only source files relevant to the Linux kernel are being ported.

Changes since v1:
v1 [1] contained only commits between the 20260408 and 20260930 releases.
However sashiko.dev [2] raised some issues that needed to be either applied or
rejected. Most issues were valid and were resolved in patches that follow the
20260930 release. Things that were rejected were the whole patch [3] due to not
being a full solution to a very unlikely, debug only problem. Also the sashiko
comment related to ACPI_GPE_AUTO_ENABLED in patch [4] wasn't applied due to
not being realistically possible to happen and consequences were only an odd
looking log entry.

There are non-ACPICA changes related to constants/variable name changes
in these patches:
- ACPICA: actbl2: MPAM: adapt to MPAM ACPI spec v3.1
- ACPICA: acpica: Fix typo in the IOVT_IOMMU table definitions

The base for this patches is upstream kernel v7.4-rc3 and it consists of
the following material:

Andre Przywara (1):
      ACPICA: actbl2: MPAM: adapt to MPAM ACPI spec v3.1

Colin Ian King (2):
      ACPICA: components: Fix typo "Supress" -> "Suppress"
      ACPICA: components: Fix typo: "numer" -> "number"

Dave Jiang (2):
      ACPICA: CEDT: RDPAS: Add missing reserved field in RDPAS structure
      ACPICA: CEDT: RDPAS: Fix incorrect field positions for RDPAS

Hanjun Guo (1):
      ACPICA: add UBRT (UnifiedBus Root Table) definitions

Himanshu Chauhan (1):
      ACPICA: Introduce a new HEST notification type for RISC-V SSE events

Iurii Trukhin (1):
      ACPICA: parser: Fix parse tree memory leak on AML execution error unwind

Leonard Lausen (1):
      ACPICA: Executer: Resolve package index references used as integer operands

Maciej Strozek (1):
      ACPICA: Utilities: Fix for AcpiUtVerifyChecksum warning display

Maciej Wieczor-Retman (17):
      ACPICA: executer: Fix NULL pointer dereference in AcpiExStoreObjectToIndex()
      ACPICA: compiler: Add _Ixx GPE object
      ACPICA: namespace: Fix possible underflow and NULL pointer dereference
      ACPICA: iASL: Fix the truncated count of external control methods
      ACPICA: release: Update version to 20260930
      ACPICA: events: Add missing event mutex to AcpiEvClearGpeDispatchByOwner()
      ACPICA: events: Remove redundant code
      ACPICA: events: Fix AcpiEvClearGpeDispatchByOwner handler type processing
      ACPICA: events: Fix GPE cleanup return after changing program state
      ACPICA: events: Handle GPEs' Notify dispatch type
      ACPICA: tables: Fix wrong table unload and notify call order
      ACPICA: tables: Fix global table read missing mutex
      ACPICA: executer: Fix copying PCC source buffer data
      ACPICA: dispatcher: Fix zero size non-NULL PCC buffer pointer
      ACPICA: utilities: Clear NextObject so the outer loop doesn't read it
      ACPICA: namespace: Fix memory leak around compiler alias flag
      ACPICA: acpica: Fix typo in the IOVT_IOMMU table definitions

Mario Limonciello (AMD) (1):
      ACPICA: Add ACPI_MSG_DEBUG to set KERN_DEBUG for debug output

Pawel Chmielewski (3):
      ACPICA: ACPI 6.5 Add support for the MISC table
      ACPICA: iASL: Complete KEYP support
      ACPICA: tables: Fix table buffer leak when Load fails verification

Rong Zhang (1):
      ACPICA: parser: Set AML length for bytelist

Vidya Sagar (1):
      ACPICA: IORT: Add Root Complex PASID Flags field

ikaros (8):
      ACPICA: Events: Clear GPE dispatch by owner during table unload
      ACPICA: executer: Add bounds checking for PCC field read access
      ACPICA: Validate 4-char field names before namespace lookup
      ACPICA: Improve error handling in table loading process
      ACPICA: executer: Add bounds checking for PCC field write access
      ACPICA: tables: Fix heap-buffer-overflow in AcpiTbFindTable
      ACPICA: Fix object reference update to skip non-local notify types
      ACPICA: namespace: Recognize alias node types in detach

purofle (1):
      ACPICA: fix: build error with gcc 16: unused-but-set-variable

[1] https://lore.kernel.org/all/20261020141051.2194123-1-pawel.chmielewski@intel.com/
[2] https://sashiko.dev/#/patchset/20261020141051.2194123-1-pawel.chmielewski%40intel.com
[3] https://sashiko.dev/#/message/20261020141051.2194123-9-pawel.chmielewski%40intel.com
[4] https://sashiko.dev/#/patchset/20261020141051.2194123-1-pawel.chmielewski%40intel.com?part=7

Andre Przywara (1):
  ACPICA: actbl2: MPAM: adapt to MPAM ACPI spec v3.1

Colin Ian King (2):
  ACPICA: components: Fix typo "Supress" -> "Suppress"
  ACPICA: components: Fix typo: "numer" -> "number"

Dave Jiang (2):
  ACPICA: CEDT: RDPAS: Add missing reserved field in RDPAS structure
  ACPICA: CEDT: RDPAS: Fix incorrect field positions for RDPAS

Hanjun Guo (1):
  ACPICA: add UBRT (UnifiedBus Root Table) definitions

Himanshu Chauhan (1):
  ACPICA: Introduce a new HEST notification type for RISC-V SSE events

Iurii Trukhin (1):
  ACPICA: parser: Fix parse tree memory leak on AML execution error
    unwind

Leonard Lausen (1):
  ACPICA: Executer: Resolve package index references used as integer
    operands

Maciej Strozek (1):
  ACPICA: Utilities: Fix for AcpiUtVerifyChecksum warning display

Maciej Wieczor-Retman (17):
  ACPICA: executer: Fix NULL pointer dereference in
    AcpiExStoreObjectToIndex()
  ACPICA: compiler: Add _Ixx GPE object
  ACPICA: namespace: Fix possible underflow and NULL pointer dereference
  ACPICA: iASL: Fix the truncated count of external control methods
  ACPICA: release: Update version to 20260930
  ACPICA: events: Add missing event mutex to
    AcpiEvClearGpeDispatchByOwner()
  ACPICA: events: Remove redundant code
  ACPICA: events: Fix AcpiEvClearGpeDispatchByOwner handler type
    processing
  ACPICA: events: Fix GPE cleanup return after changing program state
  ACPICA: events: Handle GPEs' Notify dispatch type
  ACPICA: tables: Fix wrong table unload and notify call order
  ACPICA: tables: Fix global table read missing mutex
  ACPICA: executer: Fix copying PCC source buffer data
  ACPICA: dispatcher: Fix zero size non-NULL PCC buffer pointer
  ACPICA: utilities: Clear NextObject so the outer loop doesn't read it
  ACPICA: namespace: Fix memory leak around compiler alias flag
  ACPICA: acpica: Fix typo in the IOVT_IOMMU table definitions

Mario Limonciello (AMD) (1):
  ACPICA: Add ACPI_MSG_DEBUG to set KERN_DEBUG for debug output

Pawel Chmielewski (3):
  ACPICA: ACPI 6.5 Add support for the MISC table
  ACPICA: iASL: Complete KEYP support
  ACPICA: tables: Fix table buffer leak when Load fails verification

Rong Zhang (1):
  ACPICA: parser: Set AML length for bytelist

Vidya Sagar (1):
  ACPICA: IORT: Add Root Complex PASID Flags field

ikaros (8):
  ACPICA: Events: Clear GPE dispatch by owner during table unload
  ACPICA: executer: Add bounds checking for PCC field read access
  ACPICA: Validate 4-char field names before namespace lookup
  ACPICA: Improve error handling in table loading process
  ACPICA: executer: Add bounds checking for PCC field write access
  ACPICA: tables: Fix heap-buffer-overflow in AcpiTbFindTable
  ACPICA: Fix object reference update to skip non-local notify types
  ACPICA: namespace: Recognize alias node types in detach

purofle (1):
  ACPICA: fix: build error with gcc 16: unused-but-set-variable

 drivers/acpi/acpica/acevents.h  |   4 +
 drivers/acpi/acpica/acglobal.h  |   2 +-
 drivers/acpi/acpica/acpredef.h  |   1 +
 drivers/acpi/acpica/acutils.h   |   3 +
 drivers/acpi/acpica/dsfield.c   |  24 +++
 drivers/acpi/acpica/evgpe.c     | 355 ++++++++++++++++++++++++++++++++
 drivers/acpi/acpica/exconfig.c  |   3 +-
 drivers/acpi/acpica/exconvrt.c  |   4 +-
 drivers/acpi/acpica/exfield.c   | 105 +++++++---
 drivers/acpi/acpica/exresop.c   |  26 +++
 drivers/acpi/acpica/exstore.c   |  20 +-
 drivers/acpi/acpica/extrace.c   |   2 +-
 drivers/acpi/acpica/nsaccess.c  |   2 +-
 drivers/acpi/acpica/nsobject.c  |   7 +-
 drivers/acpi/acpica/nsxfname.c  |   8 +
 drivers/acpi/acpica/psargs.c    |   8 +-
 drivers/acpi/acpica/psloop.c    |   5 +-
 drivers/acpi/acpica/psobject.c  |   1 -
 drivers/acpi/acpica/psparse.c   |  16 +-
 drivers/acpi/acpica/tbdata.c    |  32 ++-
 drivers/acpi/acpica/tbfind.c    |  16 +-
 drivers/acpi/acpica/utcksum.c   |   3 +-
 drivers/acpi/acpica/utdebug.c   |   9 +-
 drivers/acpi/acpica/utdelete.c  |   5 +
 drivers/acpi/arm64/mpam.c       |   6 +-
 drivers/acpi/loongarch/iovt.c   |   6 +-
 include/acpi/acpixf.h           |   2 +-
 include/acpi/actbl1.h           |   6 +-
 include/acpi/actbl2.h           | 200 +++++++++++++++++-
 include/acpi/platform/aclinux.h |   1 +
 30 files changed, 811 insertions(+), 71 deletions(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 01/42] ACPICA: components: Fix typo "Supress" -> "Suppress"
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 02/42] ACPICA: components: Fix typo: "numer" -> "number" Maciej Wieczor-Retman
                   ` (40 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: Colin Ian King, linux-acpi, acpica-devel, linux-kernel

From: Colin Ian King <colin.i.king@gmail.com>

There are typos in comments. Fix them.

Link: https://github.com/acpica/acpica/commit/b4c87a6253ad
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/exconvrt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/exconvrt.c b/drivers/acpi/acpica/exconvrt.c
index b51f20d0978e..ce5bdf519886 100644
--- a/drivers/acpi/acpica/exconvrt.c
+++ b/drivers/acpi/acpica/exconvrt.c
@@ -334,7 +334,7 @@ acpi_ex_convert_to_ascii(u64 integer,
 			hex_char = (u8)
 			    acpi_ut_hex_to_ascii_char(integer, ACPI_MUL_4(j));
 
-			/* Supress leading zeros until the first non-zero character */
+			/* Suppress leading zeros until the first non-zero character */
 
 			if (hex_char == ACPI_ASCII_ZERO && supress_zeros) {
 				continue;
@@ -421,7 +421,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
 			/*
 			 * From to_hex_string.
 			 *
-			 * Supress leading zeros and append "0x"
+			 * Suppress leading zeros and append "0x"
 			 */
 			string_length =
 			    ACPI_MUL_2(acpi_gbl_integer_byte_width) + 2;
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 02/42] ACPICA: components: Fix typo: "numer" -> "number"
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 01/42] ACPICA: components: Fix typo "Supress" -> "Suppress" Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 03/42] ACPICA: Introduce a new HEST notification type for RISC-V SSE events Maciej Wieczor-Retman
                   ` (39 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: Colin Ian King, linux-acpi, acpica-devel, linux-kernel

From: Colin Ian King <colin.i.king@gmail.com>

There is a typo in a comment. Fix it.

Link: https://github.com/acpica/acpica/commit/5c8d1e7129f0
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/extrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/extrace.c b/drivers/acpi/acpica/extrace.c
index 4a6c7fb147d7..27a8e81e4157 100644
--- a/drivers/acpi/acpica/extrace.c
+++ b/drivers/acpi/acpica/extrace.c
@@ -152,7 +152,7 @@ acpi_ex_trace_point(acpi_trace_event_type type,
  * FUNCTION:    acpi_ex_trace_args
  *
  * PARAMETERS:  params            - AML method arguments
- *              count             - numer of method arguments
+ *              count             - number of method arguments
  *
  * RETURN:      None
  *
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 03/42] ACPICA: Introduce a new HEST notification type for RISC-V SSE events
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 01/42] ACPICA: components: Fix typo "Supress" -> "Suppress" Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 02/42] ACPICA: components: Fix typo: "numer" -> "number" Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 04/42] ACPICA: Utilities: Fix for AcpiUtVerifyChecksum warning display Maciej Wieczor-Retman
                   ` (38 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Maciej Wieczor-Retman, Pawel Chmielewski
  Cc: Himanshu Chauhan, linux-acpi, acpica-devel, linux-kernel

From: Himanshu Chauhan <himanshu.chauhan@oss.qualcomm.com>

The GHES entry's notification structure contains the notification
to be used for a given error source. For error sources delivering
events over SSE, it should contain the new SSE notification type.

Link: https://github.com/acpica/acpica/commit/f73f39352c11
Signed-off-by: Himanshu Chauhan <himanshu.chauhan@oss.qualcomm.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 include/acpi/actbl1.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index d824838cb7af..73ebc089e96d 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -1798,7 +1798,8 @@ enum acpi_hest_notify_types {
 	ACPI_HEST_NOTIFY_SEI = 9,	/* ACPI 6.1 */
 	ACPI_HEST_NOTIFY_GSIV = 10,	/* ACPI 6.1 */
 	ACPI_HEST_NOTIFY_SOFTWARE_DELEGATED = 11,	/* ACPI 6.2 */
-	ACPI_HEST_NOTIFY_RESERVED = 12	/* 12 and greater are reserved */
+	ACPI_HEST_NOTIFY_SSE = 12, /* RISC-V SSE */
+	ACPI_HEST_NOTIFY_RESERVED = 13 /* 13 and greater are reserved */
 };
 
 /* Values for config_write_enable bitfield above */
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 04/42] ACPICA: Utilities: Fix for AcpiUtVerifyChecksum warning display
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (2 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 03/42] ACPICA: Introduce a new HEST notification type for RISC-V SSE events Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 05/42] ACPICA: CEDT: RDPAS: Add missing reserved field in RDPAS structure Maciej Wieczor-Retman
                   ` (37 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: Maciej Strozek, linux-acpi, acpica-devel, linux-kernel

From: Maciej Strozek <mstrozek@opensource.cirrus.com>

Remove redundant subtraction which is done already in
AcpiUtGenerateChecksum.
Looks like it is a leftover from a refactor [1] where
AcpiTbVerifyChecksum used to call AcpiTbChecksum which does not
do the substraction (like the Acpi(Dm\Ut)GenerateChecksum does).
Found by using iasl to generate checksum for SWFT tables.

[1]:
https://github.com/acpica/acpica/commit/8ac4e5116f59d6f9ba2fbeb9ce22ab58237a278f

Link: https://github.com/acpica/acpica/commit/9b2b1dd021a6
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/utcksum.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/utcksum.c b/drivers/acpi/acpica/utcksum.c
index 040e34569ac7..1be8b5da055b 100644
--- a/drivers/acpi/acpica/utcksum.c
+++ b/drivers/acpi/acpica/utcksum.c
@@ -58,8 +58,7 @@ acpi_status acpi_ut_verify_checksum(struct acpi_table_header *table, u32 length)
 		ACPI_BIOS_WARNING((AE_INFO,
 				   "Incorrect checksum in table [%4.4s] - 0x%2.2X, "
 				   "should be 0x%2.2X",
-				   table->signature, table->checksum,
-				   table->checksum - checksum));
+				   table->signature, table->checksum, checksum));
 
 #if (ACPI_CHECKSUM_ABORT)
 		return (AE_BAD_CHECKSUM);
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 05/42] ACPICA: CEDT: RDPAS: Add missing reserved field in RDPAS structure
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (3 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 04/42] ACPICA: Utilities: Fix for AcpiUtVerifyChecksum warning display Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 06/42] ACPICA: CEDT: RDPAS: Fix incorrect field positions for RDPAS Maciej Wieczor-Retman
                   ` (36 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: Dave Jiang, linux-acpi, acpica-devel, linux-kernel

From: Dave Jiang <dave.jiang@intel.com>

Add the missing 3 reserved bytes at the end of the RDPAS structure.

Link: https://github.com/acpica/acpica/commit/88d82d3ae53e
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 include/acpi/actbl1.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 73ebc089e96d..5b4207af046a 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -590,6 +590,7 @@ struct acpi_cedt_rdpas {
 	u16 bdf;
 	u8 protocol;
 	u64 address;
+	u8 reserved[3];
 };
 
 /* Masks for bdf field above */
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 06/42] ACPICA: CEDT: RDPAS: Fix incorrect field positions for RDPAS
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (4 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 05/42] ACPICA: CEDT: RDPAS: Add missing reserved field in RDPAS structure Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 07/42] ACPICA: Events: Clear GPE dispatch by owner during table unload Maciej Wieczor-Retman
                   ` (35 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Maciej Wieczor-Retman, Pawel Chmielewski
  Cc: Dave Jiang, linux-acpi, acpica-devel, linux-kernel

From: Dave Jiang <dave.jiang@intel.com>

The 'Address' and 'Protocol' fields for RDPAS are reversed.
Correct them by swapping the positions.

Link: https://github.com/acpica/acpica/commit/041416c33eab
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 include/acpi/actbl1.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 5b4207af046a..3fa9cd46271f 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -588,8 +588,8 @@ struct acpi_cedt_rdpas {
 	struct acpi_cedt_header header;
 	u16 segment;
 	u16 bdf;
-	u8 protocol;
 	u64 address;
+	u8 protocol;
 	u8 reserved[3];
 };
 
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 07/42] ACPICA: Events: Clear GPE dispatch by owner during table unload
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (5 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 06/42] ACPICA: CEDT: RDPAS: Fix incorrect field positions for RDPAS Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 08/42] ACPICA: executer: Add bounds checking for PCC field read access Maciej Wieczor-Retman
                   ` (34 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: ikaros, linux-acpi, acpica-devel, linux-kernel

From: ikaros <void0red@gmail.com>

When a table is unloaded, its GPE method handlers must be cleared to
prevent use-after-free. Add AcpiEvClearGpeDispatchByOwner() which walks
all GPE blocks and clears dispatch info for methods owned by the
unloading table. If a matching GPE is currently dispatching,
AE_ABORT_METHOD is returned and the unload is aborted.

Also add a dispatch-type re-check in AcpiEvAsynchExecuteGpeMethod to
handle the case where dispatch was cleared between scheduling and
execution.

Link: https://github.com/acpica/acpica/commit/13dcd9b19a46
Signed-off-by: ikaros <void0red@gmail.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/acevents.h |  4 ++
 drivers/acpi/acpica/evgpe.c    | 97 ++++++++++++++++++++++++++++++++++
 drivers/acpi/acpica/tbdata.c   | 13 +++++
 3 files changed, 114 insertions(+)

diff --git a/drivers/acpi/acpica/acevents.h b/drivers/acpi/acpica/acevents.h
index ccdc3725c773..4fe26c190c57 100644
--- a/drivers/acpi/acpica/acevents.h
+++ b/drivers/acpi/acpica/acevents.h
@@ -122,6 +122,10 @@ acpi_status acpi_ev_gpe_initialize(void);
 ACPI_HW_DEPENDENT_RETURN_VOID(void
 			      acpi_ev_update_gpes(acpi_owner_id table_owner_id))
 
+ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
+				acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id
+								    owner_id))
+
 acpi_status
 acpi_ev_match_gpe_method(acpi_handle obj_handle,
 			 u32 level, void *context, void **return_value);
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index 53b52efc7c2b..93e205c0709e 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -489,6 +489,18 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
 
 	case ACPI_GPE_DISPATCH_METHOD:
 
+		/*
+		 * Re-check dispatch type. The table may have been unloaded
+		 * and its GPE dispatch cleared while we were waiting.
+		 */
+		if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) !=
+		    ACPI_GPE_DISPATCH_METHOD) {
+			ACPI_DEBUG_PRINT(
+				(ACPI_DB_EVENTS,
+				 "GPE method dispatch cleared during wait\n"));
+			goto error_exit;
+		}
+
 		/* Allocate the evaluation information block */
 
 		info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
@@ -535,6 +547,91 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
 }
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ev_clear_gpe_dispatch_by_owner
+ *
+ * PARAMETERS:  owner_id        - Table owner_id being unloaded
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Clear GPE dispatch info for methods belonging to the table
+ *              being unloaded. If any matching GPE is currently dispatching,
+ *              it is not cleared and AE_ABORT_METHOD is returned.
+ *
+ ******************************************************************************/
+
+acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
+{
+	struct acpi_gpe_xrupt_info *gpe_xrupt_info;
+	struct acpi_gpe_block_info *gpe_block;
+	struct acpi_gpe_event_info *gpe_event_info;
+	u32 gpe_number;
+	acpi_cpu_flags flags;
+	acpi_status status = AE_OK;
+
+	ACPI_FUNCTION_TRACE_U32(ev_clear_gpe_dispatch_by_owner, owner_id);
+
+	if (owner_id == 0) {
+		return_ACPI_STATUS(AE_OK);
+	}
+
+	flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
+
+	/* Walk all GPE interrupt blocks */
+
+	gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head;
+	while (gpe_xrupt_info) {
+		gpe_block = gpe_xrupt_info->gpe_block_list_head;
+		while (gpe_block) {
+			/* Walk all GPEs in this block */
+
+			for (gpe_number = 0; gpe_number < gpe_block->gpe_count;
+			     gpe_number++) {
+				gpe_event_info =
+					&gpe_block->event_info[gpe_number];
+
+				if ((ACPI_GPE_DISPATCH_TYPE(
+					     gpe_event_info->flags) ==
+				     ACPI_GPE_DISPATCH_METHOD) &&
+				    (gpe_event_info->dispatch.method_node) &&
+				    (gpe_event_info->dispatch.method_node
+					     ->owner_id == owner_id)) {
+					/* GPE method belongs to table being unloaded */
+
+					if (gpe_event_info
+						    ->disable_for_dispatch) {
+						/* Handler is executing, cannot clear */
+						status = AE_ABORT_METHOD;
+					} else {
+						/* Clear only the dispatch type, preserve other flags */
+						gpe_event_info->flags &=
+							~ACPI_GPE_DISPATCH_MASK;
+						gpe_event_info->dispatch
+							.method_node = NULL;
+
+						/*
+						 * Hardware-disable the GPE so a late interrupt
+						 * cannot fire and land in the "no handler" default
+						 * branch with disable_for_dispatch stuck at TRUE.
+						 */
+						(void)acpi_hw_low_set_gpe(
+							gpe_event_info,
+							ACPI_GPE_DISABLE);
+					}
+				}
+			}
+
+			gpe_block = gpe_block->next;
+		}
+
+		gpe_xrupt_info = gpe_xrupt_info->next;
+	}
+
+	acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
+	return_ACPI_STATUS(status);
+}
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ev_asynch_enable_gpe
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index 07af035aa4de..144f15011eff 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -1059,6 +1059,19 @@ acpi_status acpi_tb_unload_table(u32 table_index)
 		acpi_tb_notify_table(ACPI_TABLE_EVENT_UNLOAD, table);
 	}
 
+#if (!ACPI_REDUCED_HARDWARE)
+	/*
+	 * Clear GPE dispatch for methods owned by the table being unloaded.
+	 * If any matching GPE is currently dispatching, AE_ABORT_METHOD is
+	 * returned and the unload cannot proceed.
+	 */
+	status = acpi_ev_clear_gpe_dispatch_by_owner(
+		acpi_gbl_root_table_list.tables[table_index].owner_id);
+	if (ACPI_FAILURE(status)) {
+		return_ACPI_STATUS(status);
+	}
+#endif /* !ACPI_REDUCED_HARDWARE */
+
 	/* Delete the portion of the namespace owned by this table */
 
 	status = acpi_tb_delete_namespace_by_owner(table_index);
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 08/42] ACPICA: executer: Add bounds checking for PCC field read access
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (6 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 07/42] ACPICA: Events: Clear GPE dispatch by owner during table unload Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 09/42] ACPICA: Validate 4-char field names before namespace lookup Maciej Wieczor-Retman
                   ` (33 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: ikaros, linux-acpi, acpica-devel, linux-kernel

From: ikaros <void0red@gmail.com>

Add validation in AcpiExReadDataFromField to ensure that PCC field
reads do not exceed the bounds of the InternalPccBuffer. Check for
a NULL buffer pointer and verify that BaseByteOffset + field byte
length does not exceed Region.Length.

Link: https://github.com/acpica/acpica/commit/661d2310fd25
Closes: https://github.com/open-acpica/acpica/issues/1165
Signed-off-by: ikaros <void0red@gmail.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/exfield.c | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index 50317fe0cbd5..6e86759162df 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -209,12 +209,32 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state,
 		ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
 				  "PCC FieldRead bits %u\n",
 				  obj_desc->field.bit_length));
+		/*
+		 * Ensure the field access does not exceed the bounds of the
+		 * internal_pcc_buffer. The buffer is allocated with the region length,
+		 * so verify that base_byte_offset + field byte length <= Region.Length.
+		 */
+		if (!obj_desc->field.region_obj->field.internal_pcc_buffer) {
+			status = AE_AML_NO_OPERAND;
+			goto exit;
+		}
 
+		buffer_length = (acpi_size)ACPI_ROUND_BITS_UP_TO_BYTES(
+			obj_desc->field.bit_length);
+		if (obj_desc->field.base_byte_offset + buffer_length >
+		    obj_desc->field.region_obj->region.length) {
+			ACPI_ERROR((
+				AE_INFO,
+				"PCC field at offset %u length %u exceeds region size %u",
+				obj_desc->field.base_byte_offset, buffer_length,
+				obj_desc->field.region_obj->region.length));
+			status = AE_AML_BUFFER_LIMIT;
+			goto exit;
+		}
 		memcpy(buffer,
 		       obj_desc->field.region_obj->field.internal_pcc_buffer +
 		       obj_desc->field.base_byte_offset,
-		       (acpi_size)ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->field.
-							      bit_length));
+		       buffer_length);
 
 		*ret_buffer_desc = buffer_desc;
 		return AE_OK;
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 09/42] ACPICA: Validate 4-char field names before namespace lookup
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (7 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 08/42] ACPICA: executer: Add bounds checking for PCC field read access Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 10/42] ACPICA: Improve error handling in table loading process Maciej Wieczor-Retman
                   ` (32 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: ikaros, linux-acpi, acpica-devel, linux-kernel

From: ikaros <void0red@gmail.com>

acpi_ds_get_field_names() and acpi_ds_init_field_objects() pass the
4-byte name of a named field (arg->named.name) to acpi_ns_lookup()
without checking it first. acpi_ns_lookup() treats its argument as an
AML name string. If malformed AML makes the first byte of the field name
AML_DUAL_NAME_PREFIX (0x2E) or AML_MULTI_NAME_PREFIX (0x2F),
acpi_ns_lookup() reads more name segments past the 4-byte name. That is
past the end of the parse object, which is a heap out-of-bounds read.

Before calling acpi_ns_lookup(), check that the field name is a valid
ACPI name segment. Return AE_BAD_CHARACTER if it is not.

Link: https://github.com/acpica/acpica/commit/cd05b72db519
Closes: https://github.com/open-acpica/acpica/issues/1171
Signed-off-by: ikaros <void0red@gmail.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/dsfield.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index f7e503bf57c8..5d0dfe4ff8e8 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -374,6 +374,12 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
 
 		case AML_INT_NAMEDFIELD_OP:
 
+			/* Validate the 4-char name to prevent OOB read in acpi_ns_lookup */
+
+			if (!acpi_ut_valid_nameseg((char *)&arg->named.name)) {
+				return_ACPI_STATUS(AE_BAD_CHARACTER);
+			}
+
 			/* Lookup the name, it should already exist */
 
 			status = acpi_ns_lookup(walk_state->scope_info,
@@ -630,6 +636,12 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
 		 * in the field names in order to enter them into the namespace.
 		 */
 		if (arg->common.aml_opcode == AML_INT_NAMEDFIELD_OP) {
+			/* Validate the 4-char name to prevent OOB read in acpi_ns_lookup */
+
+			if (!acpi_ut_valid_nameseg((char *)&arg->named.name)) {
+				return_ACPI_STATUS(AE_BAD_CHARACTER);
+			}
+
 			status = acpi_ns_lookup(walk_state->scope_info,
 						(char *)&arg->named.name, type,
 						ACPI_IMODE_LOAD_PASS1, flags,
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 10/42] ACPICA: Improve error handling in table loading process
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (8 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 09/42] ACPICA: Validate 4-char field names before namespace lookup Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 11/42] ACPICA: executer: Add bounds checking for PCC field write access Maciej Wieczor-Retman
                   ` (31 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: ikaros, linux-acpi, acpica-devel, linux-kernel

From: ikaros <void0red@gmail.com>

The AML Load operator can install a table that acpi_tb_load_table()
then fails to load. In that case acpi_tb_install_and_load_table()
returns an error but leaves the table descriptor in
acpi_gbl_root_table_list. acpi_ex_load_op() then frees the table
buffer, so the descriptor still points to freed memory. Later users of
the table list access the freed table. For example,
acpi_tb_terminate() does when it uninstalls all tables.

When loading fails, uninstall the table in
acpi_tb_install_and_load_table(). For internally allocated tables this
also frees the table buffer, so acpi_ex_load_op() must stop freeing it.

Link: https://github.com/acpica/acpica/commit/d243755c4750
Closes: https://github.com/open-acpica/acpica/issues/1173
Signed-off-by: ikaros <void0red@gmail.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/exconfig.c | 9 ++++++---
 drivers/acpi/acpica/tbdata.c   | 6 ++++++
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
index da39d578595b..cb2eed531c67 100644
--- a/drivers/acpi/acpica/exconfig.c
+++ b/drivers/acpi/acpica/exconfig.c
@@ -461,9 +461,12 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 	acpi_ex_enter_interpreter();
 	if (ACPI_FAILURE(status)) {
 
-		/* Delete allocated table buffer */
-
-		ACPI_FREE(table);
+		/*
+		 * Table buffer is already freed by acpi_tb_uninstall_table
+		 * in acpi_tb_install_and_load_table if installation succeeded,
+		 * or by acpi_tb_uninstall_table in acpi_tb_install_standard_table
+		 * if verification failed after partial setup.
+		 */
 		return_ACPI_STATUS(status);
 	}
 
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index 144f15011eff..8185c6f7ce23 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -1019,6 +1019,12 @@ acpi_tb_install_and_load_table(acpi_physical_address address,
 	}
 
 	status = acpi_tb_load_table(i, acpi_gbl_root_node);
+	if (ACPI_FAILURE(status)) {
+		/* Table was installed but not loaded, uninstall to clean up */
+
+		acpi_tb_uninstall_table(&acpi_gbl_root_table_list.tables[i]);
+		goto exit;
+	}
 
 exit:
 	*table_index = i;
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 11/42] ACPICA: executer: Add bounds checking for PCC field write access
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (9 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 10/42] ACPICA: Improve error handling in table loading process Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 12/42] ACPICA: tables: Fix heap-buffer-overflow in AcpiTbFindTable Maciej Wieczor-Retman
                   ` (30 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: ikaros, linux-acpi, acpica-devel, linux-kernel

From: ikaros <void0red@gmail.com>

Add validation in AcpiExWriteDataToField to ensure that PCC field
writes do not exceed the bounds of the InternalPccBuffer. Check for
a NULL buffer pointer and verify that BaseByteOffset + field byte
length does not exceed Region.Length.

Link: https://github.com/acpica/acpica/commit/1cba59bce8e0
Closes: https://github.com/open-acpica/acpica/issues/1175
Signed-off-by: ikaros <void0red@gmail.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/exfield.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index 6e86759162df..632fc8693f23 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -347,10 +347,28 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
 		 * implementation will use the offsets specified rather than the name
 		 * of the field. This is considered safer because some firmware tools
 		 * are known to obfiscate named objects.
+		 *
+		 * Ensure the field access does not exceed the bounds of the
+		 * internal_pcc_buffer.
 		 */
 		data_length =
 		    (acpi_size)ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->field.
 							   bit_length);
+
+		if (!obj_desc->field.region_obj->field.internal_pcc_buffer) {
+			return_ACPI_STATUS(AE_AML_NO_OPERAND);
+		}
+
+		if (obj_desc->field.base_byte_offset + data_length >
+		    obj_desc->field.region_obj->region.length) {
+			ACPI_ERROR((
+				AE_INFO,
+				"PCC field at offset %u length %u exceeds region size %u",
+				obj_desc->field.base_byte_offset, data_length,
+				obj_desc->field.region_obj->region.length));
+			return_ACPI_STATUS(AE_AML_BUFFER_LIMIT);
+		}
+
 		memcpy(obj_desc->field.region_obj->field.internal_pcc_buffer +
 		       obj_desc->field.base_byte_offset,
 		       source_desc->buffer.pointer, data_length);
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 12/42] ACPICA: tables: Fix heap-buffer-overflow in AcpiTbFindTable
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (10 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 11/42] ACPICA: executer: Add bounds checking for PCC field write access Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 13/42] ACPICA: Fix object reference update to skip non-local notify types Maciej Wieczor-Retman
                   ` (29 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: ikaros, linux-acpi, acpica-devel, linux-kernel

From: ikaros <void0red@gmail.com>

The OEM ID and OEM Table ID string operands passed to AcpiTbFindTable
can be shorter than ACPI_OEM_ID_SIZE (6) and ACPI_OEM_TABLE_ID_SIZE (8).
The unconditional memcpy reads past the string allocation when the input
is too short. Validate string length before memcpy and copy only what
is available, relying on the prior memset to zero-pad the remainder.

Link: https://github.com/acpica/acpica/commit/dfb5b18ef458
Closes: https://github.com/open-acpica/acpica/issues/1179
Signed-off-by: ikaros <void0red@gmail.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/tbfind.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/tbfind.c b/drivers/acpi/acpica/tbfind.c
index 60a772c87f42..f36a9b34058f 100644
--- a/drivers/acpi/acpica/tbfind.c
+++ b/drivers/acpi/acpica/tbfind.c
@@ -57,8 +57,20 @@ acpi_tb_find_table(char *signature,
 
 	memset(&header, 0, sizeof(struct acpi_table_header));
 	ACPI_COPY_NAMESEG(header.signature, signature);
-	memcpy(header.oem_id, oem_id, ACPI_OEM_ID_SIZE);
-	memcpy(header.oem_table_id, oem_table_id, ACPI_OEM_TABLE_ID_SIZE);
+	if (strlen(oem_id) >= ACPI_OEM_ID_SIZE) {
+		memcpy(header.oem_id, oem_id, ACPI_OEM_ID_SIZE);
+	} else {
+		memcpy(header.oem_id, oem_id, strlen(oem_id));
+		/* Remainder is already zeroed by memset above */
+	}
+
+	if (strlen(oem_table_id) >= ACPI_OEM_TABLE_ID_SIZE) {
+		memcpy(header.oem_table_id, oem_table_id,
+		       ACPI_OEM_TABLE_ID_SIZE);
+	} else {
+		memcpy(header.oem_table_id, oem_table_id, strlen(oem_table_id));
+		/* Remainder is already zeroed by memset above */
+	}
 
 	/* Search for the table */
 
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 13/42] ACPICA: Fix object reference update to skip non-local notify types
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (11 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 12/42] ACPICA: tables: Fix heap-buffer-overflow in AcpiTbFindTable Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 14/42] ACPICA: namespace: Recognize alias node types in detach Maciej Wieczor-Retman
                   ` (28 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: ikaros, linux-acpi, acpica-devel, linux-kernel

From: ikaros <void0red@gmail.com>

Link: https://github.com/acpica/acpica/commit/53d7ddc850a8
Closes: https://github.com/open-acpica/acpica/issues/1181
Signed-off-by: ikaros <void0red@gmail.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/utdelete.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/acpi/acpica/utdelete.c b/drivers/acpi/acpica/utdelete.c
index e8180099d01f..57a0de6a49d6 100644
--- a/drivers/acpi/acpica/utdelete.c
+++ b/drivers/acpi/acpica/utdelete.c
@@ -517,6 +517,10 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
 				prev_object =
 				    object->common_notify.notify_list[i];
 				while (prev_object) {
+					if (prev_object->common.type !=
+					    ACPI_TYPE_LOCAL_NOTIFY) {
+						break;
+					}
 					next_object =
 					    prev_object->notify.next[i];
 					acpi_ut_update_ref_count(prev_object,
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 14/42] ACPICA: namespace: Recognize alias node types in detach
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (12 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 13/42] ACPICA: Fix object reference update to skip non-local notify types Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 15/42] ACPICA: fix: build error with gcc 16: unused-but-set-variable Maciej Wieczor-Retman
                   ` (27 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: ikaros, linux-acpi, acpica-devel, linux-kernel

From: ikaros <void0red@gmail.com>

Link: https://github.com/acpica/acpica/commit/1ee856f62d40
Closes: https://github.com/open-acpica/acpica/issues/1183
Signed-off-by: ikaros <void0red@gmail.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/nsobject.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/nsobject.c b/drivers/acpi/acpica/nsobject.c
index a4ccacecca53..49d9d917fa73 100644
--- a/drivers/acpi/acpica/nsobject.c
+++ b/drivers/acpi/acpica/nsobject.c
@@ -174,7 +174,9 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node)
 	obj_desc = node->object;
 
 	/* Alias nodes point directly to other namespace nodes; skip teardown */
-	if (node->flags & ANOBJ_IS_ALIAS) {
+	if ((node->type == ACPI_TYPE_LOCAL_ALIAS) ||
+	    (node->type == ACPI_TYPE_LOCAL_METHOD_ALIAS) ||
+	    (node->flags & ANOBJ_IS_ALIAS)) {
 		node->object = NULL;
 		return_VOID;
 	}
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 15/42] ACPICA: fix: build error with gcc 16: unused-but-set-variable
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (13 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 14/42] ACPICA: namespace: Recognize alias node types in detach Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 16/42] ACPICA: parser: Set AML length for bytelist Maciej Wieczor-Retman
                   ` (26 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: purofle, linux-acpi, acpica-devel, linux-kernel

From: purofle <yuguo.or@isrc.iscas.ac.cn>

Since GCC 16, -Wunused-but-set-* warning options have been extended to
have multiple levels controlling what kinds of uses disable the warnings
for variables which are otherwise unused. Older versions of GCC only
implemented what has become -Wunused-but-set-variable=1 or
-Wunused-but-set-parameter=1, while the new default for
-Wunused-but-set-variable or -Wunused-but-set-parameter is =3 (the new
defaults are also used when these warnings are enabled by -Wall or
-Wextra, respectively). =2 ignores pre/post inc/decrements on the
variable, =3 also ignores compound assignments if the LHS variable is
not also used on the RHS.

Use ACPI_UNUSED_VAR on the NumCarats variable. This variable causes the
unused warning because its use is only compiled if ACPI_DEBUG_OUTPUT is
defined.

Link: https://github.com/acpica/acpica/commit/24aa4f85589b
Signed-off-by: purofle <yuguo.or@isrc.iscas.ac.cn>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/nsaccess.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index a0c1a665dfc1..1e7945ccff84 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -292,7 +292,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info,
 	struct acpi_namespace_node *current_node = NULL;
 	struct acpi_namespace_node *this_node = NULL;
 	u32 num_segments;
-	u32 num_carats;
+	u32 ACPI_UNUSED_VAR num_carats;
 	acpi_name simple_name;
 	acpi_object_type type_to_check_for;
 	acpi_object_type this_search_type;
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 16/42] ACPICA: parser: Set AML length for bytelist
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (14 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 15/42] ACPICA: fix: build error with gcc 16: unused-but-set-variable Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 17/42] ACPICA: executer: Fix NULL pointer dereference in AcpiExStoreObjectToIndex() Maciej Wieczor-Retman
                   ` (25 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: Rong Zhang, linux-acpi, acpica-devel, linux-kernel

From: Rong Zhang <i@rong.moe>

The sanity check introduced in [1] leads to failures for
resource templates. AcpiDmIsResourceTemplate compares the Length
variable to BufferLength - the problem being that Length was never
set. This causes the decompiler to decompile valid resource
templates as plain buffers.

Fix it by setting the AML length properly.

[1] https://github.com/open-acpica/acpica/commit/3ce09021b677

Link: https://github.com/acpica/acpica/commit/bb546a65fa3e
Signed-off-by: Rong Zhang <i@rong.moe>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/psargs.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c
index 4643c839df7f..b0f5a11f9696 100644
--- a/drivers/acpi/acpica/psargs.c
+++ b/drivers/acpi/acpica/psargs.c
@@ -760,6 +760,8 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state
 
 				ASL_CV_CAPTURE_COMMENTS_ONLY(parser_state);
 				arg->named.value.size = buffer_length;
+				arg->named.length = (u32)ACPI_PTR_DIFF(
+					pkg_end, parser_state->aml);
 				arg->named.data = parser_state->aml;
 			}
 
@@ -933,9 +935,9 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
 
 			/* Fill in bytelist data */
 
-			arg->common.value.size = (u32)
-			    ACPI_PTR_DIFF(parser_state->pkg_end,
-					  parser_state->aml);
+			arg->common.value.size = arg->named.length =
+				(u32)ACPI_PTR_DIFF(parser_state->pkg_end,
+						   parser_state->aml);
 			arg->named.data = parser_state->aml;
 
 			/* Skip to End of byte data */
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 17/42] ACPICA: executer: Fix NULL pointer dereference in AcpiExStoreObjectToIndex()
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (15 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 16/42] ACPICA: parser: Set AML length for bytelist Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 18/42] ACPICA: compiler: Add _Ixx GPE object Maciej Wieczor-Retman
                   ` (24 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: Dot Slash, linux-acpi, acpica-devel, linux-kernel

Fix a possible NULL pointer dereference when trying to store an empty
buffer into an indexed string or buffer. Source-buffers are only
allocated if the Length is non-zero.

Similarly to AcpiExConvertToInteger() reject empty buffers with an
error.

Link: https://github.com/acpica/acpica/commit/077d74a42549
Reported-by: Dot Slash <jyjuykuytweg@gmail.com>
Closes: https://github.com/open-acpica/acpica/issues/1193
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/exstore.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/exstore.c b/drivers/acpi/acpica/exstore.c
index 86be6bce1648..cd60fc366b08 100644
--- a/drivers/acpi/acpica/exstore.c
+++ b/drivers/acpi/acpica/exstore.c
@@ -295,13 +295,29 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc,
 			break;
 
 		case ACPI_TYPE_BUFFER:
-		case ACPI_TYPE_STRING:
 
-			/* Note: Takes advantage of common string/buffer fields */
+			/*
+			 * A zero-length buffer has no first element and a NULL
+			 * Pointer (see acpi_ut_create_buffer_object). Reject it, as is
+			 * done for the buffer-to-integer conversion.
+			 */
+			if (!source_desc->buffer.length) {
+				ACPI_BIOS_EXCEPTION((
+					AE_INFO, AE_AML_BUFFER_LIMIT,
+					"Source is a zero-length buffer, no data to store"));
+				return_ACPI_STATUS(AE_AML_BUFFER_LIMIT);
+			}
 
 			value = source_desc->buffer.pointer[0];
 			break;
 
+		case ACPI_TYPE_STRING:
+
+			/* A String always has a pointer; a null string stores a zero */
+
+			value = (u8)source_desc->string.pointer[0];
+			break;
+
 		default:
 
 			/* All other types are invalid */
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 18/42] ACPICA: compiler: Add _Ixx GPE object
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (16 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 17/42] ACPICA: executer: Fix NULL pointer dereference in AcpiExStoreObjectToIndex() Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 19/42] ACPICA: namespace: Fix possible underflow and NULL pointer dereference Maciej Wieczor-Retman
                   ` (23 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: linux-acpi, acpica-devel, linux-kernel

ACPI 6.6 specification, chapter 5.6.4.3 mentions an _Ixx object (where
xx is a two-digit hexadecimal number) which presence indicates that the
corresponding GPE is enabled in the low power S0 idle state.

Add a new reserved name type to symbolize an object. Since the
specification mentions that just the presence of the object is required,
any one of Name(), Method(), Device(), etc. with the _Ixx name should be
a valid indication.

Update comments and the disassembler path.

Link: https://github.com/acpica/acpica/commit/7bf643309c2f
Link: https://github.com/open-acpica/acpica/pull/1223
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/acpredef.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/acpica/acpredef.h b/drivers/acpi/acpica/acpredef.h
index 2208dc7aff8d..be44194b0426 100644
--- a/drivers/acpi/acpica/acpredef.h
+++ b/drivers/acpi/acpica/acpredef.h
@@ -152,6 +152,7 @@ enum acpi_return_package_types {
  *              _Qxx EC methods
  *              _T_x compiler temporary variables
  *              _Wxx wake events
+ *              _Ixx indicator for GPEs in low power S0 idle state
  *
  *      2) Predefined names that never actually exist within the AML code:
  *              Predefined resource descriptor field names
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 19/42] ACPICA: namespace: Fix possible underflow and NULL pointer dereference
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (17 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 18/42] ACPICA: compiler: Add _Ixx GPE object Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 20/42] ACPICA: add UBRT (UnifiedBus Root Table) definitions Maciej Wieczor-Retman
                   ` (22 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: linux-acpi, acpica-devel, linux-kernel

AcpiPsGetNextNamestring modifies ParserState.Aml. Since it can take on
the AmlEnd value, further instruction that do Aml++ can cause underflows
on pointer arithmetic that's done to calculate AmlLength. Also the
return value can be NULL which is not checked currently.

Verify that return value is not NULL and check if ParserState.Aml can be
incremented safely.

Link: https://github.com/acpica/acpica/commit/ff5efd5d4ee3
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/nsxfname.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
index fcd94947fedb..c0466139fd96 100644
--- a/drivers/acpi/acpica/nsxfname.c
+++ b/drivers/acpi/acpica/nsxfname.c
@@ -519,6 +519,14 @@ acpi_status acpi_install_method(u8 *buffer)
 	}
 	path = acpi_ps_get_next_namestring(&parser_state);
 
+	/*
+	 * Path can be NULL, and Aml can be pkg_end which combined with the Aml++
+	 * a few lines below will cause aml_length to underflow.
+	 */
+	if (!path || (parser_state.aml >= parser_state.pkg_end)) {
+		return (AE_AML_PACKAGE_LIMIT);
+	}
+
 	method_flags = *parser_state.aml++;
 	aml_start = parser_state.aml;
 	aml_length = (u32)ACPI_PTR_DIFF(parser_state.pkg_end, aml_start);
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 20/42] ACPICA: add UBRT (UnifiedBus Root Table) definitions
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (18 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 19/42] ACPICA: namespace: Fix possible underflow and NULL pointer dereference Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 21/42] ACPICA: Add ACPI_MSG_DEBUG to set KERN_DEBUG for debug output Maciej Wieczor-Retman
                   ` (21 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: Hanjun Guo, linux-acpi, acpica-devel, linux-kernel

From: Hanjun Guo <guohanjun@huawei.com>

Add UBRT table structure definitions as specified in
"UnifiedBus Root Table (UBRT) Specification Revision 1.0" [1].

UBRT table signature was reserved and published in links to ACPI-related
documents: https://uefi.org/acpi.

The UBRT provides the OS with fundamental configuration and architectural
information necessary to initialize and manage the UB device.

This includes:
- UBRT main table structure (ACPI_TABLE_UBRT)
- UBC (UnifiedBus Bus Controller) information sub-table
- UMMU (UnifiedBus Memory Management Unit) information sub-table
- UB Reserved Memory information sub-table

[1]: https://www.unifiedbus.com/en/docs/UB-Root-Table-Spec-1.0-en

Link: https://github.com/acpica/acpica/commit/8565698cefd9
Link: https://github.com/open-acpica/acpica/pull/1211
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 include/acpi/actbl2.h | 153 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 153 insertions(+)

diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 76e4a5bc79b4..dbfea7c8bc00 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -61,6 +61,7 @@
 #define ACPI_SIG_SVKL           "SVKL"	/* Storage Volume Key Location Table */
 #define ACPI_SIG_SWFT           "SWFT"	/* SoundWire File Table */
 #define ACPI_SIG_TDEL           "TDEL"	/* TD Event Log Table */
+#define ACPI_SIG_UBRT           "UBRT"	/* UnifiedBus Root Table */
 
 /*
  * All tables must be byte-packed to match the ACPI specification, since
@@ -3708,6 +3709,158 @@ struct acpi_table_tdel {
 	u64 log_area_start_address;
 };
 
+/*******************************************************************************
+ *
+ * UBRT - UnifiedBus Root Table
+ *        Revision 1
+ *
+ * Conforms to "UnifiedBus Root Table (UBRT) Specification"
+ * Revision 1.0, Release Date 2026-03-05
+ *
+ ******************************************************************************/
+
+struct acpi_table_ubrt {
+	struct acpi_table_header header; /* Common ACPI table header */
+	u32 count; /* Number of sub-tables */
+};
+
+/* UBRT sub-table entry (16 bytes) */
+
+struct acpi_ubrt_subtable {
+	u8 type; /* Sub-table type (0=UBC, 1=UMMU, 2=reserved_mem) */
+	u8 reserved[7]; /* Reserved, must be zero */
+	u64 pointer; /* Physical address of the sub-table */
+};
+
+/* Values for Type field above */
+
+#define ACPI_UBRT_TYPE_UBC 0 /* UBC information sub-table */
+#define ACPI_UBRT_TYPE_UMMU 1 /* UMMU information sub-table */
+#define ACPI_UBRT_TYPE_RESERVED_MEM \
+	2 /* UB reserved memory information sub-table */
+
+/*
+ * UBRT Sub-tables, correspond to Type in struct acpi_ubrt_subtable.
+ * These are accessed via the physical Pointer field - not contiguous with UBRT.
+ */
+
+/* Common header for all UBRT sub-tables */
+
+struct acpi_ubrt_header {
+	char name[16]; /* Table name, null-terminated */
+	u32 total_size; /* Total size including header */
+	u8 version; /* Version number */
+	u8 reserved[3]; /* Reserved, must be zero */
+	u32 remaining_size; /* Remaining size of the sub-table */
+	u32 checksum; /* Entire table must sum to zero */
+};
+
+/* Type 0: UBC Information Table */
+
+struct acpi_ubrt_ubc {
+	struct acpi_ubrt_header header; /* Common sub-table header */
+	u32 local_cna_start; /* Start CNA available for local UBPU */
+	u32 local_cna_end; /* End CNA available for local UBPU (included) */
+	u32 local_eid_start; /* Start EID available for local UBPU */
+	u32 local_eid_end; /* End EID available for local UBPU (included) */
+	u8 feature_sets; /* Features enabled for the UBC */
+	u8 reserved[3]; /* Reserved, must be zero */
+	u16 cluster_mode; /* System operating mode */
+	u16 ubc_count; /* Number of UBC structures */
+};
+
+/* Values for feature_sets field above */
+
+#define ACPI_UBRT_UBC_FEAT_MMIO_TOKEN (1 << 0) /* Bit 0: MMIO token value */
+#define ACPI_UBRT_UBC_FEAT_MCTP_UB (1 << 1) /* Bit 1: MCTP over UB */
+
+/* Values for cluster_mode field above */
+
+#define ACPI_UBRT_CLUSTER_MODE_STANDALONE 0
+#define ACPI_UBRT_CLUSTER_MODE_SUPERPOD 1
+
+/* UBC Structure entry (one per ubc_count) */
+
+struct acpi_ubrt_ubc_entry {
+	u32 interrupt_id_start; /* Start interrupt ID */
+	u32 interrupt_id_end; /* End interrupt ID (included) */
+	u64 hpa_base; /* Base address of available HPA */
+	u64 hpa_size; /* Size of available HPA */
+	u8 memory_size_limit; /* Maximum address bit width */
+	u8 dma_cca; /* DMA and cache coherent attribute */
+	u16 ummu_mapping; /* Mapping between UBC and UMMU */
+	u16 proximity_domain; /* NUMA domain sequence number */
+	u16 reserved; /* Reserved, must be zero */
+	u64 msg_queue_base; /* MSG queue register base address */
+	u64 msg_queue_size; /* MSG queue register size */
+	u16 msg_queue_depth; /* MSG queue depth */
+	u16 msg_queue_interrupt; /* MSG queue interrupt ID */
+	u8 msg_queue_interrupt_attr; /* MSG queue interrupt attribute */
+	u8 reserved1[59]; /* Reserved, must be zero */
+	u8 guid[16]; /* UBC GUID */
+	u8 vendor_info[256]; /* Vendor-defined information */
+};
+
+/* Values for dma_cca field above */
+
+#define ACPI_UBRT_UBC_DMA_ONLY 0
+#define ACPI_UBRT_UBC_DMA_CCA 1
+
+/* Values for msg_queue_interrupt_attr field above */
+
+#define ACPI_UBRT_UBC_MSG_INT_LEVEL (0 << 0) /* Bit 0: level-triggered */
+#define ACPI_UBRT_UBC_MSG_INT_EDGE (1 << 0) /* Bit 0: edge-triggered */
+#define ACPI_UBRT_UBC_MSG_INT_HIGH \
+	(0 << 1) /* Bit 1: high level (rising edge) */
+#define ACPI_UBRT_UBC_MSG_INT_LOW (1 << 1) /* Bit 1: low level (falling edge) */
+
+/* Type 1: UMMU Information Table */
+
+struct acpi_ubrt_ummu {
+	struct acpi_ubrt_header header; /* Common sub-table header */
+	u16 ummu_count; /* Number of UMMU structures */
+	u8 reserved[6]; /* Reserved, must be zero */
+};
+
+/* UMMU Structure entry (one per ummu_count) */
+
+struct acpi_ubrt_ummu_entry {
+	u64 base_address; /* Base address of UMMU register */
+	u64 size; /* Size of UMMU register */
+	u32 reserved; /* Reserved, must be zero */
+	u16 proximity_domain; /* NUMA domain sequence number */
+	u16 reserved1; /* Reserved, must be zero */
+	u64 pmu_base_address; /* PMU register base address */
+	u64 pmu_size; /* PMU register size */
+	u32 reserved2; /* Reserved, must be zero */
+	u32 min_token_id; /* Minimum token_ID */
+	u32 max_token_id; /* Maximum token_ID */
+	u8 reserved3[26]; /* Reserved, must be zero */
+	u16 vendor_id; /* Vendor ID */
+	u8 vendor_info[80]; /* Vendor-defined information */
+};
+
+/* Type 2: UB Reserved Memory Information Table */
+
+struct acpi_ubrt_reserved_mem {
+	struct acpi_ubrt_header header; /* Common sub-table header */
+	u16 memory_ranges_count; /* Number of memory ranges */
+	u8 reserved[6]; /* Reserved, must be zero */
+};
+
+/* Memory Range entry (one per memory_ranges_count) */
+
+struct acpi_ubrt_mem_range {
+	u8 flags; /* Memory segment flags */
+	u8 reserved[7]; /* Reserved, must be zero */
+	u64 memory_base; /* Base address of allocated UB memory (64KB aligned) */
+	u64 memory_size; /* Size of allocated UB memory (64KB aligned) */
+};
+
+/* Values for Flags field above */
+
+#define ACPI_UBRT_MEM_FLAG_1_1_MAPPING (1 << 0) /* Bit 0: 1:1 mapped mode */
+
 /* Reset to default packing */
 
 #pragma pack()
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 21/42] ACPICA: Add ACPI_MSG_DEBUG to set KERN_DEBUG for debug output
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (19 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 20/42] ACPICA: add UBRT (UnifiedBus Root Table) definitions Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 22/42] ACPICA: ACPI 6.5 Add support for the MISC table Maciej Wieczor-Retman
                   ` (20 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: Mario Limonciello (AMD), linux-acpi, acpica-devel, linux-kernel

From: Mario Limonciello (AMD) <superm1@kernel.org>

acpi_debug_print() emits ACPI debug output using multi-part
acpi_os_printf() and acpi_os_vprintf() calls without any loglevel
prefix.

When acpi_os_vprintf() processes a chunk without a loglevel prefix
(printk_get_level() returns 0), it prepends KERN_CONT. Because the initial
header chunk lacks a loglevel prefix, it either attaches to a preceding
unfinalized log message (inheriting its level) or, when split across
printk buffer records, falls back to the default message loglevel rather
than KERN_DEBUG. This can cause dmesg to misinterpret and colorize debug
messages as errors.

Define ACPI_MSG_DEBUG as KERN_DEBUG in aclinux.h (with an empty fallback
in acutils.h for ACPICA OS-independence) and prefix debug message headers
and context switch output in acpi_debug_print() with ACPI_MSG_DEBUG so
that printk records are properly tagged with KERN_DEBUG.

Link: https://github.com/acpica/acpica/commit/802446cd7816
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/acutils.h   | 3 +++
 drivers/acpi/acpica/utdebug.c   | 9 +++++----
 include/acpi/platform/aclinux.h | 1 +
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index 9049bfee409c..6b06f126c653 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -100,6 +100,9 @@ extern const char *acpi_gbl_clock_input_scale[];
 #ifndef ACPI_MSG_BIOS_WARNING
 #define ACPI_MSG_BIOS_WARNING   "Firmware Warning (ACPI): "
 #endif
+#ifndef ACPI_MSG_DEBUG
+#define ACPI_MSG_DEBUG ""
+#endif
 
 /*
  * Common message suffix
diff --git a/drivers/acpi/acpica/utdebug.c b/drivers/acpi/acpica/utdebug.c
index a31e07400c34..d031c5ab63bc 100644
--- a/drivers/acpi/acpica/utdebug.c
+++ b/drivers/acpi/acpica/utdebug.c
@@ -155,9 +155,10 @@ acpi_debug_print(u32 requested_debug_level,
 	thread_id = acpi_os_get_thread_id();
 	if (thread_id != acpi_gbl_previous_thread_id) {
 		if (ACPI_LV_THREADS & acpi_dbg_level) {
-			acpi_os_printf
-			    ("\n**** Context Switch from TID %u to TID %u ****\n\n",
-			     (u32)acpi_gbl_previous_thread_id, (u32)thread_id);
+			acpi_os_printf(ACPI_MSG_DEBUG
+				       "\n**** Context Switch from TID %u to TID %u ****\n\n",
+				       (u32)acpi_gbl_previous_thread_id,
+				       (u32)thread_id);
 		}
 
 		acpi_gbl_previous_thread_id = thread_id;
@@ -168,7 +169,7 @@ acpi_debug_print(u32 requested_debug_level,
 	 * Display the module name, current line number, thread ID (if requested),
 	 * current procedure nesting level, and the current procedure name
 	 */
-	acpi_os_printf("%9s-%04d ", module_name, line_number);
+	acpi_os_printf(ACPI_MSG_DEBUG "%9s-%04d ", module_name, line_number);
 
 #ifdef ACPI_APPLICATION
 	/*
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 9b30bb9ed711..5e2ed5e79d3b 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -169,6 +169,7 @@
 
 #define ACPI_MSG_BIOS_ERROR     KERN_ERR "ACPI BIOS Error (bug): "
 #define ACPI_MSG_BIOS_WARNING   KERN_WARNING "ACPI BIOS Warning (bug): "
+#define ACPI_MSG_DEBUG          KERN_DEBUG
 
 /*
  * Linux wants to use designated initializers for function pointer structs.
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 22/42] ACPICA: ACPI 6.5 Add support for the MISC table
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (20 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 21/42] ACPICA: Add ACPI_MSG_DEBUG to set KERN_DEBUG for debug output Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 23/42] ACPICA: iASL: Complete KEYP support Maciej Wieczor-Retman
                   ` (19 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Maciej Wieczor-Retman, Pawel Chmielewski
  Cc: linux-acpi, acpica-devel, linux-kernel

From: Pawel Chmielewski <pawel.chmielewski@intel.com>

ACPI 6.5 Introduces MISC table and the definition for Miscellaneous GUIDed
Table Entries. This commit adds support for this table, specifically in
compiler, disassembler and template generator.
Refer to section 5.2.33. "Miscellaneous GUIDed Table Entries" of ACPI
6.5 specification for further information.

Link: https://github.com/acpica/acpica/commit/727cd62d95fc
Link: https://github.com/open-acpica/acpica/pull/1199
Signed-off-by: Pawel Chmielewski <pawel.chmielewski@intel.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 include/acpi/actbl2.h | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index dbfea7c8bc00..3f6e093133c7 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -38,6 +38,7 @@
 #define ACPI_SIG_MADT           "APIC"	/* Multiple APIC Description Table */
 #define ACPI_SIG_MCFG           "MCFG"	/* PCI Memory Mapped Configuration table */
 #define ACPI_SIG_MCHI           "MCHI"	/* Management Controller Host Interface table */
+#define ACPI_SIG_MISC           "MISC"	/* Miscellaneous GUIDed Table */
 #define ACPI_SIG_MPAM           "MPAM"	/* Memory System Resource Partitioning and Monitoring Table */
 #define ACPI_SIG_MPST           "MPST"	/* Memory Power State Table */
 #define ACPI_SIG_MRRM           "MRRM"	/* Memory Range and Region Mapping table */
@@ -1876,6 +1877,35 @@ struct acpi_table_mchi {
 	u8 pci_function;
 };
 
+/*******************************************************************************
+ *
+ * MISC - Miscellaneous GUIDed Table
+ *
+ * Conforms to section "Miscellaneous GUIDed Table Entries" of ACPI
+ * Specification v6.5
+ *
+ ******************************************************************************/
+
+struct acpi_misc_guid_entry {
+	u8 entry_guid[16];
+	u32 entry_length;
+	u32 revision;
+	char producer_id[ACPI_NAMESEG_SIZE] ACPI_NONSTRING; /* ACPI Vendor ID */
+	u8 data[];
+};
+
+/* Minimum length of a MISC entry (the header fields, without any Data) */
+
+#define ACPI_MISC_MIN_ENTRY_LENGTH 28
+
+struct acpi_table_misc {
+	struct acpi_table_header header; /* Common ACPI table header */
+	/*
+	 * Immediately followed by one or more variable-length entries:
+	 * struct acpi_misc_guid_entry Entries[];
+	 */
+};
+
 /*******************************************************************************
  *
  * MPAM - Memory System Resource Partitioning and Monitoring
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 23/42] ACPICA: iASL: Complete KEYP support
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (21 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 22/42] ACPICA: ACPI 6.5 Add support for the MISC table Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 24/42] ACPICA: iASL: Fix the truncated count of external control methods Maciej Wieczor-Retman
                   ` (18 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: linux-acpi, acpica-devel, linux-kernel

From: Pawel Chmielewski <pawel.chmielewski@intel.com>

Add the iASL disassembler, table compiler, and template support for the
KEYP (Key Programming Interface for Root Complex Integrity and Data
Encryption) table.

Add the KEYP entry to the supported-tables list and introduce an
ACPI_DMT_KEYP opcode so the subtable Type field decodes to a name.

Link: https://github.com/acpica/acpica/commit/39bcadc69364
Link: https://github.com/open-acpica/acpica/pull/1204
Signed-off-by: Pawel Chmielewski <pawel.chmielewski@intel.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 include/acpi/actbl2.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 3f6e093133c7..9af7c51d1297 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -1177,6 +1177,7 @@ struct acpi_keyp_common_header {
 
 enum acpi_keyp_type {
 	ACPI_KEYP_TYPE_CONFIG_UNIT = 0,
+	ACPI_KEYP_TYPE_RESERVED = 1,
 };
 
 /* Root Port Information Structure */
@@ -1206,6 +1207,10 @@ enum acpi_keyp_protocol_type {
 	ACPI_KEYP_PROTO_TYPE_RESERVED
 };
 
+/* Only version 1 of the KCU Structure is currently defined in the spec */
+
+#define ACPI_KEYP_CONFIG_UNIT_VERSION 1
+
 #define ACPI_KEYP_F_TVM_USABLE      (1)
 
 /*******************************************************************************
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 24/42] ACPICA: iASL: Fix the truncated count of external control methods
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (22 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 23/42] ACPICA: iASL: Complete KEYP support Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 25/42] ACPICA: release: Update version to 20260930 Maciej Wieczor-Retman
                   ` (17 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: abhinavmir, linux-acpi, acpica-devel, linux-kernel

AcpiGbl_NumExternalMethods counts the external control methods that the
disassembler finds in a table. Its type is BOOLEAN, which is an unsigned
char, so the counter wraps at 256. A table with more than 255 external
control methods gets a wrong count.

The wrong count makes the disassembler print a bogus warning.
AcpiGbl_ResolvedExternalMethods is a UINT32 and keeps the correct value.
The two counts then differ, even when the disassembler resolves every
method. AcpiDmUnresolvedWarning() subtracts the counts to get the number
of unresolved methods. That unsigned subtraction wraps and gives a very
large number. A table with 300 externals, all of them resolved, reports
"There were 44 external control methods found during disassembly, but
only 300 were resolved (4294967040 unresolved)".

A count that is an exact multiple of 256 truncates to zero. In that case
AcpiDmUnresolvedWarning() returns early and prints no warning at all,
even when methods stay unresolved.

Change the type of AcpiGbl_NumExternalMethods to UINT32, which is the
type of AcpiGbl_ResolvedExternalMethods.

Link: https://github.com/acpica/acpica/commit/36a5217a09bd
Link: https://github.com/open-acpica/acpica/pull/1221
Originally-by: abhinavmir <atg271@gmail.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/acglobal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index b6e31517650e..9a2798896d48 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -287,7 +287,7 @@ ACPI_INIT_GLOBAL(ACPI_PARSE_OBJECT_LIST, *acpi_gbl_temp_list_head, NULL);
 
 ACPI_GLOBAL(u8, acpi_gbl_dm_opt_disasm);
 ACPI_GLOBAL(u8, acpi_gbl_dm_opt_listing);
-ACPI_GLOBAL(u8, acpi_gbl_num_external_methods);
+ACPI_GLOBAL(u32, acpi_gbl_num_external_methods);
 ACPI_GLOBAL(u32, acpi_gbl_resolved_external_methods);
 ACPI_GLOBAL(struct acpi_external_list *, acpi_gbl_external_list);
 ACPI_GLOBAL(struct acpi_external_file *, acpi_gbl_external_file_list);
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 25/42] ACPICA: release: Update version to 20260930
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (23 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 24/42] ACPICA: iASL: Fix the truncated count of external control methods Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 26/42] ACPICA: actbl2: MPAM: adapt to MPAM ACPI spec v3.1 Maciej Wieczor-Retman
                   ` (16 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: linux-acpi, acpica-devel, linux-kernel

Write most relevant changes that happened since the last release. Move
the release notes to a markdown file for nice formatting compared to the
currently used txt file. Finally update the release number.

Link: https://github.com/acpica/acpica/commit/e85aa3bebaae
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 include/acpi/acpixf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 9557462e0be8..051ea76b7f5d 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -12,7 +12,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20260408
+#define ACPI_CA_VERSION                 0x20260930
 
 #include <acpi/acconfig.h>
 #include <acpi/actypes.h>
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 26/42] ACPICA: actbl2: MPAM: adapt to MPAM ACPI spec v3.1
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (24 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 25/42] ACPICA: release: Update version to 20260930 Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 27/42] ACPICA: Executer: Resolve package index references used as integer operands Maciej Wieczor-Retman
                   ` (15 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Hanjun Guo, Sudeep Holla, Catalin Marinas,
	Will Deacon, Rafael J. Wysocki, Len Brown, Maciej Wieczor-Retman,
	Pawel Chmielewski
  Cc: Andre Przywara, linux-acpi, linux-arm-kernel, linux-kernel, acpica-devel

From: Andre Przywara <andre.przywara@arm.com>

The latest edition of the "ACPI for MPAM Platform Design Document" (ARM
DEN0065C [1]) re-purposes the current Reserved2 field in the MPAM ACPI
table to hold an offset value for the MPAM Firmware backed interface.
Also the MSC structure gets abstracted a bit, which renames the Reserved
field to type, although it stays at 0, for the time being.

Rename and describe the new fields in the table struct definition.

[1] https://support.arm.com/documentation/den0065/latest

Link: https://github.com/acpica/acpica/commit/4f4a36a99c1d
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/arm64/mpam.c | 6 +++---
 include/acpi/actbl2.h     | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/arm64/mpam.c b/drivers/acpi/arm64/mpam.c
index c57bd367922b..671ba501379a 100644
--- a/drivers/acpi/arm64/mpam.c
+++ b/drivers/acpi/arm64/mpam.c
@@ -331,14 +331,14 @@ static int __init acpi_mpam_parse(void)
 		table_offset += tbl_msc->length;
 
 		/*
-		 * If any of the reserved fields are set, make no attempt to
-		 * parse the MSC structure. This MSC will still be counted by
+		 * If the reserved1 field is set, make no attempt to parse the
+		 * MSC structure. This MSC will still be counted by
 		 * acpi_mpam_count_msc(), meaning the MPAM driver can't probe
 		 * against all MSC, and will never be enabled. There is no way
 		 * to enable it safely, because we cannot determine safe
 		 * system-wide partid and pmg ranges in this situation.
 		 */
-		if (tbl_msc->reserved || tbl_msc->reserved1 || tbl_msc->reserved2) {
+		if (tbl_msc->reserved1) {
 			pr_err_once("Unrecognised MSC, MPAM not usable\n");
 			pr_debug("MSC.%u: reserved field set\n", tbl_msc->identifier);
 			continue;
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 9af7c51d1297..8e0d5156e6d6 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -2004,7 +2004,7 @@ struct acpi_mpam_resource_node {
 struct acpi_mpam_msc_node {
 	u16 length;
 	u8 interface_type;
-	u8 reserved;
+	u8 type;
 	u32 identifier;
 	u64 base_address;
 	u32 mmio_size;
@@ -2014,7 +2014,7 @@ struct acpi_mpam_msc_node {
 	u32 overflow_interrupt_affinity;
 	u32 error_interrupt;
 	u32 error_interrupt_flags;
-	u32 reserved2;
+	u32 mpam_fb_offset;
 	u32 error_interrupt_affinity;
 	u32 max_nrdy_usec;
 	u64 hardware_id_linked_device;
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 27/42] ACPICA: Executer: Resolve package index references used as integer operands
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (25 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 26/42] ACPICA: actbl2: MPAM: adapt to MPAM ACPI spec v3.1 Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 28/42] ACPICA: tables: Fix table buffer leak when Load fails verification Maciej Wieczor-Retman
                   ` (14 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: Leonard Lausen, linux-acpi, acpica-devel, linux-kernel

From: Leonard Lausen <leonard@lausen.nl>

Resolving a Local or Arg retrieves its stored object but does not resolve
an Index reference stored there to the referenced package element. When
that reference is used as an integer operand, implicit conversion rejects
it with AE_AML_OPERAND_TYPE.

This prevents FAN0._FST on the Samsung Galaxy Book 930XDB from returning
status whenever the fan is running. The method stores an Index reference
into its fan-speed table in Local1 and then uses Add (Local1, 10, Local1).

Resolve a remaining package Index reference before integer conversion.
Release the replaced reference inside AcpiExResolveObjectToValue() - it
seems to be missing there with even a comment mentioning the
non-existant reference removal. Limit this to integer operands so Store,
CopyObject and method calls continue to preserve references. Leave
Increment and Decrement's synthetic operand resolution unchanged; their
reference-target handling requires a separate fix.

Add a standalone ASL regression covering local and argument inputs,
integer conversion, reference preservation, target replacement and invalid
operands. The extracted fan method also returns the expected status for
all defined fan states with this change.

Link: https://github.com/acpica/acpica/commit/aaa58f4b62a9
Link: https://github.com/open-acpica/acpica/issues/908
Signed-off-by: Leonard Lausen <leonard@lausen.nl>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/exresop.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/acpi/acpica/exresop.c b/drivers/acpi/acpica/exresop.c
index 8127d4046d0b..87d04b74e13e 100644
--- a/drivers/acpi/acpica/exresop.c
+++ b/drivers/acpi/acpica/exresop.c
@@ -375,6 +375,32 @@ acpi_ex_resolve_operands(u16 opcode,
 			 */
 		case ARGI_INTEGER:
 
+			/*
+			 * Resolving an Arg or Local can leave an Index reference to a
+			 * package element. Resolve that element before integer conversion,
+			 * without changing reference-preserving operands such as Store.
+			 * Leave the synthetic operand resolution used by Increment and
+			 * Decrement unchanged; those operators also need reference-target
+			 * handling when writing their result.
+			 */
+			if ((walk_state->opcode != AML_INCREMENT_OP) &&
+			    (walk_state->opcode != AML_DECREMENT_OP) &&
+			    (obj_desc->common.type ==
+			     ACPI_TYPE_LOCAL_REFERENCE) &&
+			    (obj_desc->reference.class ==
+			     ACPI_REFCLASS_INDEX) &&
+			    (obj_desc->reference.target_type ==
+			     ACPI_TYPE_PACKAGE)) {
+				status = acpi_ex_resolve_to_value(stack_ptr,
+								  walk_state);
+				if (ACPI_FAILURE(status)) {
+					return_ACPI_STATUS(status);
+				}
+
+				acpi_ut_remove_reference(obj_desc);
+				obj_desc = *stack_ptr;
+			}
+
 			/*
 			 * Need an operand of type ACPI_TYPE_INTEGER, but we can
 			 * implicitly convert from a STRING or BUFFER.
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 28/42] ACPICA: tables: Fix table buffer leak when Load fails verification
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (26 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 27/42] ACPICA: Executer: Resolve package index references used as integer operands Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 29/42] ACPICA: parser: Fix parse tree memory leak on AML execution error unwind Maciej Wieczor-Retman
                   ` (13 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: Pawel Chmielewski, linux-acpi, acpica-devel, linux-kernel

From: Pawel Chmielewski <pawel.chmielewski@linux.intel.com>

Commit "Improve error handling in table loading process to ensure proper
cleanup on failure" removed the ACPI_FREE of the table buffer from the
error path of AcpiExLoadOp, assuming lower layers always release it.
That holds only when the table was installed and AcpiTbLoadTable failed.

If AcpiTbVerifyTempTable fails in AcpiTbInstallStandardTable (e.g.
AE_ALREADY_EXISTS when the table is already loaded), the error path
calls AcpiTbReleaseTempTable, which is a no-op for
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL. The buffer allocated by the Load
operator leaks on every failed Load.

Make AcpiTbInstallAndLoadTable always consume an INTERNAL_VIRTUAL
table and free it when AcpiTbInstallStandardTable fails. Document
this in the function header and fix the comment in AcpiExLoadOp.
Verified with acpiexec by executing Load twice on the same SSDT buffer.

Link: https://github.com/acpica/acpica/commit/bc6a09d20be6
Signed-off-by: Pawel Chmielewski <pawel.chmielewski@linux.intel.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/exconfig.c |  8 ++------
 drivers/acpi/acpica/tbdata.c   | 12 +++++++++++-
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/acpica/exconfig.c b/drivers/acpi/acpica/exconfig.c
index cb2eed531c67..2354755ce8b3 100644
--- a/drivers/acpi/acpica/exconfig.c
+++ b/drivers/acpi/acpica/exconfig.c
@@ -461,12 +461,8 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
 	acpi_ex_enter_interpreter();
 	if (ACPI_FAILURE(status)) {
 
-		/*
-		 * Table buffer is already freed by acpi_tb_uninstall_table
-		 * in acpi_tb_install_and_load_table if installation succeeded,
-		 * or by acpi_tb_uninstall_table in acpi_tb_install_standard_table
-		 * if verification failed after partial setup.
-		 */
+		/* Table buffer is already freed by acpi_tb_install_and_load_table */
+
 		return_ACPI_STATUS(status);
 	}
 
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index 8185c6f7ce23..c756d34eeb44 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -995,7 +995,9 @@ acpi_tb_load_table(u32 table_index, struct acpi_namespace_node *parent_node)
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Install and load an ACPI table
+ * DESCRIPTION: Install and load an ACPI table. An internally allocated
+ *              table (ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL) is always consumed,
+ *              on failure it is freed here.
  *
  ******************************************************************************/
 
@@ -1015,6 +1017,14 @@ acpi_tb_install_and_load_table(acpi_physical_address address,
 	status = acpi_tb_install_standard_table(address, flags, table, TRUE,
 						override, &i);
 	if (ACPI_FAILURE(status)) {
+		/*
+		 * Table was not installed (e.g. it is a duplicate or failed
+		 * verification), so nobody else will free an internal buffer
+		 */
+		if ((flags & ACPI_TABLE_ORIGIN_MASK) ==
+		    ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL) {
+			ACPI_FREE(table);
+		}
 		goto exit;
 	}
 
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 29/42] ACPICA: parser: Fix parse tree memory leak on AML execution error unwind
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (27 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 28/42] ACPICA: tables: Fix table buffer leak when Load fails verification Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 30/42] ACPICA: IORT: Add Root Complex PASID Flags field Maciej Wieczor-Retman
                   ` (12 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: Iurii Trukhin, linux-acpi, acpica-devel, linux-kernel

From: Iurii Trukhin <yuri@trukhin.com>

AcpiPsCompleteThisOp() checks WalkState->OpInfo->Class when deciding
whether to defer deletion of an AML_CLASS_ARGUMENT parse object to its
parent. During error unwind, however, WalkState->OpInfo can still refer
to the child that failed while Op refers to an enclosing scope.

If that child is an AML_INT_NAMEPATH_OP, the enclosing parse subtrees
are skipped as well. A nested control method has RootOp = NULL, so an
unattached top-level If subtree can leak on every failed evaluation.

Look up the opcode class of Op directly and only defer argument-object
deletion when Op has a parent. Preserve WalkState->Opcode, which the
parser still uses when skipping failed module-level scopes. Remove the
extra region-error AcpiPsDeleteParseTree() call now that completion owns
that deletion, and return discarded control states through
AcpiUtDeleteGenericState() instead of freeing cached objects directly.

Tested with native iASL and acpiexec using a nested _GPE._L6F method
whose If predicate calls a missing external _STA method. The unpatched
interpreter leaves 64 parse objects after 32 evaluations; the patched
interpreter leaves none. Both retain the expected AE_NOT_FOUND result.
Normal If/Return evaluations continue to return 0 and 42.

Link: https://github.com/acpica/acpica/commit/2627fccee606
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221241
Link: https://lore.kernel.org/all/CAOx7e9+Vv8Pdyks=AbE5XG0ZyDgtKToKyBLTnt+H5RPn6VymVg@mail.gmail.com/
Signed-off-by: Iurii Trukhin <yuri@trukhin.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/psloop.c   |  5 +++--
 drivers/acpi/acpica/psobject.c |  1 -
 drivers/acpi/acpica/psparse.c  | 16 ++++++++++++----
 3 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/acpica/psloop.c b/drivers/acpi/acpica/psloop.c
index 24a57f971c96..f67bc2f3dc42 100644
--- a/drivers/acpi/acpica/psloop.c
+++ b/drivers/acpi/acpica/psloop.c
@@ -464,8 +464,9 @@ acpi_status acpi_ps_parse_loop(struct acpi_walk_state *walk_state)
 						walk_state->aml =
 						    parser_state->aml;
 					}
-					ACPI_FREE(acpi_ut_pop_generic_state
-						  (&walk_state->control_state));
+					acpi_ut_delete_generic_state(
+						acpi_ut_pop_generic_state(
+							&walk_state->control_state));
 				}
 				op = NULL;
 				continue;
diff --git a/drivers/acpi/acpica/psobject.c b/drivers/acpi/acpica/psobject.c
index 629cafab1930..f1425b98087b 100644
--- a/drivers/acpi/acpica/psobject.c
+++ b/drivers/acpi/acpica/psobject.c
@@ -559,7 +559,6 @@ acpi_ps_complete_op(struct acpi_walk_state *walk_state,
 								node);
 					acpi_ns_remove_node((*op)->common.node);
 					(*op)->common.node = NULL;
-					acpi_ps_delete_parse_tree(*op);
 				}
 
 				status2 =
diff --git a/drivers/acpi/acpica/psparse.c b/drivers/acpi/acpica/psparse.c
index 42ec8abef626..aa89bad57647 100644
--- a/drivers/acpi/acpica/psparse.c
+++ b/drivers/acpi/acpica/psparse.c
@@ -108,6 +108,7 @@ acpi_ps_complete_this_op(struct acpi_walk_state *walk_state,
 {
 	union acpi_parse_object *prev;
 	union acpi_parse_object *next;
+	const struct acpi_opcode_info *op_info;
 	const struct acpi_opcode_info *parent_info;
 	union acpi_parse_object *replacement_op = NULL;
 	acpi_status status = AE_OK;
@@ -122,11 +123,18 @@ acpi_ps_complete_this_op(struct acpi_walk_state *walk_state,
 
 	acpi_ex_stop_trace_opcode(op, walk_state);
 
-	/* Delete this op and the subtree below it if asked to */
-
+	/*
+	 * Delete this op and the subtree below it if asked to
+	 *
+	 * Derive op_info from Op instead of using walk_state->op_info. While they are
+	 * often synonymous it is different during error unwind (in acpi_ps_complete_op).
+	 * Then the latter can describe a failed child object instead of the enclosing
+	 * operation that we want to handle here.
+	 */
+	op_info = acpi_ps_get_opcode_info(op->common.aml_opcode);
 	if (((walk_state->parse_flags & ACPI_PARSE_TREE_MASK) !=
-	     ACPI_PARSE_DELETE_TREE)
-	    || (walk_state->op_info->class == AML_CLASS_ARGUMENT)) {
+	     ACPI_PARSE_DELETE_TREE) ||
+	    ((op_info->class == AML_CLASS_ARGUMENT) && op->common.parent)) {
 		return_ACPI_STATUS(AE_OK);
 	}
 
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 30/42] ACPICA: IORT: Add Root Complex PASID Flags field
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (28 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 29/42] ACPICA: parser: Fix parse tree memory leak on AML execution error unwind Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 31/42] ACPICA: events: Add missing event mutex to AcpiEvClearGpeDispatchByOwner() Maciej Wieczor-Retman
                   ` (11 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Maciej Wieczor-Retman, Pawel Chmielewski
  Cc: Vidya Sagar, Rafael J. Wysocki, linux-acpi, acpica-devel, linux-kernel

From: Vidya Sagar <vidyas@nvidia.com>

The IORT spec, Issue E.c (ARM DEN 0049E.c, January 2022), bumps the
Root Complex Node to revision 4 and adds two PASID descriptors:

  - PASID Capabilities at byte offset 33 (2 bytes), bits[4:0] of which
    report the Max PASID Width supported by the Root Complex.
  - Flags at byte offset 36 (4 bytes), bit 0 of which reports whether
    the Root Complex itself supports PASID. This is distinct from the
    existing ATS Attribute bit 2 (at offset 24) that only reports
    whether the RC forwards PASID information on translated
    transactions.

ACPI_IORT_ROOT_COMPLEX in source/include/actbl2.h was updated for the
E.c PASID Capabilities descriptor (offset 33) but stops short with a
trailing 'UINT8 Reserved[]' flexible array, so the new Flags field at
offset 36 is unreachable and the existing ACPI_IORT_PASID_*
definitions have no consumer.

Replace the trailing flexible array with a fixed 'UINT8 Reserved[1]'
followed by 'UINT32 Flags' so the struct fully covers RC node
revision 4, and add the ACPI_IORT_RC_PASID_SUPPORTED mask for bit 0
of the new field. With #pragma pack(1) in effect for actbl2.h, this
lands the new field at the spec-mandated absolute offset 36.

Link: https://github.com/acpica/acpica/commit/21e638b5d118
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Link: https://github.com/open-acpica/acpica/pull/1246
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 include/acpi/actbl2.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 8e0d5156e6d6..1dafb2a71368 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -750,7 +750,8 @@ struct acpi_iort_root_complex {
 	u32 pci_segment_number;
 	u8 memory_address_limit;	/* Memory address size limit */
 	u16 pasid_capabilities;	/* PASID Capabilities */
-	u8 reserved[];		/* Reserved, must be zero */
+	u8 reserved[1]; /* Reserved, must be zero */
+	u32 flags; /* Flags (IORT E.c, RC node revision >= 4) */
 };
 
 /* Masks for ats_attribute field above */
@@ -762,6 +763,9 @@ struct acpi_iort_root_complex {
 /* Masks for pasid_capabilities field above */
 #define ACPI_IORT_PASID_MAX_WIDTH       (0x1F)	/* Bits 0-4 */
 
+/* Masks for Flags field above */
+#define ACPI_IORT_RC_PASID_SUPPORTED (1) /* The root complex PASID support */
+
 struct acpi_iort_smmu {
 	u64 base_address;	/* SMMU base address */
 	u64 span;		/* Length of memory range */
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 31/42] ACPICA: events: Add missing event mutex to AcpiEvClearGpeDispatchByOwner()
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (29 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 30/42] ACPICA: IORT: Add Root Complex PASID Flags field Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 32/42] ACPICA: events: Remove redundant code Maciej Wieczor-Retman
                   ` (10 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: linux-acpi, acpica-devel, linux-kernel

While AcpiEvClearGpeDispatchByOwner() holds the global spinlock there
are other GPE related functions that work on GPE blocks and they acquire
the ACPI_MTX_EVENTS mutex.

Acquire the same mutex around handling GPE blocks to avoid any races
between the different functions.

Link: https://github.com/acpica/acpica/commit/fa543fc1bab6
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/evgpe.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index 93e205c0709e..f74805507529 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -576,6 +576,11 @@ acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
 		return_ACPI_STATUS(AE_OK);
 	}
 
+	status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
+	if (ACPI_FAILURE(status)) {
+		return_ACPI_STATUS(status);
+	}
+
 	flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
 
 	/* Walk all GPE interrupt blocks */
@@ -629,6 +634,7 @@ acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
 	}
 
 	acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
+	(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
 	return_ACPI_STATUS(status);
 }
 
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 32/42] ACPICA: events: Remove redundant code
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (30 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 31/42] ACPICA: events: Add missing event mutex to AcpiEvClearGpeDispatchByOwner() Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 33/42] ACPICA: events: Fix AcpiEvClearGpeDispatchByOwner handler type processing Maciej Wieczor-Retman
                   ` (9 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: linux-acpi, acpica-devel, linux-kernel

This snippet happens inside the case part of a switch/case statement. It
only checks whether the switch and case value match which makes no sense
since they will always match. Remove the check.

Link: https://github.com/acpica/acpica/commit/a7f8f92b0422
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/evgpe.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index f74805507529..578651cde6f3 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -489,18 +489,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
 
 	case ACPI_GPE_DISPATCH_METHOD:
 
-		/*
-		 * Re-check dispatch type. The table may have been unloaded
-		 * and its GPE dispatch cleared while we were waiting.
-		 */
-		if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) !=
-		    ACPI_GPE_DISPATCH_METHOD) {
-			ACPI_DEBUG_PRINT(
-				(ACPI_DB_EVENTS,
-				 "GPE method dispatch cleared during wait\n"));
-			goto error_exit;
-		}
-
 		/* Allocate the evaluation information block */
 
 		info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_evaluate_info));
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 33/42] ACPICA: events: Fix AcpiEvClearGpeDispatchByOwner handler type processing
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (31 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 32/42] ACPICA: events: Remove redundant code Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 34/42] ACPICA: events: Fix GPE cleanup return after changing program state Maciej Wieczor-Retman
                   ` (8 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: linux-acpi, acpica-devel, linux-kernel

GPEs can have different callbacks tied to them - methods, notifies and
handlers. Handlers, usually being functions called from C drivers,
override methods, but they save the pointer to them and restore them
later when handlers are unloaded.

Check and clear the methods hidden under the handler.

Link: https://github.com/acpica/acpica/commit/578d52b5d1f4
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/evgpe.c | 103 +++++++++++++++++++++++++++++++++---
 1 file changed, 96 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index 578651cde6f3..d45926ad3261 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -535,6 +535,67 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
 }
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ev_dispatch_type_hidden_handler
+ *
+ * PARAMETERS:  gpe_event_info  - Struct where GPE dispatch type is stored
+ *              owner_id        - Table owner_id being unloaded that should match
+ *                                the gpe_event_info
+ *
+ * RETURN:      Return the dispatch type if it is either explicitly present or
+ *              hidden behind the handler saved method_node. The GPE has to also
+ *              match the table ID passed through owner_id to this function.
+ *              Return 0 if the above criteria aren't matched.
+ *
+ * DESCRIPTION: Check whether a passed GPE event info is of either DISPATCH,
+ *              NOTIFY or HANDLER type. Then verify it belongs to the table
+ *              ID passed as an argument and that it has a Method Node. Helper
+ *              is used for example with cleaning up after table unloading.
+ *
+ ******************************************************************************/
+static u8
+acpi_ev_dispatch_type_hidden_handler(struct acpi_gpe_event_info *gpe_event_info,
+				     acpi_owner_id owner_id)
+{
+	u8 gpe_dispatch_type = ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags);
+	struct acpi_gpe_handler_info *handler;
+
+	switch (gpe_dispatch_type) {
+	case ACPI_GPE_DISPATCH_METHOD:
+		if (!(gpe_event_info->dispatch.method_node) ||
+		    (gpe_event_info->dispatch.method_node->owner_id !=
+		     owner_id)) {
+			return 0;
+		}
+		break;
+
+	/* Method or Notify can be saved if the handler is present */
+	case ACPI_GPE_DISPATCH_HANDLER:
+	case ACPI_GPE_DISPATCH_RAW_HANDLER:
+		handler = gpe_event_info->dispatch.handler;
+		if (!(handler->method_node)) {
+			return 0;
+		}
+
+		switch (ACPI_GPE_DISPATCH_TYPE(handler->original_flags)) {
+		case ACPI_GPE_DISPATCH_METHOD:
+			if (handler->method_node->owner_id != owner_id) {
+				return 0;
+			}
+			break;
+		default:
+			return 0;
+		}
+
+		break;
+
+	default:
+		return 0;
+	}
+	return gpe_dispatch_type;
+}
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ev_clear_gpe_dispatch_by_owner
@@ -557,6 +618,8 @@ acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
 	u32 gpe_number;
 	acpi_cpu_flags flags;
 	acpi_status status = AE_OK;
+	u32 gpe_dispatch_type;
+	struct acpi_gpe_handler_info *handler;
 
 	ACPI_FUNCTION_TRACE_U32(ev_clear_gpe_dispatch_by_owner, owner_id);
 
@@ -584,13 +647,15 @@ acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
 				gpe_event_info =
 					&gpe_block->event_info[gpe_number];
 
-				if ((ACPI_GPE_DISPATCH_TYPE(
-					     gpe_event_info->flags) ==
-				     ACPI_GPE_DISPATCH_METHOD) &&
-				    (gpe_event_info->dispatch.method_node) &&
-				    (gpe_event_info->dispatch.method_node
-					     ->owner_id == owner_id)) {
-					/* GPE method belongs to table being unloaded */
+				gpe_dispatch_type =
+					acpi_ev_dispatch_type_hidden_handler(
+						gpe_event_info, owner_id);
+				switch (gpe_dispatch_type) {
+				case ACPI_GPE_DISPATCH_METHOD:
+					/*
+					 * GPE method belongs to table being unloaded. Clear
+					 * only the dispatch type, preserve other flags.
+					 */
 
 					if (gpe_event_info
 						    ->disable_for_dispatch) {
@@ -612,6 +677,30 @@ acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
 							gpe_event_info,
 							ACPI_GPE_DISABLE);
 					}
+					break;
+
+				case ACPI_GPE_DISPATCH_HANDLER:
+				case ACPI_GPE_DISPATCH_RAW_HANDLER:
+
+					handler =
+						gpe_event_info->dispatch.handler;
+					gpe_dispatch_type =
+						ACPI_GPE_DISPATCH_TYPE(
+							handler->original_flags);
+
+					/* Forget the hidden method so handler removal can't restore it */
+					if (gpe_dispatch_type ==
+					    ACPI_GPE_DISPATCH_METHOD) {
+						handler->method_node = NULL;
+						handler->original_flags &=
+							~ACPI_GPE_DISPATCH_MASK; /* -> NONE */
+						handler->originally_enabled =
+							FALSE;
+					}
+					break;
+
+				default:
+					break;
 				}
 			}
 
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 34/42] ACPICA: events: Fix GPE cleanup return after changing program state
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (32 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 33/42] ACPICA: events: Fix AcpiEvClearGpeDispatchByOwner handler type processing Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 35/42] ACPICA: events: Handle GPEs' Notify dispatch type Maciej Wieczor-Retman
                   ` (7 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: linux-acpi, acpica-devel, linux-kernel

If a GPE dispatch method or notify is currently getting executed or is
set to polling etc. its table can't be freed. However the original
commit ("ACPICA: Events: Clear GPE dispatch by owner during table
unload") that tried to fix this problem would check this condition while
some GPE methods already got disabled.

First parse all the GPE blocks and look if at least one element is
blocked from being freed. If so abort the cleanup operation.

Link: https://github.com/acpica/acpica/commit/97f12aaf72cc
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/evgpe.c | 49 +++++++++++++++++++++++++++++--------
 1 file changed, 39 insertions(+), 10 deletions(-)

diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index d45926ad3261..5c283a2faaf0 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -636,6 +636,43 @@ acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
 
 	/* Walk all GPE interrupt blocks */
 
+	gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head;
+	while (gpe_xrupt_info) {
+		gpe_block = gpe_xrupt_info->gpe_block_list_head;
+		while (gpe_block) {
+			/*
+			 * Walk all GPEs in this block to make sure none are blocked from
+			 * getting cleared with disable_for_dispatch
+			 */
+
+			for (gpe_number = 0; gpe_number < gpe_block->gpe_count;
+			     gpe_number++) {
+				gpe_event_info =
+					&gpe_block->event_info[gpe_number];
+				gpe_dispatch_type =
+					acpi_ev_dispatch_type_hidden_handler(
+						gpe_event_info, owner_id);
+				if ((gpe_dispatch_type ==
+					     ACPI_GPE_DISPATCH_METHOD ||
+				     gpe_dispatch_type ==
+					     ACPI_GPE_DISPATCH_NOTIFY) &&
+				    gpe_event_info->disable_for_dispatch) {
+					/* At least one handler is polling or executing, cannot clear */
+					status = AE_ABORT_METHOD;
+					acpi_os_release_lock(acpi_gbl_gpe_lock,
+							     flags);
+					(void)acpi_ut_release_mutex(
+						ACPI_MTX_EVENTS);
+					return_ACPI_STATUS(status);
+				}
+			}
+
+			gpe_block = gpe_block->next;
+		}
+
+		gpe_xrupt_info = gpe_xrupt_info->next;
+	}
+
 	gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head;
 	while (gpe_xrupt_info) {
 		gpe_block = gpe_xrupt_info->gpe_block_list_head;
@@ -656,17 +693,10 @@ acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
 					 * GPE method belongs to table being unloaded. Clear
 					 * only the dispatch type, preserve other flags.
 					 */
-
-					if (gpe_event_info
-						    ->disable_for_dispatch) {
-						/* Handler is executing, cannot clear */
-						status = AE_ABORT_METHOD;
-					} else {
-						/* Clear only the dispatch type, preserve other flags */
 						gpe_event_info->flags &=
 							~ACPI_GPE_DISPATCH_MASK;
-						gpe_event_info->dispatch
-							.method_node = NULL;
+					gpe_event_info->dispatch.method_node =
+						NULL;
 
 						/*
 						 * Hardware-disable the GPE so a late interrupt
@@ -676,7 +706,6 @@ acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
 						(void)acpi_hw_low_set_gpe(
 							gpe_event_info,
 							ACPI_GPE_DISABLE);
-					}
 					break;
 
 				case ACPI_GPE_DISPATCH_HANDLER:
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 35/42] ACPICA: events: Handle GPEs' Notify dispatch type
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (33 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 34/42] ACPICA: events: Fix GPE cleanup return after changing program state Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 36/42] ACPICA: tables: Fix wrong table unload and notify call order Maciej Wieczor-Retman
                   ` (6 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: linux-acpi, acpica-devel, linux-kernel

The NotifyList is a list of devices that are tied to a single GPE. All
devices on the list shall be notified if the GPE fires. Devices can have
different parent tables - for example a DSDT can own some devices while
a separate SSDT can own a couple of different ones.

GPE dispatch can be of the Notify type. When it is, the cleanup consists
of removing devices from the GPE's device NotifyList - but only the ones
that match the ID of the table that is getting unloaded. One also has to
check the option of the NotifyList being stored away in the handler
MethodNode pointer, similar to how the Method type is treated.

Freeing the GPE notify info entries tied to device nodes taken off the
NotifyList should happen after the spinlock is released as some
platforms can't handle freeing/allocating when holding spinlocks.

Link: https://github.com/acpica/acpica/commit/c0a1faa4e478
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/evgpe.c | 146 ++++++++++++++++++++++++++++++++++++
 1 file changed, 146 insertions(+)

diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index 5c283a2faaf0..be48b8d1837f 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -535,6 +535,96 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
 }
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ev_notify_list_has_owner
+ *
+ * PARAMETERS:  notify          - List of notify dispatch events
+ *              owner_id        - Table owner_id being unloaded that should match
+ *                                one of the notify device nodes on the list
+ *
+ * RETURN:      Return TRUE if at least one of the device nodes matches the
+ *              passed owner_id. Return FALSE if all notify list objects don't
+ *              match the passed owner_id.
+ *
+ * DESCRIPTION: Check whether at least on object on the notify list matches its
+ *              owner_id to the one passed as a function parameter. That means
+ *              that at least one device has ownership over an object on this
+ *              notify list.
+ *
+ ******************************************************************************/
+static u8 acpi_ev_notify_list_has_owner(struct acpi_gpe_notify_info *notify,
+					acpi_owner_id owner_id)
+{
+	while (notify) {
+		if (notify->device_node->owner_id == owner_id) {
+			return (TRUE);
+		}
+		notify = notify->next;
+	}
+	return (FALSE);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION:    acpi_ev_unlink_notify_list_dev_id
+ *
+ * PARAMETERS:  owner_id        - Table owner_id being unloaded that should match
+ *                                the devices on the notify_list.
+ *              notify_list     - Address of the notify_list from the GPE
+ *              to_free_list    - Address of a struct acpi_gpe_notify_info pointer that
+ *                                will later be used to free the device objects
+ *                                from the list that match the owner_id
+ *
+ * RETURN:      Return TRUE if the original notify_list was emptied after the
+ *              unlinking is done. Return FALSE otherwise.
+ *
+ * DESCRIPTION: Helper in processing the notify_list during table unloading.
+ *              notify_list can contain devices from other tables. Only devices
+ *              from the table currently getting unloaded should be cleared from
+ *              this list. This helper parses the list and moves nodes that
+ *              match the unloaded table's ID to a separate single linked list.
+ *              That list shall be later freed node by node. It shouldn't be
+ *              freed immediately as freeing/allocating should be avoided on
+ *              some system when the global spinlock is held.
+ *
+ ******************************************************************************/
+static u8
+acpi_ev_unlink_notify_list_dev_id(acpi_owner_id owner_id,
+				  struct acpi_gpe_notify_info **notify_list,
+				  struct acpi_gpe_notify_info **to_free_list)
+{
+	/* Cursor pointer that will move through all notify_list nodes addresses */
+	struct acpi_gpe_notify_info **notify_pointer = notify_list;
+	/* Currently looked at structure in the loop iteration */
+	struct acpi_gpe_notify_info *node = *notify_pointer;
+
+	/*
+	 * Go through all Notify structures to find devices matching the owner_id
+	 * that is getting unloaded
+	 */
+	while (node) {
+		if (node->device_node->owner_id == owner_id) {
+			/* Modify original list by unlinking Node */
+			*notify_pointer = node->next;
+			/* Link the unlinked node to the to-be-freed list */
+			node->next = *to_free_list;
+			*to_free_list = node;
+		} else {
+			/* Move the cursor one node further */
+			notify_pointer = &node->next;
+		}
+		/* Grab the next node or NULL if there is no more */
+		node = *notify_pointer;
+	}
+
+	/*
+	 * If the original list was emptied return TRUE so that the caller knows to
+	 * move the dispatch type from Notify to None
+	 */
+	return (*notify_list == NULL);
+}
+
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ev_dispatch_type_hidden_handler
@@ -560,6 +650,7 @@ acpi_ev_dispatch_type_hidden_handler(struct acpi_gpe_event_info *gpe_event_info,
 {
 	u8 gpe_dispatch_type = ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags);
 	struct acpi_gpe_handler_info *handler;
+	struct acpi_gpe_notify_info *notify;
 
 	switch (gpe_dispatch_type) {
 	case ACPI_GPE_DISPATCH_METHOD:
@@ -570,6 +661,13 @@ acpi_ev_dispatch_type_hidden_handler(struct acpi_gpe_event_info *gpe_event_info,
 		}
 		break;
 
+	case ACPI_GPE_DISPATCH_NOTIFY:
+		notify = gpe_event_info->dispatch.notify_list;
+		if (!acpi_ev_notify_list_has_owner(notify, owner_id)) {
+			return 0;
+		}
+		break;
+
 	/* Method or Notify can be saved if the handler is present */
 	case ACPI_GPE_DISPATCH_HANDLER:
 	case ACPI_GPE_DISPATCH_RAW_HANDLER:
@@ -584,6 +682,14 @@ acpi_ev_dispatch_type_hidden_handler(struct acpi_gpe_event_info *gpe_event_info,
 				return 0;
 			}
 			break;
+		case ACPI_GPE_DISPATCH_NOTIFY:
+			if (!acpi_ev_notify_list_has_owner(
+				    ACPI_CAST_PTR(struct acpi_gpe_notify_info,
+						  handler->method_node),
+				    owner_id)) {
+				return 0;
+			}
+			break;
 		default:
 			return 0;
 		}
@@ -620,6 +726,8 @@ acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
 	acpi_status status = AE_OK;
 	u32 gpe_dispatch_type;
 	struct acpi_gpe_handler_info *handler;
+	struct acpi_gpe_notify_info *list;
+	struct acpi_gpe_notify_info *free_list = NULL;
 
 	ACPI_FUNCTION_TRACE_U32(ev_clear_gpe_dispatch_by_owner, owner_id);
 
@@ -708,6 +816,20 @@ acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
 							ACPI_GPE_DISABLE);
 					break;
 
+				case ACPI_GPE_DISPATCH_NOTIFY:
+					if (acpi_ev_unlink_notify_list_dev_id(
+						    owner_id,
+						    &gpe_event_info->dispatch
+							     .notify_list,
+						    &free_list)) {
+						gpe_event_info->flags &=
+							~ACPI_GPE_DISPATCH_MASK;
+						(void)acpi_hw_low_set_gpe(
+							gpe_event_info,
+							ACPI_GPE_DISABLE);
+					}
+					break;
+
 				case ACPI_GPE_DISPATCH_HANDLER:
 				case ACPI_GPE_DISPATCH_RAW_HANDLER:
 
@@ -725,6 +847,22 @@ acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
 							~ACPI_GPE_DISPATCH_MASK; /* -> NONE */
 						handler->originally_enabled =
 							FALSE;
+					} else if (gpe_dispatch_type ==
+						   ACPI_GPE_DISPATCH_NOTIFY) {
+						list = ACPI_CAST_PTR(
+							struct acpi_gpe_notify_info,
+							handler->method_node);
+						if (acpi_ev_unlink_notify_list_dev_id(
+							    owner_id, &list,
+							    &free_list)) {
+							handler->original_flags &=
+								~ACPI_GPE_DISPATCH_MASK;
+							handler->originally_enabled =
+								FALSE;
+						}
+						handler->method_node = ACPI_CAST_PTR(
+							struct acpi_namespace_node,
+							list);
 					}
 					break;
 
@@ -740,6 +878,14 @@ acpi_status acpi_ev_clear_gpe_dispatch_by_owner(acpi_owner_id owner_id)
 	}
 
 	acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
+
+	/* Free the free_list elements from the Notify path */
+	while (free_list) {
+		list = free_list->next;
+		ACPI_FREE(free_list);
+		free_list = list;
+	}
+
 	(void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
 	return_ACPI_STATUS(status);
 }
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 36/42] ACPICA: tables: Fix wrong table unload and notify call order
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (34 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 35/42] ACPICA: events: Handle GPEs' Notify dispatch type Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 37/42] ACPICA: tables: Fix global table read missing mutex Maciej Wieczor-Retman
                   ` (5 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: linux-acpi, acpica-devel, linux-kernel

Newly added cleanup - AcpiEvClearGpeDispatchByOwner() - was ordered in
such a manner that if the clear gpe dispatch call failed it would leave
GPEs still enabled but the host would get notified that the table is
unloaded already.

Simply reorder the code blocks so that notifying the host happens last,
after the GPE dispatch cleanup.

Link: https://github.com/acpica/acpica/commit/b97317a4ef0c
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/tbdata.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index c756d34eeb44..1cf0a46b3539 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -1068,13 +1068,6 @@ acpi_status acpi_tb_unload_table(u32 table_index)
 		return_ACPI_STATUS(AE_NOT_EXIST);
 	}
 
-	/* Invoke table handler */
-
-	status = acpi_get_table_by_index(table_index, &table);
-	if (ACPI_SUCCESS(status)) {
-		acpi_tb_notify_table(ACPI_TABLE_EVENT_UNLOAD, table);
-	}
-
 #if (!ACPI_REDUCED_HARDWARE)
 	/*
 	 * Clear GPE dispatch for methods owned by the table being unloaded.
@@ -1088,6 +1081,13 @@ acpi_status acpi_tb_unload_table(u32 table_index)
 	}
 #endif /* !ACPI_REDUCED_HARDWARE */
 
+	/* Invoke table handler */
+
+	status = acpi_get_table_by_index(table_index, &table);
+	if (ACPI_SUCCESS(status)) {
+		acpi_tb_notify_table(ACPI_TABLE_EVENT_UNLOAD, table);
+	}
+
 	/* Delete the portion of the namespace owned by this table */
 
 	status = acpi_tb_delete_namespace_by_owner(table_index);
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 37/42] ACPICA: tables: Fix global table read missing mutex
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (35 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 36/42] ACPICA: tables: Fix wrong table unload and notify call order Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:18 ` [PATCH v2 38/42] ACPICA: executer: Fix copying PCC source buffer data Maciej Wieczor-Retman
                   ` (4 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: linux-acpi, acpica-devel, linux-kernel

Reading AcpiGbl_RootTableList.Tables[].OwnerId without holding an
appropriate mutex can lead to races if anything modified the table after
the read.

Use a helper specifically dedicated to reading the OwnerId.

Link: https://github.com/acpica/acpica/commit/ef7cf3f3def2
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/tbdata.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index 1cf0a46b3539..94ac355daae7 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -1059,6 +1059,7 @@ acpi_status acpi_tb_unload_table(u32 table_index)
 {
 	acpi_status status = AE_OK;
 	struct acpi_table_header *table;
+	acpi_owner_id ACPI_UNUSED_VAR owner_id;
 
 	ACPI_FUNCTION_TRACE(tb_unload_table);
 
@@ -1074,8 +1075,8 @@ acpi_status acpi_tb_unload_table(u32 table_index)
 	 * If any matching GPE is currently dispatching, AE_ABORT_METHOD is
 	 * returned and the unload cannot proceed.
 	 */
-	status = acpi_ev_clear_gpe_dispatch_by_owner(
-		acpi_gbl_root_table_list.tables[table_index].owner_id);
+	acpi_tb_get_owner_id(table_index, &owner_id);
+	status = acpi_ev_clear_gpe_dispatch_by_owner(owner_id);
 	if (ACPI_FAILURE(status)) {
 		return_ACPI_STATUS(status);
 	}
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 38/42] ACPICA: executer: Fix copying PCC source buffer data
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (36 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 37/42] ACPICA: tables: Fix global table read missing mutex Maciej Wieczor-Retman
@ 2026-11-20 17:18 ` Maciej Wieczor-Retman
  2026-11-20 17:19 ` [PATCH v2 39/42] ACPICA: dispatcher: Fix zero size non-NULL PCC buffer pointer Maciej Wieczor-Retman
                   ` (3 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:18 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski,
	Len Brown, Kyle Pelton, Bob Moore, Erik Kaneda
  Cc: Rafael J. Wysocki, linux-acpi, acpica-devel, linux-kernel

Paths leading up to AcpiExWriteDataToField() group Integer, Buffer and
String together when handling the operand type. In the operand type
union, the integer's value and buffer's pointer share the same space.

One issue can be that the number stored in integer.value is interpreted
as buffer.pointer - which can happen if ACPI_TYPE_INTEGER is the source
operand type. The following code should result in a memory fault as it
will read the value as the address, and won't use the address of the
variable as it should:

    COMD = 0x01

Other problem is if SourceDesc->Buffer.Length is smaller than DataLength
- then more data will be read from the source operand than planned. For
example the following ASL code would result in extra data getting read
from BUF0 to COSP:

    Name (BUF0, Buffer (2) {0x01, 0x02})
    COSP = BUF0

Fix the first problem by moving the Buffer and BufferLength assignment
before the PCC buffer code path.

Fix the second problem by copying only as much space as the source
operand has. If it has less than the destination just zero-extend the
extra space as similar Field operations do (AcpiExInsertIntoField() for
example).

Link: https://github.com/acpica/acpica/commit/9ea9025e30bd
Fixes: aa6ec56b574d ("ACPICA: ACPI 6.3: add PCC operation region support for AML interpreter")
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/exfield.c | 63 ++++++++++++++++++++---------------
 1 file changed, 36 insertions(+), 27 deletions(-)

diff --git a/drivers/acpi/acpica/exfield.c b/drivers/acpi/acpica/exfield.c
index 632fc8693f23..2199d054ed58 100644
--- a/drivers/acpi/acpica/exfield.c
+++ b/drivers/acpi/acpica/exfield.c
@@ -291,6 +291,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
 	acpi_status status;
 	u32 buffer_length;
 	u32 data_length;
+	u32 copy_length;
 	void *buffer;
 
 	ACPI_FUNCTION_TRACE_PTR(ex_write_data_to_field, obj_desc);
@@ -338,7 +339,34 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
 		    acpi_ex_write_serial_bus(source_desc, obj_desc,
 					     result_desc);
 		return_ACPI_STATUS(status);
-	} else if ((obj_desc->common.type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
+	}
+
+	/* Get a pointer to the data to be written */
+
+	switch (source_desc->common.type) {
+	case ACPI_TYPE_INTEGER:
+
+		buffer = &source_desc->integer.value;
+		buffer_length = sizeof(source_desc->integer.value);
+		break;
+
+	case ACPI_TYPE_BUFFER:
+
+		buffer = source_desc->buffer.pointer;
+		buffer_length = source_desc->buffer.length;
+		break;
+
+	case ACPI_TYPE_STRING:
+
+		buffer = source_desc->string.pointer;
+		buffer_length = source_desc->string.length;
+		break;
+
+	default:
+		return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
+	}
+
+	if ((obj_desc->common.type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
 		   (obj_desc->field.region_obj->region.space_id ==
 		    ACPI_ADR_SPACE_PLATFORM_COMM)) {
 		/*
@@ -369,9 +397,15 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
 			return_ACPI_STATUS(AE_AML_BUFFER_LIMIT);
 		}
 
+		copy_length = ACPI_MIN(data_length, buffer_length);
+
+		memset(obj_desc->field.region_obj->field.internal_pcc_buffer +
+			       obj_desc->field.base_byte_offset,
+		       0, data_length);
+
 		memcpy(obj_desc->field.region_obj->field.internal_pcc_buffer +
 		       obj_desc->field.base_byte_offset,
-		       source_desc->buffer.pointer, data_length);
+		       buffer, copy_length);
 
 		if (MASTER_SUBSPACE_COMMAND(obj_desc->field.base_byte_offset)) {
 
@@ -391,31 +425,6 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc,
 		return (AE_OK);
 	}
 
-	/* Get a pointer to the data to be written */
-
-	switch (source_desc->common.type) {
-	case ACPI_TYPE_INTEGER:
-
-		buffer = &source_desc->integer.value;
-		buffer_length = sizeof(source_desc->integer.value);
-		break;
-
-	case ACPI_TYPE_BUFFER:
-
-		buffer = source_desc->buffer.pointer;
-		buffer_length = source_desc->buffer.length;
-		break;
-
-	case ACPI_TYPE_STRING:
-
-		buffer = source_desc->string.pointer;
-		buffer_length = source_desc->string.length;
-		break;
-
-	default:
-		return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
-	}
-
 	ACPI_DEBUG_PRINT((ACPI_DB_BFIELD,
 			  "FieldWrite [FROM]: Obj %p (%s:%X), Buf %p, ByteLen %X\n",
 			  source_desc,
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 39/42] ACPICA: dispatcher: Fix zero size non-NULL PCC buffer pointer
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (37 preceding siblings ...)
  2026-11-20 17:18 ` [PATCH v2 38/42] ACPICA: executer: Fix copying PCC source buffer data Maciej Wieczor-Retman
@ 2026-11-20 17:19 ` Maciej Wieczor-Retman
  2026-11-20 17:19 ` [PATCH v2 40/42] ACPICA: utilities: Clear NextObject so the outer loop doesn't read it Maciej Wieczor-Retman
                   ` (2 subsequent siblings)
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:19 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski,
	Len Brown, Kyle Pelton, Bob Moore, Erik Kaneda
  Cc: Rafael J. Wysocki, linux-acpi, acpica-devel, linux-kernel

Zero sized PCC buffers still get allocated, so they pass the null checks
and can cause writes to unallocated memory.

Skip the allocation if the region length is zero or the
AOPOBJ_DATA_VALID flag is not set as otherwise the disassembler will
emit warnings on every PCC Field().

Link: https://github.com/acpica/acpica/commit/0f58983617c2
Fixes: aa6ec56b574d ("ACPICA: ACPI 6.3: add PCC operation region support for AML interpreter")
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/dsfield.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c
index 5d0dfe4ff8e8..d091453eea93 100644
--- a/drivers/acpi/acpica/dsfield.c
+++ b/drivers/acpi/acpica/dsfield.c
@@ -530,6 +530,18 @@ acpi_ds_create_field(union acpi_parse_object *op,
 	if (info.region_node->object->region.space_id ==
 	    ACPI_ADR_SPACE_PLATFORM_COMM &&
 	    !region_node->object->field.internal_pcc_buffer) {
+		/*
+	   * If AOPOBJ_DATA_VALID flag is not set the region operands is not
+	   * evaluated (e.g. disassembler), nothing to allocate.
+	   * Also avoid a zero-size allocation which may yield a non-NULL pointer
+	   */
+
+		if (!(info.region_node->object->common.flags &
+		      AOPOBJ_DATA_VALID) ||
+		    (!info.region_node->object->region.length)) {
+			return_ACPI_STATUS(AE_OK);
+		}
+
 		region_node->object->field.internal_pcc_buffer =
 		    ACPI_ALLOCATE_ZEROED(info.region_node->object->region.
 					 length);
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 40/42] ACPICA: utilities: Clear NextObject so the outer loop doesn't read it
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (38 preceding siblings ...)
  2026-11-20 17:19 ` [PATCH v2 39/42] ACPICA: dispatcher: Fix zero size non-NULL PCC buffer pointer Maciej Wieczor-Retman
@ 2026-11-20 17:19 ` Maciej Wieczor-Retman
  2026-11-20 17:19 ` [PATCH v2 41/42] ACPICA: namespace: Fix memory leak around compiler alias flag Maciej Wieczor-Retman
  2026-11-20 17:19 ` [PATCH v2 42/42] ACPICA: acpica: Fix typo in the IOVT_IOMMU table definitions Maciej Wieczor-Retman
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:19 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski, Len Brown
  Cc: linux-acpi, acpica-devel, linux-kernel

If the inner 'while (PrevObject)' loop exits after NextObject was
already set to the PrevObject->Notify.Next[i], then at the end of the
outer loop, 'if (NextObject)' check will save that discarded object.

Set the unwanted NextObject to NULL before breaking the inner loop so it
doesn't get saved for the next iteration of the outer loop.

Link: https://github.com/acpica/acpica/commit/942f4fcfb1ce
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/utdelete.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/acpica/utdelete.c b/drivers/acpi/acpica/utdelete.c
index 57a0de6a49d6..7645c14aac68 100644
--- a/drivers/acpi/acpica/utdelete.c
+++ b/drivers/acpi/acpica/utdelete.c
@@ -519,6 +519,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
 				while (prev_object) {
 					if (prev_object->common.type !=
 					    ACPI_TYPE_LOCAL_NOTIFY) {
+						next_object = NULL;
 						break;
 					}
 					next_object =
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 41/42] ACPICA: namespace: Fix memory leak around compiler alias flag
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (39 preceding siblings ...)
  2026-11-20 17:19 ` [PATCH v2 40/42] ACPICA: utilities: Clear NextObject so the outer loop doesn't read it Maciej Wieczor-Retman
@ 2026-11-20 17:19 ` Maciej Wieczor-Retman
  2026-11-20 17:19 ` [PATCH v2 42/42] ACPICA: acpica: Fix typo in the IOVT_IOMMU table definitions Maciej Wieczor-Retman
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:19 UTC (permalink / raw)
  To: Rafael J. Wysocki, Maciej Wieczor-Retman, Pawel Chmielewski,
	Len Brown, ikaros
  Cc: Rafael J. Wysocki, linux-acpi, acpica-devel, linux-kernel

ANOBJ_IS_ALIAS is an iASL only flag that shares the bit position with
ANOBJ_ALLOCATED_BUFFER, which is a flag used for runtime installing
methods. Due to the bits matching a memory leak happens everytime a
method is loaded in acpiexec (using AcpiInstallMethod()).

Check the compiler related flag only when the code is ran by the
compiler.

Link: https://github.com/acpica/acpica/commit/b01f4e055910
Fixes: 8d7987340301 ("ACPICA: Add alias node support in namespace handling")
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/acpica/nsobject.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/nsobject.c b/drivers/acpi/acpica/nsobject.c
index 49d9d917fa73..6eb278b9d714 100644
--- a/drivers/acpi/acpica/nsobject.c
+++ b/drivers/acpi/acpica/nsobject.c
@@ -175,8 +175,11 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node)
 
 	/* Alias nodes point directly to other namespace nodes; skip teardown */
 	if ((node->type == ACPI_TYPE_LOCAL_ALIAS) ||
-	    (node->type == ACPI_TYPE_LOCAL_METHOD_ALIAS) ||
-	    (node->flags & ANOBJ_IS_ALIAS)) {
+	    (node->type == ACPI_TYPE_LOCAL_METHOD_ALIAS)
+#if defined ACPI_ASL_COMPILER
+	    || (node->flags & ANOBJ_IS_ALIAS)
+#endif
+	) {
 		node->object = NULL;
 		return_VOID;
 	}
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH v2 42/42] ACPICA: acpica: Fix typo in the IOVT_IOMMU table definitions
  2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
                   ` (40 preceding siblings ...)
  2026-11-20 17:19 ` [PATCH v2 41/42] ACPICA: namespace: Fix memory leak around compiler alias flag Maciej Wieczor-Retman
@ 2026-11-20 17:19 ` Maciej Wieczor-Retman
  41 siblings, 0 replies; 43+ messages in thread
From: Maciej Wieczor-Retman @ 2026-11-20 17:19 UTC (permalink / raw)
  To: Bibo Mao, Huacai Chen, Rafael J. Wysocki, Len Brown,
	Maciej Wieczor-Retman, Pawel Chmielewski
  Cc: linux-acpi, loongarch, linux-kernel, acpica-devel

Change MAGAGE to MANAGE in ACPI_IOVT_IOMMU_MAGAGE_BY_SEGMENT.

Link: https://github.com/acpica/acpica/commit/dee9a9e3c797
Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>
---
 drivers/acpi/loongarch/iovt.c | 6 +++---
 include/acpi/actbl2.h         | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/loongarch/iovt.c b/drivers/acpi/loongarch/iovt.c
index 1e97669eaeea..e891170d9b8b 100644
--- a/drivers/acpi/loongarch/iovt.c
+++ b/drivers/acpi/loongarch/iovt.c
@@ -42,7 +42,7 @@ static void __init iovt_enable_acs(struct acpi_iovt_iommu *iommu)
 
 	/* IOMMU V1 only supports PCI device management */
 	if ((iommu->header.type == ACPI_IOVT_IOMMU_V1) ||
-	    (iommu->flags & (ACPI_IOVT_IOMMU_PCI_DEVICE | ACPI_IOVT_IOMMU_MAGAGE_BY_SEGMENT))) {
+	    (iommu->flags & (ACPI_IOVT_IOMMU_PCI_DEVICE | ACPI_IOVT_IOMMU_MANAGE_BY_SEGMENT))) {
 		pci_request_acs();
 		acs_enabled = true;
 	}
@@ -151,7 +151,7 @@ static int __init iovt_add_iommu(struct acpi_iovt_iommu *iommu)
 	}
 
 	/* All devices in the segment are managed by this IOMMU */
-	if (np->flag & ACPI_IOVT_IOMMU_MAGAGE_BY_SEGMENT)
+	if (np->flag & ACPI_IOVT_IOMMU_MANAGE_BY_SEGMENT)
 		goto skip;
 
 	if (iovt_validate_entries(iommu) < 0) {
@@ -280,7 +280,7 @@ static int iovt_pci_iommu_init(struct pci_dev *pdev, u16 dev_id, void *data)
 		if (dev_id == np->devid)
 			return -EINVAL;
 
-		if (np->flag & ACPI_IOVT_IOMMU_MAGAGE_BY_SEGMENT)
+		if (np->flag & ACPI_IOVT_IOMMU_MANAGE_BY_SEGMENT)
 			goto found;
 
 		list_for_each_entry(entry, &np->ep_list, list) {
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 1dafb2a71368..fe767fcf5726 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -928,7 +928,7 @@ struct acpi_iovt_iommu {
 /* Masks for Flags field above */
 #define ACPI_IOVT_IOMMU_PCI_DEVICE		(1<<0)
 #define ACPI_IOVT_IOMMU_PXM_VALID		(1<<1)
-#define ACPI_IOVT_IOMMU_MAGAGE_BY_SEGMENT	(1<<2)
+#define ACPI_IOVT_IOMMU_MANAGE_BY_SEGMENT	(1<<2)
 #define ACPI_IOVT_IOMMU_HW_CAP_SUPPORT		(1<<3)
 #define ACPI_IOVT_IOMMU_MSI_INT_BYPASS		(1<<4)
 
-- 
2.56.0


^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2026-11-20 17:22 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-20 17:17 [PATCH v2 00/42] ACPICA: ACPICA 20260930 with follow-up fixes Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 01/42] ACPICA: components: Fix typo "Supress" -> "Suppress" Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 02/42] ACPICA: components: Fix typo: "numer" -> "number" Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 03/42] ACPICA: Introduce a new HEST notification type for RISC-V SSE events Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 04/42] ACPICA: Utilities: Fix for AcpiUtVerifyChecksum warning display Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 05/42] ACPICA: CEDT: RDPAS: Add missing reserved field in RDPAS structure Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 06/42] ACPICA: CEDT: RDPAS: Fix incorrect field positions for RDPAS Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 07/42] ACPICA: Events: Clear GPE dispatch by owner during table unload Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 08/42] ACPICA: executer: Add bounds checking for PCC field read access Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 09/42] ACPICA: Validate 4-char field names before namespace lookup Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 10/42] ACPICA: Improve error handling in table loading process Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 11/42] ACPICA: executer: Add bounds checking for PCC field write access Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 12/42] ACPICA: tables: Fix heap-buffer-overflow in AcpiTbFindTable Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 13/42] ACPICA: Fix object reference update to skip non-local notify types Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 14/42] ACPICA: namespace: Recognize alias node types in detach Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 15/42] ACPICA: fix: build error with gcc 16: unused-but-set-variable Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 16/42] ACPICA: parser: Set AML length for bytelist Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 17/42] ACPICA: executer: Fix NULL pointer dereference in AcpiExStoreObjectToIndex() Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 18/42] ACPICA: compiler: Add _Ixx GPE object Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 19/42] ACPICA: namespace: Fix possible underflow and NULL pointer dereference Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 20/42] ACPICA: add UBRT (UnifiedBus Root Table) definitions Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 21/42] ACPICA: Add ACPI_MSG_DEBUG to set KERN_DEBUG for debug output Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 22/42] ACPICA: ACPI 6.5 Add support for the MISC table Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 23/42] ACPICA: iASL: Complete KEYP support Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 24/42] ACPICA: iASL: Fix the truncated count of external control methods Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 25/42] ACPICA: release: Update version to 20260930 Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 26/42] ACPICA: actbl2: MPAM: adapt to MPAM ACPI spec v3.1 Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 27/42] ACPICA: Executer: Resolve package index references used as integer operands Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 28/42] ACPICA: tables: Fix table buffer leak when Load fails verification Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 29/42] ACPICA: parser: Fix parse tree memory leak on AML execution error unwind Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 30/42] ACPICA: IORT: Add Root Complex PASID Flags field Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 31/42] ACPICA: events: Add missing event mutex to AcpiEvClearGpeDispatchByOwner() Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 32/42] ACPICA: events: Remove redundant code Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 33/42] ACPICA: events: Fix AcpiEvClearGpeDispatchByOwner handler type processing Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 34/42] ACPICA: events: Fix GPE cleanup return after changing program state Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 35/42] ACPICA: events: Handle GPEs' Notify dispatch type Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 36/42] ACPICA: tables: Fix wrong table unload and notify call order Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 37/42] ACPICA: tables: Fix global table read missing mutex Maciej Wieczor-Retman
2026-11-20 17:18 ` [PATCH v2 38/42] ACPICA: executer: Fix copying PCC source buffer data Maciej Wieczor-Retman
2026-11-20 17:19 ` [PATCH v2 39/42] ACPICA: dispatcher: Fix zero size non-NULL PCC buffer pointer Maciej Wieczor-Retman
2026-11-20 17:19 ` [PATCH v2 40/42] ACPICA: utilities: Clear NextObject so the outer loop doesn't read it Maciej Wieczor-Retman
2026-11-20 17:19 ` [PATCH v2 41/42] ACPICA: namespace: Fix memory leak around compiler alias flag Maciej Wieczor-Retman
2026-11-20 17:19 ` [PATCH v2 42/42] ACPICA: acpica: Fix typo in the IOVT_IOMMU table definitions Maciej Wieczor-Retman

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®