RE: [PATCH v4 09/23] cxl: Add helper function to retrieve ACPI handle of CXL root device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dave Jiang wrote:
> Provide a helper to find the ACPI0017 device in order to issue the _DSM.
> The helper will take the 'struct device' from a cxl_port and iterate until
> the root device is reached. The ACPI handle will be returned from the root
> device.

Following on from the last patch this should all be self contained to
drivers/cxl/acpi.c with something like:

struct cxl_root {
	struct cxl_port port;
	cxl_qos_class_fn qos_class;
};

...and then the caller does:

port = find_cxl_root(...);
root = container_of(port, typeof(*root), port);
class = root->qos_class(port, ...);

Yes, it means finally creating a formal 'struct cxl_root' type, but I
expect it will not be the last root method that gets added.



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux