Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
663a7e0
Revert "NVIDIA: VR: SAUCE: cxl: add support for cxl reset"
JiandiAnNVIDIA Feb 16, 2026
9873464
cxl/hdm: Use str_plural() to simplify the code
Aug 11, 2025
97c08e9
cxl/region: use str_enabled_disabled() instead of ternary operator
SimoneCheng Aug 11, 2025
c00d37a
cxl: Move hpa_to_spa callback to a new root decoder ops structure
AlisonSchofield Aug 4, 2025
abd99e4
cxl: Define a SPA->CXL HPA root decoder callback for XOR Math
AlisonSchofield Aug 4, 2025
5cb3a59
cxl/region: Introduce SPA to DPA address translation
AlisonSchofield Aug 4, 2025
0476df8
cxl/core: Add locked variants of the poison inject and clear funcs
AlisonSchofield Aug 4, 2025
0ff5551
cxl/region: Add inject and clear poison by region offset
AlisonSchofield Aug 4, 2025
83f361b
cxl: Fix emit of type resource_size_t argument for validate_region_of…
davejiang Aug 18, 2025
f36e40d
mm/memory_hotplug: Update comment for hotplug memory callback priorities
davejiang Aug 29, 2025
a1c6edc
drivers/base/node: Add a helper function node_update_perf_attrs()
davejiang Aug 29, 2025
0dce4a1
cxl, acpi/hmat: Update CXL access coordinates directly instead of thr…
davejiang Aug 29, 2025
8daa7a0
acpi/hmat: Remove now unused hmat_update_target_coordinates()
davejiang Aug 29, 2025
c58780a
Documentation/driver-api: Fix typo error in cxl
rakurame96 Aug 18, 2025
441d4f0
cxl/acpi: Rename CFMW coherency restrictions
Sep 8, 2025
a36b603
cxl: Documentation/driver-api/cxl: Describe the x86 Low Memory Hole s…
fdefranc Sep 15, 2025
0ac8dce
cxl: Add helper to detect top of CXL device topology
davejiang Aug 29, 2025
c5128ea
cxl: Add helper to delete dport
davejiang Aug 29, 2025
d8d4bde
cxl: Add a cached copy of target_map to cxl_decoder
davejiang Aug 29, 2025
d620777
cxl/test: Refactor decoder setup to reduce cxl_test burden
davejiang Aug 29, 2025
3881b4a
cxl: Defer dport allocation for switch ports
davejiang Aug 29, 2025
c2204c1
cxl/port: Fix target list setup for multiple decoders sharing the sam…
Jan 8, 2026
09001fd
cxl/test: Add mock version of devm_cxl_add_dport_by_dev()
davejiang Aug 29, 2025
6b3738e
cxl/test: Adjust the mock version of devm_cxl_switch_port_decoders_se…
davejiang Aug 29, 2025
624c480
cxl/test: Setup target_map for cxl_test decoder initialization
davejiang Aug 29, 2025
1be96d7
cxl: Change sslbis handler to only handle single dport
davejiang Aug 29, 2025
f905944
cxl: Move port register setup to when first dport appear
davejiang Aug 14, 2025
4431d50
cxl/port: Avoid missing port component registers setup
MingLi-4 Oct 1, 2025
a00440e
cxl/region: Use %pa printk format to emit resource_size_t
AlisonSchofield Oct 14, 2025
40a04c3
NVIDIA: VR: SAUCE: CXL/PCI: Move CXL DVSEC definitions into uapi/linu…
ktbowman Nov 4, 2025
f3dd0fc
NVIDIA: VR: SAUCE: PCI/CXL: Introduce pcie_is_cxl()
ktbowman Nov 4, 2025
df32d3a
NVIDIA: VR: SAUCE: cxl/pci: Remove unnecessary CXL Endpoint handling …
ktbowman Nov 4, 2025
ed19eda
NVIDIA: VR: SAUCE: cxl/pci: Remove unnecessary CXL RCH handling helpe…
ktbowman Nov 4, 2025
b6efb5e
NVIDIA: VR: SAUCE: cxl: Remove CXL VH handling in CONFIG_PCIEAER_CXL …
davejiang Nov 4, 2025
a3c6df7
NVIDIA: VR: SAUCE: cxl: Move CXL driver's RCH error handling into cor…
ktbowman Nov 4, 2025
60015f7
NVIDIA: VR: SAUCE: CXL/AER: Replace device_lock() in cxl_rch_handle_e…
ktbowman Nov 4, 2025
d9f5dfe
NVIDIA: VR: SAUCE: CXL/AER: Move AER drivers RCH error handling into …
ktbowman Nov 4, 2025
1c2ecaf
NVIDIA: VR: SAUCE: PCI/AER: Report CXL or PCIe bus error type in trac…
ktbowman Nov 4, 2025
1a879f9
NVIDIA: VR: SAUCE: cxl/pci: Update RAS handler interfaces to also sup…
ktbowman Nov 4, 2025
f139cf6
NVIDIA: VR: SAUCE: cxl/pci: Log message if RAS registers are unmapped
ktbowman Nov 4, 2025
53aa86d
NVIDIA: VR: SAUCE: cxl/pci: Unify CXL trace logging for CXL Endpoints…
ktbowman Nov 4, 2025
4f43fe0
NVIDIA: VR: SAUCE: cxl/pci: Update cxl_handle_cor_ras() to return ear…
ktbowman Nov 4, 2025
392aaad
NVIDIA: VR: SAUCE: cxl/pci: Map CXL Endpoint Port and CXL Switch Port…
ktbowman Nov 4, 2025
210eb9c
NVIDIA: VR: SAUCE: CXL/PCI: Introduce PCI_ERS_RESULT_PANIC
ktbowman Nov 4, 2025
03af83e
NVIDIA: VR: SAUCE: CXL/AER: Introduce pcie/aer_cxl_vh.c in AER driver…
ktbowman Nov 4, 2025
129a255
NVIDIA: VR: SAUCE: cxl: Introduce cxl_pci_drv_bound() to check for bo…
ktbowman Nov 4, 2025
3f6c9ef
NVIDIA: VR: SAUCE: cxl: Change CXL handlers to use guard() instead of…
ktbowman Nov 4, 2025
6332a97
NVIDIA: VR: SAUCE: cxl/pci: Introduce CXL protocol error handlers for…
ktbowman Nov 4, 2025
e1d1d12
NVIDIA: VR: SAUCE: CXL/PCI: Introduce CXL Port protocol error handlers
ktbowman Nov 4, 2025
c7c888e
NVIDIA: VR: SAUCE: PCI/AER: Dequeue forwarded CXL error
ktbowman Nov 4, 2025
579482c
NVIDIA: VR: SAUCE: CXL/PCI: Export and rename merge_result() to pci_e…
ktbowman Nov 4, 2025
eab2c4d
NVIDIA: VR: SAUCE: CXL/PCI: Introduce CXL uncorrectable protocol erro…
ktbowman Nov 4, 2025
b91e1d4
NVIDIA: VR: SAUCE: CXL/PCI: Enable CXL protocol errors during CXL Por…
ktbowman Nov 4, 2025
47a674c
NVIDIA: VR: SAUCE: CXL/PCI: Disable CXL protocol error interrupts dur…
ktbowman Nov 4, 2025
ebc76f8
NVIDIA: VR: SAUCE: cxl/mem: Arrange for always-synchronous memdev attach
Dec 5, 2025
d42c809
NVIDIA: VR: SAUCE: cxl/port: Arrange for always synchronous endpoint …
djbw Dec 5, 2025
693cf4a
NVIDIA: VR: SAUCE: cxl/mem: Introduce a memdev creation ->probe() ope…
djbw Dec 5, 2025
a867210
NVIDIA: VR: SAUCE: cxl: Add type2 device basic support
alucerop Dec 5, 2025
69bf7dd
NVIDIA: VR: SAUCE: sfc: add cxl support
alucerop Dec 5, 2025
05e993a
NVIDIA: VR: SAUCE: cxl: Move pci generic code
alucerop Dec 5, 2025
8d9cb74
NVIDIA: VR: SAUCE: cxl/sfc: Map cxl component regs
alucerop Dec 5, 2025
71f28dc
NVIDIA: VR: SAUCE: cxl/sfc: Initialize dpa without a mailbox
alucerop Dec 5, 2025
c71ef2b
NVIDIA: VR: SAUCE: cxl: Prepare memdev creation for type2
alucerop Dec 5, 2025
11e616e
NVIDIA: VR: SAUCE: sfc: create type2 cxl memdev
alucerop Dec 5, 2025
49c3fd4
NVIDIA: VR: SAUCE: cxl/hdm: Add support for getting region from commi…
alucerop Dec 5, 2025
b17b6a2
NVIDIA: VR: SAUCE: cxl: Add function for obtaining region range
alucerop Dec 5, 2025
7bd6e2b
NVIDIA: VR: SAUCE: cxl: Export functions for unwinding cxl by acceler…
alucerop Dec 5, 2025
a8397ce
NVIDIA: VR: SAUCE: sfc: obtain decoder and region if committed by fir…
alucerop Dec 5, 2025
192fd8e
NVIDIA: VR: SAUCE: cxl: Define a driver interface for HPA free space …
alucerop Dec 5, 2025
f96b711
NVIDIA: VR: SAUCE: sfc: get root decoder
alucerop Dec 5, 2025
962afbc
NVIDIA: VR: SAUCE: cxl: Define a driver interface for DPA allocation
alucerop Dec 5, 2025
a9dab95
NVIDIA: VR: SAUCE: sfc: get endpoint decoder
alucerop Dec 5, 2025
fca7c05
NVIDIA: VR: SAUCE: cxl: Make region type based on endpoint type
alucerop Dec 5, 2025
a5b7643
NVIDIA: VR: SAUCE: cxl/region: Factor out interleave ways setup
alucerop Dec 5, 2025
6136b2d
NVIDIA: VR: SAUCE: cxl/region: Factor out interleave granularity setup
alucerop Dec 5, 2025
757ac63
NVIDIA: VR: SAUCE: cxl: Allow region creation by type2 drivers
alucerop Dec 5, 2025
43ffc35
NVIDIA: VR: SAUCE: cxl: Avoid dax creation for accelerators
alucerop Dec 5, 2025
8953003
NVIDIA: VR: SAUCE: sfc: create cxl region
alucerop Dec 5, 2025
01fda77
NVIDIA: VR: SAUCE: sfc: support pio mapping based on cxl
alucerop Dec 5, 2025
2df3b8f
NVIDIA: VR: SAUCE: [Config] CXL config change for CXL type 2 and CXL …
JiandiAnNVIDIA Feb 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions Documentation/ABI/testing/debugfs-cxl
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ Description:
is returned to the user. The inject_poison attribute is only
visible for devices supporting the capability.

TEST-ONLY INTERFACE: This interface is intended for testing
and validation purposes only. It is not a data repair mechanism
and should never be used on production systems or live data.

DATA LOSS RISK: For CXL persistent memory (PMEM) devices,
poison injection can result in permanent data loss. Injected
poison may render data permanently inaccessible even after
clearing, as the clear operation writes zeros and does not
recover original data.

SYSTEM STABILITY RISK: For volatile memory, poison injection
can cause kernel crashes, system instability, or unpredictable
behavior if the poisoned addresses are accessed by running code
or critical kernel structures.

What: /sys/kernel/debug/cxl/memX/clear_poison
Date: April, 2023
Expand All @@ -35,6 +49,79 @@ Description:
The clear_poison attribute is only visible for devices
supporting the capability.

TEST-ONLY INTERFACE: This interface is intended for testing
and validation purposes only. It is not a data repair mechanism
and should never be used on production systems or live data.

CLEAR IS NOT DATA RECOVERY: This operation writes zeros to the
specified address range and removes the address from the poison
list. It does NOT recover or restore original data that may have
been present before poison injection. Any original data at the
cleared address is permanently lost and replaced with zeros.

CLEAR IS NOT A REPAIR MECHANISM: This interface is for testing
purposes only and should not be used as a data repair tool.
Clearing poison is fundamentally different from data recovery
or error correction.

What: /sys/kernel/debug/cxl/regionX/inject_poison
Date: August, 2025
Contact: linux-cxl@vger.kernel.org
Description:
(WO) When a Host Physical Address (HPA) is written to this
attribute, the region driver translates it to a Device
Physical Address (DPA) and identifies the corresponding
memdev. It then sends an inject poison command to that memdev
at the translated DPA. Refer to the memdev ABI entry at:
/sys/kernel/debug/cxl/memX/inject_poison for the detailed
behavior. This attribute is only visible if all memdevs
participating in the region support both inject and clear
poison commands.

TEST-ONLY INTERFACE: This interface is intended for testing
and validation purposes only. It is not a data repair mechanism
and should never be used on production systems or live data.

DATA LOSS RISK: For CXL persistent memory (PMEM) devices,
poison injection can result in permanent data loss. Injected
poison may render data permanently inaccessible even after
clearing, as the clear operation writes zeros and does not
recover original data.

SYSTEM STABILITY RISK: For volatile memory, poison injection
can cause kernel crashes, system instability, or unpredictable
behavior if the poisoned addresses are accessed by running code
or critical kernel structures.

What: /sys/kernel/debug/cxl/regionX/clear_poison
Date: August, 2025
Contact: linux-cxl@vger.kernel.org
Description:
(WO) When a Host Physical Address (HPA) is written to this
attribute, the region driver translates it to a Device
Physical Address (DPA) and identifies the corresponding
memdev. It then sends a clear poison command to that memdev
at the translated DPA. Refer to the memdev ABI entry at:
/sys/kernel/debug/cxl/memX/clear_poison for the detailed
behavior. This attribute is only visible if all memdevs
participating in the region support both inject and clear
poison commands.

TEST-ONLY INTERFACE: This interface is intended for testing
and validation purposes only. It is not a data repair mechanism
and should never be used on production systems or live data.

CLEAR IS NOT DATA RECOVERY: This operation writes zeros to the
specified address range and removes the address from the poison
list. It does NOT recover or restore original data that may have
been present before poison injection. Any original data at the
cleared address is permanently lost and replaced with zeros.

CLEAR IS NOT A REPAIR MECHANISM: This interface is for testing
purposes only and should not be used as a data repair tool.
Clearing poison is fundamentally different from data recovery
or error correction.

What: /sys/kernel/debug/cxl/einj_types
Date: January, 2024
KernelVersion: v6.9
Expand Down
6 changes: 6 additions & 0 deletions Documentation/PCI/pci-error-recovery.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ Possible return values are::
PCI_ERS_RESULT_NEED_RESET, /* Device driver wants slot to be reset. */
PCI_ERS_RESULT_DISCONNECT, /* Device has completely failed, is unrecoverable */
PCI_ERS_RESULT_RECOVERED, /* Device driver is fully recovered and operational */
PCI_ERS_RESULT_NO_AER_DRIVER, /* No AER capabilities registered for the driver */
PCI_ERS_RESULT_PANIC, /* System is unstable, panic. Is CXL specific */
};

A driver does not have to implement all of these callbacks; however,
Expand All @@ -116,6 +118,10 @@ The actual steps taken by a platform to recover from a PCI error
event will be platform-dependent, but will follow the general
sequence described below.

PCI_ERS_RESULT_PANIC is currently unique to CXL and handled in CXL
cxl_do_recovery(). The PCI pcie_do_recovery() routine does not report or
handle PCI_ERS_RESULT_PANIC.

STEP 0: Error Event
-------------------
A PCI bus error is detected by the PCI hardware. On powerpc, the slot
Expand Down
135 changes: 135 additions & 0 deletions Documentation/driver-api/cxl/conventions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,138 @@ Detailed Description of the Change
----------------------------------

<Propose spec language that corrects the conflict.>


Resolve conflict between CFMWS, Platform Memory Holes, and Endpoint Decoders
============================================================================

Document
--------

CXL Revision 3.2, Version 1.0

License
-------

SPDX-License Identifier: CC-BY-4.0

Creator/Contributors
--------------------

- Fabio M. De Francesco, Intel
- Dan J. Williams, Intel
- Mahesh Natu, Intel

Summary of the Change
---------------------

According to the current Compute Express Link (CXL) Specifications (Revision
3.2, Version 1.0), the CXL Fixed Memory Window Structure (CFMWS) describes zero
or more Host Physical Address (HPA) windows associated with each CXL Host
Bridge. Each window represents a contiguous HPA range that may be interleaved
across one or more targets, including CXL Host Bridges. Each window has a set
of restrictions that govern its usage. It is the Operating System-directed
configuration and Power Management (OSPM) responsibility to utilize each window
for the specified use.

Table 9-22 of the current CXL Specifications states that the Window Size field
contains the total number of consecutive bytes of HPA this window describes.
This value must be a multiple of the Number of Interleave Ways (NIW) * 256 MB.

Platform Firmware (BIOS) might reserve physical addresses below 4 GB where a
memory gap such as the Low Memory Hole for PCIe MMIO may exist. In such cases,
the CFMWS Range Size may not adhere to the NIW * 256 MB rule.

The HPA represents the actual physical memory address space that the CXL devices
can decode and respond to, while the System Physical Address (SPA), a related
but distinct concept, represents the system-visible address space that users can
direct transaction to and so it excludes reserved regions.

BIOS publishes CFMWS to communicate the active SPA ranges that, on platforms
with LMH's, map to a strict subset of the HPA. The SPA range trims out the hole,
resulting in lost capacity in the Endpoints with no SPA to map to that part of
the HPA range that intersects the hole.

E.g, an x86 platform with two CFMWS and an LMH starting at 2 GB:

+--------+------------+-------------------+------------------+-------------------+------+
| Window | CFMWS Base | CFMWS Size | HDM Decoder Base | HDM Decoder Size | Ways |
+========+============+===================+==================+===================+======+
|  0 | 0 GB | 2 GB | 0 GB | 3 GB | 12 |
+--------+------------+-------------------+------------------+-------------------+------+
|  1 | 4 GB | NIW*256MB Aligned | 4 GB | NIW*256MB Aligned | 12 |
+--------+------------+-------------------+------------------+-------------------+------+

HDM decoder base and HDM decoder size represent all the 12 Endpoint Decoders of
a 12 ways region and all the intermediate Switch Decoders. They are configured
by the BIOS according to the NIW * 256MB rule, resulting in a HPA range size of
3GB. Instead, the CFMWS Base and CFMWS Size are used to configure the Root
Decoder HPA range that results smaller (2GB) than that of the Switch and
Endpoint Decoders in the hierarchy (3GB).

This creates 2 issues which lead to a failure to construct a region:

1) A mismatch in region size between root and any HDM decoder. The root decoders
will always be smaller due to the trim.

2) The trim causes the root decoder to violate the (NIW * 256MB) rule.

This change allows a region with a base address of 0GB to bypass these checks to
allow for region creation with the trimmed root decoder address range.

This change does not allow for any other arbitrary region to violate these
checks - it is intended exclusively to enable x86 platforms which map CXL memory
under 4GB.

Despite the HDM decoders covering the PCIE hole HPA region, it is expected that
the platform will never route address accesses to the CXL complex because the
root decoder only covers the trimmed region (which excludes this). This is
outside the ability of Linux to enforce.

On the example platform, only the first 2GB will be potentially usable, but
Linux, aiming to adhere to the current specifications, fails to construct
Regions and attach Endpoint and intermediate Switch Decoders to them.

There are several points of failure that due to the expectation that the Root
Decoder HPA size, that is equal to the CFMWS from which it is configured, has
to be greater or equal to the matching Switch and Endpoint HDM Decoders.

In order to succeed with construction and attachment, Linux must construct a
Region with Root Decoder HPA range size, and then attach to that all the
intermediate Switch Decoders and Endpoint Decoders that belong to the hierarchy
regardless of their range sizes.

Benefits of the Change
----------------------

Without the change, the OSPM wouldn't match intermediate Switch and Endpoint
Decoders with Root Decoders configured with CFMWS HPA sizes that don't align
with the NIW * 256MB constraint, and so it leads to lost memdev capacity.

This change allows the OSPM to construct Regions and attach intermediate Switch
and Endpoint Decoders to them, so that the addressable part of the memory
devices total capacity is made available to the users.

References
----------

Compute Express Link Specification Revision 3.2, Version 1.0
<https://www.computeexpresslink.org/>

Detailed Description of the Change
----------------------------------

The description of the Window Size field in table 9-22 needs to account for
platforms with Low Memory Holes, where SPA ranges might be subsets of the
endpoints HPA. Therefore, it has to be changed to the following:

"The total number of consecutive bytes of HPA this window represents. This value
shall be a multiple of NIW * 256 MB.

On platforms that reserve physical addresses below 4 GB, such as the Low Memory
Hole for PCIe MMIO on x86, an instance of CFMWS whose Base HPA range is 0 might
have a size that doesn't align with the NIW * 256 MB constraint.

Note that the matching intermediate Switch Decoders and the Endpoint Decoders
HPA range sizes must still align to the above-mentioned rule, but the memory
capacity that exceeds the CFMWS window size won't be accessible.".
2 changes: 1 addition & 1 deletion Documentation/driver-api/cxl/maturity-map.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ Accelerator
User Flow Support
-----------------

* [0] Inject & clear poison by HPA
* [2] Inject & clear poison by region offset

Details
=======
Expand Down
2 changes: 1 addition & 1 deletion Documentation/driver-api/cxl/platform/bios-and-efi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ future and such a configuration should be avoided.

Memory Holes
------------
If your platform includes memory holes intersparsed between your CXL memory, it
If your platform includes memory holes interspersed between your CXL memory, it
is recommended to utilize multiple decoders to cover these regions of memory,
rather than try to program the decoders to accept the entire range and expect
Linux to manage the overlap.
Expand Down
31 changes: 31 additions & 0 deletions debian.nvidia-6.17/config/annotations
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,37 @@ CONFIG_UBUNTU_ODM_DRIVERS note<'Disable all Ubuntu ODM dri
CONFIG_ULTRASOC_SMB policy<{'arm64': 'n'}>
CONFIG_ULTRASOC_SMB note<'Required for Grace enablement'>

CONFIG_CXL_BUS policy<{'amd64': 'y', 'arm64': 'y'}>
CONFIG_CXL_BUS note<'Changed to bool for CXL Type-2 device support'>

CONFIG_CXL_PCI policy<{'amd64': 'y', 'arm64': 'y'}>
CONFIG_CXL_PCI note<'Changed to bool for CXL Type-2 device support'>

CONFIG_CXL_MEM policy<{'amd64': 'y', 'arm64': 'y'}>
CONFIG_CXL_MEM note<'Changed to y due to CXL_BUS being bool'>

CONFIG_CXL_PORT policy<{'amd64': 'y', 'arm64': 'y'}>
CONFIG_CXL_PORT note<'Changed to y due to CXL_BUS being bool'>

CONFIG_FWCTL policy<{'amd64': 'y', 'arm64': 'y'}>
CONFIG_FWCTL note<'Selected by CXL_BUS when bool'>

CONFIG_CXL_RAS policy<{'amd64': 'y', 'arm64': 'y'}>
CONFIG_CXL_RAS note<'CXL RAS error handling support'>

CONFIG_CXL_RCH_RAS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_CXL_RCH_RAS note<'RAS support for Restricted CXL Host defined in CXL1.1'>

CONFIG_SFC_CXL policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SFC_CXL note<'Solarflare SFC9100-family CXL Type-2 device support'>

CONFIG_ACPI_APEI_EINJ policy<{'amd64': 'y', 'arm64': 'y'}>
CONFIG_ACPI_APEI_EINJ note<'Required for CONFIG_ACPI_APEI_EINJ_CXL'>


CONFIG_ACPI_APEI_EINJ_CXL policy<{'amd64': 'y', 'arm64': 'y'}>
CONFIG_ACPI_APEI_EINJ_CXL note<'CXL protocol error injection support via APEI EINJ'>


# ---- Annotations without notes ----

Expand Down
34 changes: 0 additions & 34 deletions drivers/acpi/numa/hmat.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ struct memory_target {
struct node_cache_attrs cache_attrs;
u8 gen_port_device_handle[ACPI_SRAT_DEVICE_HANDLE_SIZE];
bool registered;
bool ext_updated; /* externally updated */
};

struct memory_initiator {
Expand Down Expand Up @@ -368,35 +367,6 @@ static void hmat_update_target_access(struct memory_target *target,
}
}

int hmat_update_target_coordinates(int nid, struct access_coordinate *coord,
enum access_coordinate_class access)
{
struct memory_target *target;
int pxm;

if (nid == NUMA_NO_NODE)
return -EINVAL;

pxm = node_to_pxm(nid);
guard(mutex)(&target_lock);
target = find_mem_target(pxm);
if (!target)
return -ENODEV;

hmat_update_target_access(target, ACPI_HMAT_READ_LATENCY,
coord->read_latency, access);
hmat_update_target_access(target, ACPI_HMAT_WRITE_LATENCY,
coord->write_latency, access);
hmat_update_target_access(target, ACPI_HMAT_READ_BANDWIDTH,
coord->read_bandwidth, access);
hmat_update_target_access(target, ACPI_HMAT_WRITE_BANDWIDTH,
coord->write_bandwidth, access);
target->ext_updated = true;

return 0;
}
EXPORT_SYMBOL_GPL(hmat_update_target_coordinates);

static __init void hmat_add_locality(struct acpi_hmat_locality *hmat_loc)
{
struct memory_locality *loc;
Expand Down Expand Up @@ -773,10 +743,6 @@ static void hmat_update_target_attrs(struct memory_target *target,
u32 best = 0;
int i;

/* Don't update if an external agent has changed the data. */
if (target->ext_updated)
return;

/* Don't update for generic port if there's no device handle */
if ((access == NODE_ACCESS_CLASS_GENPORT_SINK_LOCAL ||
access == NODE_ACCESS_CLASS_GENPORT_SINK_CPU) &&
Expand Down
Loading