Skip to content

Commit cdcce47

Browse files
Ben Widawskydjbw
authored andcommitted
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 <[email protected]> [djbw: changelog fixups ] Link: https://lore.kernel.org/r/163379784199.692348.4366131432595112771.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <[email protected]>
1 parent 91a45b1 commit cdcce47

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

drivers/cxl/pci.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@
2020
#define CXL_REGLOC_BIR_MASK GENMASK(2, 0)
2121

2222
/* Register Block Identifier (RBI) */
23-
#define CXL_REGLOC_RBI_MASK GENMASK(15, 8)
24-
#define CXL_REGLOC_RBI_EMPTY 0
25-
#define CXL_REGLOC_RBI_COMPONENT 1
26-
#define CXL_REGLOC_RBI_VIRT 2
27-
#define CXL_REGLOC_RBI_MEMDEV 3
28-
#define CXL_REGLOC_RBI_TYPES CXL_REGLOC_RBI_MEMDEV + 1
23+
enum cxl_regloc_type {
24+
CXL_REGLOC_RBI_EMPTY = 0,
25+
CXL_REGLOC_RBI_COMPONENT,
26+
CXL_REGLOC_RBI_VIRT,
27+
CXL_REGLOC_RBI_MEMDEV,
28+
CXL_REGLOC_RBI_TYPES
29+
};
2930

31+
#define CXL_REGLOC_RBI_MASK GENMASK(15, 8)
3032
#define CXL_REGLOC_ADDR_MASK GENMASK(31, 16)
3133

3234
#endif /* __CXL_PCI_H__ */

0 commit comments

Comments
 (0)