mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
cxl and related fixes for v6.18-rc6
- Fix incorrect device handle check for Generic Initiator - Fix offset calculation for extended linear cache poison injection - Fix lockdep warning for hmem_register_resource() -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE5DAy15EJMCV1R6v9YGjFFmlTOEoFAmkXTxYACgkQYGjFFmlT OEodJxAAnlN6Fmlb4K5I/CSJ+gACjBPEZRSBD2C2e7jk2bzg/VQlvdlpSxst6u0d tKFZ/+MJ3g4rCy1E6ePfukyl5wzUvh/oCdDdnaAAKOZyHB1SE0LUxKovbePLBCyl TRVT5VjQ8C3LI8pxMJ9oPLLdyrqpDof69EKdi3qAJchOwjGL7/2mekMbtBOpVIvo ds+huV0e2qYrVkz/+UWJCTtvOQZ8Tx+PCRkk/0I9QclILdkIK0ABoryAN8EDaKPD LtHj7W61FYV1gbfWXLjOBKq1oMfiayYm0ZKNSomxZfqw3OK2qvcjSkXosmWqw8I/ 9r9/asmW/ivedtv53m2W/2QOIvaFPgB6e2i0Rb7a2Bskh2/RAdeqXajqNJNBGWKo 70gp3UvEGpHibY1/LIhjeCZhsGjv0UjzEaC5PhhvlZOy6VsGtue/kv8kJcTcDOMT MGz4q6kbPmNB165kfsF/9LYgM+0zc/gpG+HRs+7qBhWVEmKTkAWmo60SfP89vJn+ pjEhOEYIm1TGO9J9fSsPrAg1UDJkCWADYYAskZNWB6leDPHGQ08axedO4JwI8qq8 ATfzUDw7zLlHO/6QrHp+d6Wk+6XOQRSjufwyW/K/0OvC9Br9yOFt41o0qGpP8bQI xQdh0HTDzCSbKlpn73r1IkAsK3HN/syOnC4HkbXvEviYBr/ZTYE= =FnRL -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
6014e75e87
@ -874,10 +874,32 @@ static void hmat_register_target_devices(struct memory_target *target)
|
||||
}
|
||||
}
|
||||
|
||||
static void hmat_register_target(struct memory_target *target)
|
||||
static void hmat_hotplug_target(struct memory_target *target)
|
||||
{
|
||||
int nid = pxm_to_node(target->memory_pxm);
|
||||
|
||||
/*
|
||||
* 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;
|
||||
|
||||
guard(mutex)(&target_lock);
|
||||
if (target->registered)
|
||||
return;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
static void hmat_register_target(struct memory_target *target)
|
||||
{
|
||||
/*
|
||||
* Devices may belong to either an offline or online
|
||||
* node, so unconditionally add them.
|
||||
@ -895,25 +917,7 @@ static void hmat_register_target(struct memory_target *target)
|
||||
}
|
||||
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)
|
||||
@ -939,7 +943,7 @@ static int hmat_callback(struct notifier_block *self,
|
||||
if (!target)
|
||||
return NOTIFY_OK;
|
||||
|
||||
hmat_register_target(target);
|
||||
hmat_hotplug_target(target);
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -237,7 +237,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
|
||||
struct acpi_srat_generic_affinity *p =
|
||||
(struct acpi_srat_generic_affinity *)header;
|
||||
|
||||
if (p->device_handle_type == 0) {
|
||||
if (p->device_handle_type == 1) {
|
||||
/*
|
||||
* For pci devices this may be the only place they
|
||||
* are assigned a proximity domain
|
||||
|
||||
@ -3702,6 +3702,7 @@ static int cxl_region_debugfs_poison_inject(void *data, u64 offset)
|
||||
if (validate_region_offset(cxlr, offset))
|
||||
return -EINVAL;
|
||||
|
||||
offset -= cxlr->params.cache_size;
|
||||
rc = region_offset_to_dpa_result(cxlr, offset, &result);
|
||||
if (rc || !result.cxlmd || result.dpa == ULLONG_MAX) {
|
||||
dev_dbg(&cxlr->dev,
|
||||
@ -3734,6 +3735,7 @@ static int cxl_region_debugfs_poison_clear(void *data, u64 offset)
|
||||
if (validate_region_offset(cxlr, offset))
|
||||
return -EINVAL;
|
||||
|
||||
offset -= cxlr->params.cache_size;
|
||||
rc = region_offset_to_dpa_result(cxlr, offset, &result);
|
||||
if (rc || !result.cxlmd || result.dpa == ULLONG_MAX) {
|
||||
dev_dbg(&cxlr->dev,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user