]> Git Repo - linux.git/commitdiff
Merge tag 'cxl-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
authorLinus Torvalds <[email protected]>
Fri, 19 Jan 2024 00:22:43 +0000 (16:22 -0800)
committerLinus Torvalds <[email protected]>
Fri, 19 Jan 2024 00:22:43 +0000 (16:22 -0800)
Pull CXL (Compute Express Link) updates from Dan Williams:
 "The bulk of this update is support for enumerating the performance
  capabilities of CXL memory targets and connecting that to a platform
  CXL memory QoS class. Some follow-on work remains to hook up this data
  into core-mm policy, but that is saved for v6.9.

  The next significant update is unifying how CXL event records (things
  like background scrub errors) are processed between so called
  "firmware first" and native error record retrieval. The CXL driver
  handler that processes the record retrieved from the device mailbox is
  now the handler for that same record format coming from an EFI/ACPI
  notification source.

  This also contains miscellaneous feature updates, like Get Timestamp,
  and other fixups.

  Summary:

   - Add support for parsing the Coherent Device Attribute Table (CDAT)

   - Add support for calculating a platform CXL QoS class from CDAT data

   - Unify the tracing of EFI CXL Events with native CXL Events.

   - Add Get Timestamp support

   - Miscellaneous cleanups and fixups"

* tag 'cxl-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (41 commits)
  cxl/core: use sysfs_emit() for attr's _show()
  cxl/pci: Register for and process CPER events
  PCI: Introduce cleanup helpers for device reference counts and locks
  acpi/ghes: Process CXL Component Events
  cxl/events: Create a CXL event union
  cxl/events: Separate UUID from event structures
  cxl/events: Remove passing a UUID to known event traces
  cxl/events: Create common event UUID defines
  cxl/events: Promote CXL event structures to a core header
  cxl: Refactor to use __free() for cxl_root allocation in cxl_endpoint_port_probe()
  cxl: Refactor to use __free() for cxl_root allocation in cxl_find_nvdimm_bridge()
  cxl: Fix device reference leak in cxl_port_perf_data_calculate()
  cxl: Convert find_cxl_root() to return a 'struct cxl_root *'
  cxl: Introduce put_cxl_root() helper
  cxl/port: Fix missing target list lock
  cxl/port: Fix decoder initialization when nr_targets > interleave_ways
  cxl/region: fix x9 interleave typo
  cxl/trace: Pass UUID explicitly to event traces
  cxl/region: use %pap format to print resource_size_t
  cxl/region: Add dev_dbg() detail on failure to allocate HPA space
  ...

1  2 
MAINTAINERS
drivers/acpi/apei/ghes.c
drivers/base/node.c
drivers/pci/pci.c
include/linux/acpi.h
include/linux/pci.h
lib/fw_table.c

diff --cc MAINTAINERS
Simple merge
index ab2a82cb1b0b48ab21682bdb87c052707f19d282,56a5d2ef9e0a0a04948b2e2cc35f5cdea0fe0d9c..7b7c605166e0c1c7d2a4c9e1f1bce1f05799d4f6
@@@ -706,7 -762,23 +779,23 @@@ static bool ghes_do_proc(struct ghes *g
                        ghes_handle_aer(gdata);
                }
                else if (guid_equal(sec_type, &CPER_SEC_PROC_ARM)) {
 -                      queued = ghes_handle_arm_hw_error(gdata, sev);
 +                      queued = ghes_handle_arm_hw_error(gdata, sev, sync);
+               } else if (guid_equal(sec_type, &CPER_SEC_CXL_GEN_MEDIA_GUID)) {
+                       struct cxl_cper_event_rec *rec =
+                               acpi_hest_get_payload(gdata);
+                       cxl_cper_post_event(CXL_CPER_EVENT_GEN_MEDIA, rec);
+               } else if (guid_equal(sec_type, &CPER_SEC_CXL_DRAM_GUID)) {
+                       struct cxl_cper_event_rec *rec =
+                               acpi_hest_get_payload(gdata);
+                       cxl_cper_post_event(CXL_CPER_EVENT_DRAM, rec);
+               } else if (guid_equal(sec_type,
+                                     &CPER_SEC_CXL_MEM_MODULE_GUID)) {
+                       struct cxl_cper_event_rec *rec =
+                               acpi_hest_get_payload(gdata);
+                       cxl_cper_post_event(CXL_CPER_EVENT_MEM_MODULE, rec);
                } else {
                        void *err = acpi_hest_get_payload(gdata);
  
Simple merge
Simple merge
index 118a18b7ff844a357cba99eeb5272bbdc2165f7d,8b0761c682f992a518812e0734b2eddc884c502e..b7165e52b3c687bde0d295e7094cff66f5aebd48
@@@ -424,13 -425,16 +425,23 @@@ extern int acpi_blacklisted(void)
  extern void acpi_osi_setup(char *str);
  extern bool acpi_osi_is_win8(void);
  
 +#ifdef CONFIG_ACPI_THERMAL_LIB
 +int thermal_acpi_active_trip_temp(struct acpi_device *adev, int id, int *ret_temp);
 +int thermal_acpi_passive_trip_temp(struct acpi_device *adev, int *ret_temp);
 +int thermal_acpi_hot_trip_temp(struct acpi_device *adev, int *ret_temp);
 +int thermal_acpi_critical_trip_temp(struct acpi_device *adev, int *ret_temp);
 +#endif
 +
+ #ifdef CONFIG_ACPI_HMAT
+ int acpi_get_genport_coordinates(u32 uid, struct access_coordinate *coord);
+ #else
+ static inline int acpi_get_genport_coordinates(u32 uid,
+                                              struct access_coordinate *coord)
+ {
+       return -EOPNOTSUPP;
+ }
+ #endif
  #ifdef CONFIG_ACPI_NUMA
  int acpi_map_pxm_to_node(int pxm);
  int acpi_get_node(acpi_handle handle);
Simple merge
diff --cc lib/fw_table.c
index c49a09ee3853cda00d60fa73f711d44094abdfb4,1e5e0b2f70120374577124beb3cb537a4a2e4baa..c3569d2ba503f4d24282a649bba4d147f358859b
@@@ -85,9 -98,27 +98,22 @@@ acpi_get_subtable_type(char *id
        return ACPI_SUBTABLE_COMMON;
  }
  
- static __init_or_acpilib int call_handler(struct acpi_subtable_proc *proc,
-                                         union acpi_subtable_headers *hdr,
-                                         unsigned long end)
+ static unsigned long __init_or_fwtbl_lib
+ acpi_table_get_length(enum acpi_subtable_type type,
+                     union fw_table_header *header)
+ {
+       if (type == CDAT_SUBTABLE) {
+               __le32 length = (__force __le32)header->cdat.length;
+               return le32_to_cpu(length);
+       }
+       return header->acpi.length;
+ }
 -static __init_or_fwtbl_lib bool has_handler(struct acpi_subtable_proc *proc)
 -{
 -      return proc->handler || proc->handler_arg;
 -}
 -
+ static __init_or_fwtbl_lib int call_handler(struct acpi_subtable_proc *proc,
+                                           union acpi_subtable_headers *hdr,
+                                           unsigned long end)
  {
        if (proc->handler)
                return proc->handler(hdr, end);
@@@ -127,10 -158,14 +153,13 @@@ acpi_parse_entries_array(char *id, unsi
  {
        unsigned long table_end, subtable_len, entry_len;
        struct acpi_subtable_entry entry;
+       enum acpi_subtable_type type;
        int count = 0;
 -      int errs = 0;
        int i;
  
-       table_end = (unsigned long)table_header + table_header->length;
+       type = acpi_get_subtable_type(id);
+       table_end = (unsigned long)table_header +
+                   acpi_table_get_length(type, table_header);
  
        /* Parse all entries looking for a match. */
  
        }
  
        if (max_entries && count > max_entries) {
 -              pr_warn("[%4.4s:0x%02x] found the maximum %i entries\n",
 -                      id, proc->id, count);
 +              pr_warn("[%4.4s:0x%02x] ignored %i entries of %i found\n",
 +                      id, proc->id, count - max_entries, count);
        }
  
 -      return errs ? -EINVAL : count;
 +      return count;
  }
+ int __init_or_fwtbl_lib
+ cdat_table_parse(enum acpi_cdat_type type,
+                acpi_tbl_entry_handler_arg handler_arg,
+                void *arg,
+                struct acpi_table_cdat *table_header)
+ {
+       struct acpi_subtable_proc proc = {
+               .id             = type,
+               .handler_arg    = handler_arg,
+               .arg            = arg,
+       };
+       if (!table_header)
+               return -EINVAL;
+       return acpi_parse_entries_array(ACPI_SIG_CDAT,
+                                       sizeof(struct acpi_table_cdat),
+                                       (union fw_table_header *)table_header,
+                                       &proc, 1, 0);
+ }
+ EXPORT_SYMBOL_FWTBL_LIB(cdat_table_parse);
This page took 0.142416 seconds and 4 git commands to generate.