diff options
author | Ben Widawsky <ben.widawsky@intel.com> | 2021-10-09 09:44:02 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2021-10-29 11:53:51 -0700 |
commit | cdcce47cb33a6a2ecb1bc113d0ba42ec300a33fe (patch) | |
tree | 9257c7913fd0f25053845e36cc4d6569c1108eee /drivers/cxl/pci.h | |
parent | 91a45b12d49e2b43d86caba25ed59fae43344ab8 (diff) | |
download | lwn-cdcce47cb33a6a2ecb1bc113d0ba42ec300a33fe.tar.gz lwn-cdcce47cb33a6a2ecb1bc113d0ba42ec300a33fe.zip |
cxl/pci: Convert register block identifiers to an enum
In preparation for passing around the Register Block Indicator (RBI) as
a parameter, it is desirable to convert the type to an enum so that the
interface can use a well defined parameter.
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
[djbw: changelog fixups ]
Link: https://lore.kernel.org/r/163379784199.692348.4366131432595112771.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/cxl/pci.h')
-rw-r--r-- | drivers/cxl/pci.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/cxl/pci.h b/drivers/cxl/pci.h index 8c1a58813816..7d3e4bf06b45 100644 --- a/drivers/cxl/pci.h +++ b/drivers/cxl/pci.h @@ -20,13 +20,15 @@ #define CXL_REGLOC_BIR_MASK GENMASK(2, 0) /* Register Block Identifier (RBI) */ -#define CXL_REGLOC_RBI_MASK GENMASK(15, 8) -#define CXL_REGLOC_RBI_EMPTY 0 -#define CXL_REGLOC_RBI_COMPONENT 1 -#define CXL_REGLOC_RBI_VIRT 2 -#define CXL_REGLOC_RBI_MEMDEV 3 -#define CXL_REGLOC_RBI_TYPES CXL_REGLOC_RBI_MEMDEV + 1 +enum cxl_regloc_type { + CXL_REGLOC_RBI_EMPTY = 0, + CXL_REGLOC_RBI_COMPONENT, + CXL_REGLOC_RBI_VIRT, + CXL_REGLOC_RBI_MEMDEV, + CXL_REGLOC_RBI_TYPES +}; +#define CXL_REGLOC_RBI_MASK GENMASK(15, 8) #define CXL_REGLOC_ADDR_MASK GENMASK(31, 16) #endif /* __CXL_PCI_H__ */ |