Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'cxl-fixes-6.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl

Pull cxl fixes from Dave Jiang:

- Fix incorrect device handle check for Generic Initiator

- Fix offset calculation for extended linear cache poison injection

- Fix lockdep warning for hmem_register_resource()

* tag 'cxl-fixes-6.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
acpi/hmat: Fix lockdep warning for hmem_register_resource()
cxl: Adjust offset calculation for poison injection
acpi,srat: Fix incorrect device handle check for Generic Initiator

+28 -22
+25 -21
drivers/acpi/numa/hmat.c
··· 874 874 } 875 875 } 876 876 877 - static void hmat_register_target(struct memory_target *target) 877 + static void hmat_hotplug_target(struct memory_target *target) 878 878 { 879 879 int nid = pxm_to_node(target->memory_pxm); 880 880 881 + /* 882 + * Skip offline nodes. This can happen when memory marked EFI_MEMORY_SP, 883 + * "specific purpose", is applied to all the memory in a proximity 884 + * domain leading to * the node being marked offline / unplugged, or if 885 + * memory-only "hotplug" node is offline. 886 + */ 887 + if (nid == NUMA_NO_NODE || !node_online(nid)) 888 + return; 889 + 890 + guard(mutex)(&target_lock); 891 + if (target->registered) 892 + return; 893 + 894 + hmat_register_target_initiators(target); 895 + hmat_register_target_cache(target); 896 + hmat_register_target_perf(target, ACCESS_COORDINATE_LOCAL); 897 + hmat_register_target_perf(target, ACCESS_COORDINATE_CPU); 898 + target->registered = true; 899 + } 900 + 901 + static void hmat_register_target(struct memory_target *target) 902 + { 881 903 /* 882 904 * Devices may belong to either an offline or online 883 905 * node, so unconditionally add them. ··· 917 895 } 918 896 mutex_unlock(&target_lock); 919 897 920 - /* 921 - * Skip offline nodes. This can happen when memory 922 - * marked EFI_MEMORY_SP, "specific purpose", is applied 923 - * to all the memory in a proximity domain leading to 924 - * the node being marked offline / unplugged, or if 925 - * memory-only "hotplug" node is offline. 926 - */ 927 - if (nid == NUMA_NO_NODE || !node_online(nid)) 928 - return; 929 - 930 - mutex_lock(&target_lock); 931 - if (!target->registered) { 932 - hmat_register_target_initiators(target); 933 - hmat_register_target_cache(target); 934 - hmat_register_target_perf(target, ACCESS_COORDINATE_LOCAL); 935 - hmat_register_target_perf(target, ACCESS_COORDINATE_CPU); 936 - target->registered = true; 937 - } 938 - mutex_unlock(&target_lock); 898 + hmat_hotplug_target(target); 939 899 } 940 900 941 901 static void hmat_register_targets(void) ··· 943 939 if (!target) 944 940 return NOTIFY_OK; 945 941 946 - hmat_register_target(target); 942 + hmat_hotplug_target(target); 947 943 return NOTIFY_OK; 948 944 } 949 945
+1 -1
drivers/acpi/numa/srat.c
··· 237 237 struct acpi_srat_generic_affinity *p = 238 238 (struct acpi_srat_generic_affinity *)header; 239 239 240 - if (p->device_handle_type == 0) { 240 + if (p->device_handle_type == 1) { 241 241 /* 242 242 * For pci devices this may be the only place they 243 243 * are assigned a proximity domain
+2
drivers/cxl/core/region.c
··· 3702 3702 if (validate_region_offset(cxlr, offset)) 3703 3703 return -EINVAL; 3704 3704 3705 + offset -= cxlr->params.cache_size; 3705 3706 rc = region_offset_to_dpa_result(cxlr, offset, &result); 3706 3707 if (rc || !result.cxlmd || result.dpa == ULLONG_MAX) { 3707 3708 dev_dbg(&cxlr->dev, ··· 3735 3734 if (validate_region_offset(cxlr, offset)) 3736 3735 return -EINVAL; 3737 3736 3737 + offset -= cxlr->params.cache_size; 3738 3738 rc = region_offset_to_dpa_result(cxlr, offset, &result); 3739 3739 if (rc || !result.cxlmd || result.dpa == ULLONG_MAX) { 3740 3740 dev_dbg(&cxlr->dev,