cxl.h (863027d40993f13155451bd898bfe4c4e9b7002f) | cxl.h (3d9f4a197230d6f4d5f816bcae0e0497b0eec410) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* Copyright(c) 2020 Intel Corporation. */ 3 4#ifndef __CXL_H__ 5#define __CXL_H__ 6 7#include <linux/libnvdimm.h> 8#include <linux/bitfield.h> --- 503 unchanged lines hidden (view full) --- 512 * @dev: This region's device 513 * @id: This region's id. Id is globally unique across all regions 514 * @mode: Endpoint decoder allocation / access mode 515 * @type: Endpoint decoder target type 516 * @cxl_nvb: nvdimm bridge for coordinating @cxlr_pmem setup / shutdown 517 * @cxlr_pmem: (for pmem regions) cached copy of the nvdimm bridge 518 * @flags: Region state flags 519 * @params: active + config params for the region | 1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* Copyright(c) 2020 Intel Corporation. */ 3 4#ifndef __CXL_H__ 5#define __CXL_H__ 6 7#include <linux/libnvdimm.h> 8#include <linux/bitfield.h> --- 503 unchanged lines hidden (view full) --- 512 * @dev: This region's device 513 * @id: This region's id. Id is globally unique across all regions 514 * @mode: Endpoint decoder allocation / access mode 515 * @type: Endpoint decoder target type 516 * @cxl_nvb: nvdimm bridge for coordinating @cxlr_pmem setup / shutdown 517 * @cxlr_pmem: (for pmem regions) cached copy of the nvdimm bridge 518 * @flags: Region state flags 519 * @params: active + config params for the region |
520 * @coord: QoS access coordinates for the region |
|
520 */ 521struct cxl_region { 522 struct device dev; 523 int id; 524 enum cxl_decoder_mode mode; 525 enum cxl_decoder_type type; 526 struct cxl_nvdimm_bridge *cxl_nvb; 527 struct cxl_pmem_region *cxlr_pmem; 528 unsigned long flags; 529 struct cxl_region_params params; | 521 */ 522struct cxl_region { 523 struct device dev; 524 int id; 525 enum cxl_decoder_mode mode; 526 enum cxl_decoder_type type; 527 struct cxl_nvdimm_bridge *cxl_nvb; 528 struct cxl_pmem_region *cxlr_pmem; 529 unsigned long flags; 530 struct cxl_region_params params; |
531 struct access_coordinate coord[ACCESS_COORDINATE_MAX]; |
|
530}; 531 532struct cxl_nvdimm_bridge { 533 int id; 534 struct device dev; 535 struct cxl_port *port; 536 struct nvdimm_bus *nvdimm_bus; 537 struct nvdimm_bus_descriptor nd_desc; --- 338 unchanged lines hidden (view full) --- 876 877void cxl_endpoint_parse_cdat(struct cxl_port *port); 878void cxl_switch_parse_cdat(struct cxl_port *port); 879 880int cxl_endpoint_get_perf_coordinates(struct cxl_port *port, 881 struct access_coordinate *coord); 882int cxl_hb_get_perf_coordinates(struct cxl_port *port, 883 struct access_coordinate *coord); | 532}; 533 534struct cxl_nvdimm_bridge { 535 int id; 536 struct device dev; 537 struct cxl_port *port; 538 struct nvdimm_bus *nvdimm_bus; 539 struct nvdimm_bus_descriptor nd_desc; --- 338 unchanged lines hidden (view full) --- 878 879void cxl_endpoint_parse_cdat(struct cxl_port *port); 880void cxl_switch_parse_cdat(struct cxl_port *port); 881 882int cxl_endpoint_get_perf_coordinates(struct cxl_port *port, 883 struct access_coordinate *coord); 884int cxl_hb_get_perf_coordinates(struct cxl_port *port, 885 struct access_coordinate *coord); |
886void cxl_region_perf_data_calculate(struct cxl_region *cxlr, 887 struct cxl_endpoint_decoder *cxled); |
|
884 885void cxl_memdev_update_perf(struct cxl_memdev *cxlmd); 886 887void cxl_coordinates_combine(struct access_coordinate *out, 888 struct access_coordinate *c1, 889 struct access_coordinate *c2); 890 891/* 892 * Unit test builds overrides this to __weak, find the 'strong' version 893 * of these symbols in tools/testing/cxl/. 894 */ 895#ifndef __mock 896#define __mock static 897#endif 898 899#endif /* __CXL_H__ */ | 888 889void cxl_memdev_update_perf(struct cxl_memdev *cxlmd); 890 891void cxl_coordinates_combine(struct access_coordinate *out, 892 struct access_coordinate *c1, 893 struct access_coordinate *c2); 894 895/* 896 * Unit test builds overrides this to __weak, find the 'strong' version 897 * of these symbols in tools/testing/cxl/. 898 */ 899#ifndef __mock 900#define __mock static 901#endif 902 903#endif /* __CXL_H__ */ |