Commit 84fa7ad6 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'acpica'

Merge ACPICA material for v6.10.  This is mostly new material included
in the 20240322 upstream ACPICA release.

 - Disable -Wstringop-truncation for some ACPICA code in the kernel to
   avoid a compiler warning  that is not very useful (Arnd Bergmann).

 - Add EINJ CXL error types to actbl1.h (Ben Cheatham).

 - Add support for RAS2 table to ACPICA (Shiju Jose).

 - Fix various spelling mistakes in text files and code comments in
   ACPICA (Colin Ian King).

 - Fix spelling and typos in ACPICA (Saket Dumbre).

 - Modify ACPI_OBJECT_COMMON_HEADER (lijun).

 - Add RISC-V RINTC affinity structure support to ACPICA (Haibo Xu).

 - Fix CXL 3.0 structure (RDPAS) in the CEDT table (Hojin Nam).

 - Add missin increment of registered GPE count to ACPICA (Daniil
   Tatianin).

 - Mark new ACPICA release 20240322 (Saket Dumbre).

 - Add support for the AEST V2 table to ACPICA (Ruidong Tian).

* acpica:
  ACPICA: AEST: Add support for the AEST V2 table
  ACPICA: Update acpixf.h for new ACPICA release 20240322
  ACPICA: events/evgpeinit: don't forget to increment registered GPE count
  ACPICA: Fix CXL 3.0 structure (RDPAS) in the CEDT table
  ACPICA: SRAT: Add dump and compiler support for RINTC affinity structure
  ACPICA: SRAT: Add RISC-V RINTC affinity structure
  ACPICA: Modify ACPI_OBJECT_COMMON_HEADER
  ACPICA: Fix spelling and typos
  ACPICA: Clean up the fix for Issue #900
  ACPICA: Fix various spelling mistakes in text files and code comments
  ACPICA: Attempt 1 to fix issue #900
  ACPICA: ACPI 6.5: RAS2: Add support for RAS2 table
  ACPICA: actbl1.h: Add EINJ CXL error types
  ACPI: disable -Wstringop-truncation
parents c901f63d e0492490
......@@ -5,6 +5,7 @@
ccflags-y := -D_LINUX -DBUILDING_ACPICA
ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT
CFLAGS_tbfind.o += $(call cc-disable-warning, stringop-truncation)
# use acpi.o to put all files here into acpi.o modparam namespace
obj-y += acpi.o
......
......@@ -547,7 +547,7 @@ struct acpi_field_info {
struct acpi_ged_handler_info {
struct acpi_ged_handler_info *next;
u32 int_id; /* The interrupt ID that triggers the execution ofthe evt_method. */
u32 int_id; /* The interrupt ID that triggers the execution of the evt_method. */
struct acpi_namespace_node *evt_method; /* The _EVT method to be executed when an interrupt with ID = int_ID is received */
};
......
This diff is collapsed.
......@@ -413,6 +413,7 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
gpe_event_info->flags &= ~(ACPI_GPE_DISPATCH_MASK);
gpe_event_info->flags |= (u8)(type | ACPI_GPE_DISPATCH_METHOD);
gpe_event_info->dispatch.method_node = method_node;
walk_info->count++;
ACPI_DEBUG_PRINT((ACPI_DB_LOAD,
"Registered GPE method %s as GPE number 0x%.2X\n",
......
......@@ -62,7 +62,12 @@ void acpi_ut_track_stack_ptr(void)
acpi_size current_sp;
if (&current_sp < acpi_gbl_lowest_stack_pointer) {
#pragma GCC diagnostic push
#if defined(__GNUC__) && __GNUC__ >= 12
#pragma GCC diagnostic ignored "-Wdangling-pointer="
#endif
acpi_gbl_lowest_stack_pointer = &current_sp;
#pragma GCC diagnostic pop
}
if (acpi_gbl_nesting_level > acpi_gbl_deepest_nesting) {
......
......@@ -12,7 +12,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20230628
#define ACPI_CA_VERSION 0x20240322
#include <acpi/acconfig.h>
#include <acpi/actypes.h>
......
......@@ -571,8 +571,6 @@ struct acpi_cedt_cxims {
struct acpi_cedt_rdpas {
struct acpi_cedt_header header;
u8 reserved1;
u16 length;
u16 segment;
u16 bdf;
u8 protocol;
......@@ -1096,6 +1094,12 @@ enum acpi_einj_command_status {
#define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9)
#define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10)
#define ACPI_EINJ_PLATFORM_FATAL (1<<11)
#define ACPI_EINJ_CXL_CACHE_CORRECTABLE (1<<12)
#define ACPI_EINJ_CXL_CACHE_UNCORRECTABLE (1<<13)
#define ACPI_EINJ_CXL_CACHE_FATAL (1<<14)
#define ACPI_EINJ_CXL_MEM_CORRECTABLE (1<<15)
#define ACPI_EINJ_CXL_MEM_UNCORRECTABLE (1<<16)
#define ACPI_EINJ_CXL_MEM_FATAL (1<<17)
#define ACPI_EINJ_VENDOR_DEFINED (1<<31)
/*******************************************************************************
......
......@@ -47,6 +47,7 @@
#define ACPI_SIG_PPTT "PPTT" /* Processor Properties Topology Table */
#define ACPI_SIG_PRMT "PRMT" /* Platform Runtime Mechanism Table */
#define ACPI_SIG_RASF "RASF" /* RAS Feature table */
#define ACPI_SIG_RAS2 "RAS2" /* RAS2 Feature table */
#define ACPI_SIG_RGRT "RGRT" /* Regulatory Graphics Resource Table */
#define ACPI_SIG_RHCT "RHCT" /* RISC-V Hart Capabilities Table */
#define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
......@@ -77,8 +78,8 @@
*
* AEST - Arm Error Source Table
*
* Conforms to: ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document
* September 2020.
* Conforms to: ACPI for the Armv8 RAS Extensions 1.1(Sep 2020) and
* 2.0(May 2023) Platform Design Document.
*
******************************************************************************/
......@@ -108,7 +109,9 @@ struct acpi_aest_hdr {
#define ACPI_AEST_SMMU_ERROR_NODE 2
#define ACPI_AEST_VENDOR_ERROR_NODE 3
#define ACPI_AEST_GIC_ERROR_NODE 4
#define ACPI_AEST_NODE_TYPE_RESERVED 5 /* 5 and above are reserved */
#define ACPI_AEST_PCIE_ERROR_NODE 5
#define ACPI_AEST_PROXY_ERROR_NODE 6
#define ACPI_AEST_NODE_TYPE_RESERVED 7 /* 7 and above are reserved */
/*
* AEST subtables (Error nodes)
......@@ -187,6 +190,12 @@ typedef struct acpi_aest_vendor {
} acpi_aest_vendor;
struct acpi_aest_vendor_v2 {
char acpi_hid[8];
u32 acpi_uid;
u8 vendor_specific_data[16];
};
/* 4: Gic Error */
typedef struct acpi_aest_gic {
......@@ -203,6 +212,18 @@ typedef struct acpi_aest_gic {
#define ACPI_AEST_GIC_ITS 3
#define ACPI_AEST_GIC_RESERVED 4 /* 4 and above are reserved */
/* 5: PCIe Error */
struct acpi_aest_pcie {
u32 iort_node_reference;
};
/* 6: Proxy Error */
struct acpi_aest_proxy {
u64 node_address;
};
/* Node Interface Structure */
typedef struct acpi_aest_node_interface {
......@@ -218,11 +239,57 @@ typedef struct acpi_aest_node_interface {
} acpi_aest_node_interface;
/* Node Interface Structure V2 */
struct acpi_aest_node_interface_header {
u8 type;
u8 group_format;
u8 reserved[2];
u32 flags;
u64 address;
u32 error_record_index;
u32 error_record_count;
};
#define ACPI_AEST_NODE_GROUP_FORMAT_4K 0
#define ACPI_AEST_NODE_GROUP_FORMAT_16K 1
#define ACPI_AEST_NODE_GROUP_FORMAT_64K 2
struct acpi_aest_node_interface_common {
u32 error_node_device;
u32 processor_affinity;
u64 error_group_register_base;
u64 fault_inject_register_base;
u64 interrupt_config_register_base;
};
struct acpi_aest_node_interface_4k {
u64 error_record_implemented;
u64 error_status_reporting;
u64 addressing_mode;
struct acpi_aest_node_interface_common common;
};
struct acpi_aest_node_interface_16k {
u64 error_record_implemented[4];
u64 error_status_reporting[4];
u64 addressing_mode[4];
struct acpi_aest_node_interface_common common;
};
struct acpi_aest_node_interface_64k {
u64 error_record_implemented[14];
u64 error_status_reporting[14];
u64 addressing_mode[14];
struct acpi_aest_node_interface_common common;
};
/* Values for Type field above */
#define ACPI_AEST_NODE_SYSTEM_REGISTER 0
#define ACPI_AEST_NODE_MEMORY_MAPPED 1
#define ACPI_AEST_XFACE_RESERVED 2 /* 2 and above are reserved */
#define ACPI_AEST_NODE_SYSTEM_REGISTER 0
#define ACPI_AEST_NODE_MEMORY_MAPPED 1
#define ACPI_AEST_NODE_SINGLE_RECORD_MEMORY_MAPPED 2
#define ACPI_AEST_XFACE_RESERVED 3 /* 2 and above are reserved */
/* Node Interrupt Structure */
......@@ -236,6 +303,16 @@ typedef struct acpi_aest_node_interrupt {
} acpi_aest_node_interrupt;
/* Node Interrupt Structure V2 */
struct acpi_aest_node_interrupt_v2 {
u8 type;
u8 reserved[2];
u8 flags;
u32 gsiv;
u8 reserved1[4];
};
/* Values for Type field above */
#define ACPI_AEST_NODE_FAULT_HANDLING 0
......@@ -2751,6 +2828,134 @@ enum acpi_rasf_status {
#define ACPI_RASF_ERROR (1<<2)
#define ACPI_RASF_STATUS (0x1F<<3)
/*******************************************************************************
*
* RAS2 - RAS2 Feature Table (ACPI 6.5)
* Version 1
*
*
******************************************************************************/
struct acpi_table_ras2 {
struct acpi_table_header header; /* Common ACPI table header */
u16 reserved;
u16 num_pcc_descs;
};
/* RAS2 Platform Communication Channel Descriptor */
struct acpi_ras2_pcc_desc {
u8 channel_id;
u16 reserved;
u8 feature_type;
u32 instance;
};
/* RAS2 Platform Communication Channel Shared Memory Region */
struct acpi_ras2_shared_memory {
u32 signature;
u16 command;
u16 status;
u16 version;
u8 features[16];
u8 set_capabilities[16];
u16 num_parameter_blocks;
u32 set_capabilities_status;
};
/* RAS2 Parameter Block Structure for PATROL_SCRUB */
struct acpi_ras2_parameter_block {
u16 type;
u16 version;
u16 length;
};
/* RAS2 Parameter Block Structure for PATROL_SCRUB */
struct acpi_ras2_patrol_scrub_parameter {
struct acpi_ras2_parameter_block header;
u16 patrol_scrub_command;
u64 requested_address_range[2];
u64 actual_address_range[2];
u32 flags;
u32 scrub_params_out;
u32 scrub_params_in;
};
/* Masks for Flags field above */
#define ACPI_RAS2_SCRUBBER_RUNNING 1
/* RAS2 Parameter Block Structure for LA2PA_TRANSLATION */
struct acpi_ras2_la2pa_translation_parameter {
struct acpi_ras2_parameter_block header;
u16 addr_translation_command;
u64 sub_inst_id;
u64 logical_address;
u64 physical_address;
u32 status;
};
/* Channel Commands */
enum acpi_ras2_commands {
ACPI_RAS2_EXECUTE_RAS2_COMMAND = 1
};
/* Platform RAS2 Features */
enum acpi_ras2_features {
ACPI_RAS2_PATROL_SCRUB_SUPPORTED = 0,
ACPI_RAS2_LA2PA_TRANSLATION = 1
};
/* RAS2 Patrol Scrub Commands */
enum acpi_ras2_patrol_scrub_commands {
ACPI_RAS2_GET_PATROL_PARAMETERS = 1,
ACPI_RAS2_START_PATROL_SCRUBBER = 2,
ACPI_RAS2_STOP_PATROL_SCRUBBER = 3
};
/* RAS2 LA2PA Translation Commands */
enum acpi_ras2_la2_pa_translation_commands {
ACPI_RAS2_GET_LA2PA_TRANSLATION = 1,
};
/* RAS2 LA2PA Translation Status values */
enum acpi_ras2_la2_pa_translation_status {
ACPI_RAS2_LA2PA_TRANSLATION_SUCCESS = 0,
ACPI_RAS2_LA2PA_TRANSLATION_FAIL = 1,
};
/* Channel Command flags */
#define ACPI_RAS2_GENERATE_SCI (1<<15)
/* Status values */
enum acpi_ras2_status {
ACPI_RAS2_SUCCESS = 0,
ACPI_RAS2_NOT_VALID = 1,
ACPI_RAS2_NOT_SUPPORTED = 2,
ACPI_RAS2_BUSY = 3,
ACPI_RAS2_FAILED = 4,
ACPI_RAS2_ABORTED = 5,
ACPI_RAS2_INVALID_DATA = 6
};
/* Status flags */
#define ACPI_RAS2_COMMAND_COMPLETE (1)
#define ACPI_RAS2_SCI_DOORBELL (1<<1)
#define ACPI_RAS2_ERROR (1<<2)
#define ACPI_RAS2_STATUS (0x1F<<3)
/*******************************************************************************
*
* RGRT - Regulatory Graphics Resource Table
......
......@@ -192,7 +192,8 @@ enum acpi_srat_type {
ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */
ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5, /* ACPI 6.3 */
ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY = 6, /* ACPI 6.4 */
ACPI_SRAT_TYPE_RESERVED = 7 /* 7 and greater are reserved */
ACPI_SRAT_TYPE_RINTC_AFFINITY = 7, /* ACPI 6.6 */
ACPI_SRAT_TYPE_RESERVED = 8 /* 8 and greater are reserved */
};
/*
......@@ -296,6 +297,21 @@ struct acpi_srat_generic_affinity {
#define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1) /* 00: Use affinity structure */
#define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS (1<<1) /* ACPI 6.4 */
/* 7: RINTC Affinity Structure(ACPI 6.6) */
struct acpi_srat_rintc_affinity {
struct acpi_subtable_header header;
u16 reserved;
u32 proximity_domain;
u32 acpi_processor_uid;
u32 flags;
u32 clock_domain;
};
/* Flags for struct acpi_srat_rintc_affinity */
#define ACPI_SRAT_RINTC_ENABLED (1) /* 00: Use affinity structure */
/*******************************************************************************
*
* STAO - Status Override Table (_STA override) - ACPI 6.0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment