cxl/mem: Move some definitions to mem.h
authorDan Williams <dan.j.williams@intel.com>
Fri, 14 May 2021 05:21:49 +0000 (22:21 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 14 May 2021 23:13:18 +0000 (16:13 -0700)
commit5f50d6b20ca31d91de14cc09be3e5ce67bc99e04
treef169101a8b04a7e7c94ba67ec274f2dcee841bed
parent6efb943b8616ec53a5e444193dccf1af9ad627b5
cxl/mem: Move some definitions to mem.h

In preparation for sharing cxl.h with other generic CXL consumers,
move / consolidate some of the memory device specifics to mem.h.

The motivation for moving out of cxl.h is to maintain least privilege
access to memory-device details since cxl.h is used in multiple files.
The motivation for moving definitions into a new mem.h header is for
code readability and organization. I.e. minimize implementation details
when reading data structures and other definitions.

Reviewed-by: Ben Widawsky <ben.widawsky@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/162096970932.1865304.14510894426562947262.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/cxl.h
drivers/cxl/mem.c
drivers/cxl/mem.h [new file with mode: 0644]