Skip to content

Commit

Permalink
Merge branch 'acpica'
Browse files Browse the repository at this point in the history
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 torvalds#900
  ACPICA: Fix various spelling mistakes in text files and code comments
  ACPICA: Attempt 1 to fix issue torvalds#900
  ACPICA: ACPI 6.5: RAS2: Add support for RAS2 table
  ACPICA: actbl1.h: Add EINJ CXL error types
  ACPI: disable -Wstringop-truncation
  • Loading branch information
rafaeljw committed May 11, 2024
2 parents c901f63 + e049249 commit 84fa7ad
Show file tree
Hide file tree
Showing 9 changed files with 314 additions and 47 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
107 changes: 71 additions & 36 deletions drivers/acpi/acpica/acobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
u8 descriptor_type; /* To differentiate various internal objs */\
u8 type; /* acpi_object_type */\
u16 reference_count; /* For object deletion management */\
u8 flags;
u8 flags
/*
* Note: There are 3 bytes available here before the
* next natural alignment boundary (for both 32/64 cases)
Expand All @@ -71,10 +71,12 @@
*****************************************************************************/

struct acpi_object_common {
ACPI_OBJECT_COMMON_HEADER};
ACPI_OBJECT_COMMON_HEADER;
};

struct acpi_object_integer {
ACPI_OBJECT_COMMON_HEADER u8 fill[3]; /* Prevent warning on some compilers */
ACPI_OBJECT_COMMON_HEADER;
u8 fill[3]; /* Prevent warning on some compilers */
u64 value;
};

Expand All @@ -86,23 +88,26 @@ struct acpi_object_integer {
*/
#define ACPI_COMMON_BUFFER_INFO(_type) \
_type *pointer; \
u32 length;
u32 length

/* Null terminated, ASCII characters only */

struct acpi_object_string {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(char) /* String in AML stream or allocated string */
ACPI_OBJECT_COMMON_HEADER;
ACPI_COMMON_BUFFER_INFO(char); /* String in AML stream or allocated string */
};

struct acpi_object_buffer {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(u8) /* Buffer in AML stream or allocated buffer */
ACPI_OBJECT_COMMON_HEADER;
ACPI_COMMON_BUFFER_INFO(u8); /* Buffer in AML stream or allocated buffer */
u32 aml_length;
u8 *aml_start;
struct acpi_namespace_node *node; /* Link back to parent node */
};

struct acpi_object_package {
ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Link back to parent node */
ACPI_OBJECT_COMMON_HEADER;
struct acpi_namespace_node *node; /* Link back to parent node */
union acpi_operand_object **elements; /* Array of pointers to acpi_objects */
u8 *aml_start;
u32 aml_length;
Expand All @@ -116,11 +121,13 @@ struct acpi_object_package {
*****************************************************************************/

struct acpi_object_event {
ACPI_OBJECT_COMMON_HEADER acpi_semaphore os_semaphore; /* Actual OS synchronization object */
ACPI_OBJECT_COMMON_HEADER;
acpi_semaphore os_semaphore; /* Actual OS synchronization object */
};

struct acpi_object_mutex {
ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */
ACPI_OBJECT_COMMON_HEADER;
u8 sync_level; /* 0-15, specified in Mutex() call */
u16 acquisition_depth; /* Allow multiple Acquires, same thread */
acpi_mutex os_mutex; /* Actual OS synchronization object */
acpi_thread_id thread_id; /* Current owner of the mutex */
Expand All @@ -132,7 +139,8 @@ struct acpi_object_mutex {
};

struct acpi_object_region {
ACPI_OBJECT_COMMON_HEADER u8 space_id;
ACPI_OBJECT_COMMON_HEADER;
u8 space_id;
struct acpi_namespace_node *node; /* Containing namespace node */
union acpi_operand_object *handler; /* Handler for region access */
union acpi_operand_object *next;
Expand All @@ -142,7 +150,8 @@ struct acpi_object_region {
};

struct acpi_object_method {
ACPI_OBJECT_COMMON_HEADER u8 info_flags;
ACPI_OBJECT_COMMON_HEADER;
u8 info_flags;
u8 param_count;
u8 sync_level;
union acpi_operand_object *mutex;
Expand Down Expand Up @@ -178,33 +187,43 @@ struct acpi_object_method {
*/
#define ACPI_COMMON_NOTIFY_INFO \
union acpi_operand_object *notify_list[2]; /* Handlers for system/device notifies */\
union acpi_operand_object *handler; /* Handler for Address space */
union acpi_operand_object *handler /* Handler for Address space */

/* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */

struct acpi_object_notify_common {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
ACPI_OBJECT_COMMON_HEADER;
ACPI_COMMON_NOTIFY_INFO;
};

struct acpi_object_device {
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO struct acpi_gpe_block_info *gpe_block;
ACPI_OBJECT_COMMON_HEADER;
ACPI_COMMON_NOTIFY_INFO;
struct acpi_gpe_block_info *gpe_block;
};

struct acpi_object_power_resource {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO u32 system_level;
ACPI_OBJECT_COMMON_HEADER;
ACPI_COMMON_NOTIFY_INFO;
u32 system_level;
u32 resource_order;
};

struct acpi_object_processor {
ACPI_OBJECT_COMMON_HEADER
/* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */
ACPI_OBJECT_COMMON_HEADER;

/* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */

u8 proc_id;
u8 length;
ACPI_COMMON_NOTIFY_INFO acpi_io_address address;
ACPI_COMMON_NOTIFY_INFO;
acpi_io_address address;
};

struct acpi_object_thermal_zone {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
ACPI_OBJECT_COMMON_HEADER;
ACPI_COMMON_NOTIFY_INFO;
};

/******************************************************************************
*
Expand All @@ -226,42 +245,52 @@ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
u32 base_byte_offset; /* Byte offset within containing object */\
u32 value; /* Value to store into the Bank or Index register */\
u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
u8 access_length; /* For serial regions/fields */
u8 access_length /* For serial regions/fields */


/* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */

struct acpi_object_field_common {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Parent Operation Region object (REGION/BANK fields only) */
ACPI_OBJECT_COMMON_HEADER;
ACPI_COMMON_FIELD_INFO;
union acpi_operand_object *region_obj; /* Parent Operation Region object (REGION/BANK fields only) */
};

struct acpi_object_region_field {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO u16 resource_length;
ACPI_OBJECT_COMMON_HEADER;
ACPI_COMMON_FIELD_INFO;
u16 resource_length;
union acpi_operand_object *region_obj; /* Containing op_region object */
u8 *resource_buffer; /* resource_template for serial regions/fields */
u16 pin_number_index; /* Index relative to previous Connection/Template */
u8 *internal_pcc_buffer; /* Internal buffer for fields associated with PCC */
};

struct acpi_object_bank_field {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */
ACPI_OBJECT_COMMON_HEADER;
ACPI_COMMON_FIELD_INFO;
union acpi_operand_object *region_obj; /* Containing op_region object */
union acpi_operand_object *bank_obj; /* bank_select Register object */
};

struct acpi_object_index_field {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO
/*
* No "RegionObj" pointer needed since the Index and Data registers
* are each field definitions unto themselves.
*/
ACPI_OBJECT_COMMON_HEADER;
ACPI_COMMON_FIELD_INFO;

/*
* No "RegionObj" pointer needed since the Index and Data registers
* are each field definitions unto themselves.
*/
union acpi_operand_object *index_obj; /* Index register */
union acpi_operand_object *data_obj; /* Data register */
};

/* The buffer_field is different in that it is part of a Buffer, not an op_region */

struct acpi_object_buffer_field {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO u8 is_create_field; /* Special case for objects created by create_field() */
ACPI_OBJECT_COMMON_HEADER;
ACPI_COMMON_FIELD_INFO;
u8 is_create_field; /* Special case for objects created by create_field() */
union acpi_operand_object *buffer_obj; /* Containing Buffer object */
};

Expand All @@ -272,15 +301,17 @@ struct acpi_object_buffer_field {
*****************************************************************************/

struct acpi_object_notify_handler {
ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *node; /* Parent device */
ACPI_OBJECT_COMMON_HEADER;
struct acpi_namespace_node *node; /* Parent device */
u32 handler_type; /* Type: Device/System/Both */
acpi_notify_handler handler; /* Handler address */
void *context;
union acpi_operand_object *next[2]; /* Device and System handler lists */
};

struct acpi_object_addr_handler {
ACPI_OBJECT_COMMON_HEADER u8 space_id;
ACPI_OBJECT_COMMON_HEADER;
u8 space_id;
u8 handler_flags;
acpi_adr_space_handler handler;
struct acpi_namespace_node *node; /* Parent device */
Expand All @@ -307,7 +338,8 @@ struct acpi_object_addr_handler {
* The Reference.Class differentiates these types.
*/
struct acpi_object_reference {
ACPI_OBJECT_COMMON_HEADER u8 class; /* Reference Class */
ACPI_OBJECT_COMMON_HEADER;
u8 class; /* Reference Class */
u8 target_type; /* Used for Index Op */
u8 resolved; /* Reference has been resolved to a value */
void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */
Expand Down Expand Up @@ -340,7 +372,8 @@ typedef enum {
* Currently: Region and field_unit types
*/
struct acpi_object_extra {
ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
ACPI_OBJECT_COMMON_HEADER;
struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
struct acpi_namespace_node *scope_node;
void *region_context; /* Region-specific data */
u8 *aml_start;
Expand All @@ -350,14 +383,16 @@ struct acpi_object_extra {
/* Additional data that can be attached to namespace nodes */

struct acpi_object_data {
ACPI_OBJECT_COMMON_HEADER acpi_object_handler handler;
ACPI_OBJECT_COMMON_HEADER;
acpi_object_handler handler;
void *pointer;
};

/* Structure used when objects are cached for reuse */

struct acpi_object_cache_list {
ACPI_OBJECT_COMMON_HEADER union acpi_operand_object *next; /* Link for object cache and internal lists */
ACPI_OBJECT_COMMON_HEADER;
union acpi_operand_object *next; /* Link for object cache and internal lists */
};

/******************************************************************************
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/acpica/evgpeinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions drivers/acpi/acpica/utdebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion include/acpi/acpixf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
8 changes: 6 additions & 2 deletions include/acpi/actbl1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)

/*******************************************************************************
Expand Down
Loading

0 comments on commit 84fa7ad

Please sign in to comment.