]> Gentwo Git Trees - linux/.git/commitdiff
Merge tag 'cxl-for-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Dec 2025 01:55:18 +0000 (17:55 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Dec 2025 01:55:18 +0000 (17:55 -0800)
Pull compute express link (CXL) updates from Dave Jiang:
 "The additions of note are adding CXL region remove support for locked
  CXL decoders, adding unit testing support for XOR address translation,
  and adding unit testing support for extended linear cache.

  Misc:
   - Remove incorrect page-allocator quirk section in documentation
   - Remove unused devm_cxl_port_enumerate_dports() function
   - Fix typo in cdat.c code comment
   - Replace use of system_wq with system_percpu_wq
   - Add locked CXL decoder support for region removal
   - Return when generic target updated
   - Rename region_res_match_cxl_range() to spa_maps_hpa()
   - Clarify comment in spa_maps_hpa()

  Enable unit testing for XOR address translation of SPA to DPA and vice versa:
   - Refactor address translation funcs for testing in cxl_region
   - Make the XOR calculations available for testing
   - Add cxl_translate module for address translation testing in
     cxl_test

  Extended Linear Cache changes:
   - Add extended linear cache size sysfs attribute
   - Adjust failure emission of extended linear cache detection in
     cxl_acpi
   - Added extended linear cache unit testing support in cxl_test

  Preparation refactor patches for PRM translation support:
   - Simplify cxl_rd_ops allocation and handling
   - Group xor arithmetric setup code in a single block
   - Remove local variable @inc in cxl_port_setup_targets()"

* tag 'cxl-for-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (22 commits)
  cxl/test: Assign overflow_err_count from log->nr_overflow
  cxl/test: Remove ret_limit race condition in mock_get_event()
  cxl/test: remove unused mock function for cxl_rcd_component_reg_phys()
  cxl/test: Add support for acpi extended linear cache
  cxl/test: Add cxl_test CFMWS support for extended linear cache
  cxl/test: Standardize CXL auto region size
  cxl/region: Remove local variable @inc in cxl_port_setup_targets()
  cxl/acpi: Group xor arithmetric setup code in a single block
  cxl: Simplify cxl_rd_ops allocation and handling
  cxl: Clarify comment in spa_maps_hpa()
  cxl: Rename region_res_match_cxl_range() to spa_maps_hpa()
  acpi/hmat: Return when generic target is updated
  cxl: Add handling of locked CXL decoder
  cxl/region: Add support to indicate region has extended linear cache
  cxl: Adjust extended linear cache failure emission in cxl_acpi
  cxl/test: Add cxl_translate module for address translation testing
  cxl/acpi: Make the XOR calculations available for testing
  cxl/region: Refactor address translation funcs for testing
  cxl/pci: replace use of system_wq with system_percpu_wq
  cxl: fix typos in cdat.c comments
  ...

1  2 
drivers/acpi/numa/hmat.c
drivers/cxl/core/region.c

index 11e4483685c9cff9f1497842cdfea0b7e60b3d2c,1dc73d20d989519bc48e1f87b61562dcc3a23cca..77a81627aaefd6debb7f7704ac58ded214e68782
@@@ -910,14 -888,33 +910,15 @@@ static void hmat_register_target(struc
         * Register generic port perf numbers. The nid may not be
         * initialized and is still NUMA_NO_NODE.
         */
-       mutex_lock(&target_lock);
-       if (*(u16 *)target->gen_port_device_handle) {
-               hmat_update_generic_target(target);
-               target->registered = true;
+       scoped_guard(mutex, &target_lock) {
+               if (*(u16 *)target->gen_port_device_handle) {
+                       hmat_update_generic_target(target);
+                       target->registered = true;
+                       return;
+               }
        }
-       mutex_unlock(&target_lock);
  
 -      /*
 -       * Skip offline nodes. This can happen when memory
 -       * marked EFI_MEMORY_SP, "specific purpose", is applied
 -       * to all the memory in a proximity domain leading to
 -       * the node being marked offline / unplugged, or if
 -       * memory-only "hotplug" node is offline.
 -       */
 -      if (nid == NUMA_NO_NODE || !node_online(nid))
 -              return;
 -
 -      mutex_lock(&target_lock);
 -      if (!target->registered) {
 -              hmat_register_target_initiators(target);
 -              hmat_register_target_cache(target);
 -              hmat_register_target_perf(target, ACCESS_COORDINATE_LOCAL);
 -              hmat_register_target_perf(target, ACCESS_COORDINATE_CPU);
 -              target->registered = true;
 -      }
 -      mutex_unlock(&target_lock);
 +      hmat_hotplug_target(target);
  }
  
  static void hmat_register_targets(void)
Simple merge