提交 cdcce47c 编写于 作者: B Ben Widawsky 提交者: Dan Williams

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: NBen Widawsky <ben.widawsky@intel.com>
[djbw: changelog fixups ]
Link: https://lore.kernel.org/r/163379784199.692348.4366131432595112771.stgit@dwillia2-desk3.amr.corp.intel.comSigned-off-by: NDan Williams <dan.j.williams@intel.com>
上级 91a45b12
...@@ -20,13 +20,15 @@ ...@@ -20,13 +20,15 @@
#define CXL_REGLOC_BIR_MASK GENMASK(2, 0) #define CXL_REGLOC_BIR_MASK GENMASK(2, 0)
/* Register Block Identifier (RBI) */ /* Register Block Identifier (RBI) */
#define CXL_REGLOC_RBI_MASK GENMASK(15, 8) enum cxl_regloc_type {
#define CXL_REGLOC_RBI_EMPTY 0 CXL_REGLOC_RBI_EMPTY = 0,
#define CXL_REGLOC_RBI_COMPONENT 1 CXL_REGLOC_RBI_COMPONENT,
#define CXL_REGLOC_RBI_VIRT 2 CXL_REGLOC_RBI_VIRT,
#define CXL_REGLOC_RBI_MEMDEV 3 CXL_REGLOC_RBI_MEMDEV,
#define CXL_REGLOC_RBI_TYPES CXL_REGLOC_RBI_MEMDEV + 1 CXL_REGLOC_RBI_TYPES
};
#define CXL_REGLOC_RBI_MASK GENMASK(15, 8)
#define CXL_REGLOC_ADDR_MASK GENMASK(31, 16) #define CXL_REGLOC_ADDR_MASK GENMASK(31, 16)
#endif /* __CXL_PCI_H__ */ #endif /* __CXL_PCI_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册