.\" Copyright 2015-2017 IBM Corp. .\" .TH CXL_GET_MMIO_SIZE 3 2017-05-24 "LIBCXL 1.5" "CXL Programmer's Manual" .SH NAME cxl_get_mmio_size \- get the total size of the MMIO space of an AFU, including all per-process areas .PP cxl_get_mmio_size \- get the size of the MMIO space available to a non-master process .SH SYNOPSIS .B #include .PP .B "int cxl_get_mmio_size(struct cxl_afu_h" .BI * afu ", long *" valp ); .SH DESCRIPTION .BR cxl_get_mmio_size () copies the size of the MMIO space of .I afu to the long integer pointed to by .IR valp . .PP In AFU directed mode, the master context MMIO space includes all slave context per-process MMIO areas. In slave context, .BR cxl_get_mmio_size () returns the size of the per-process MMIO space. .SH RETURN VALUE On success, 0 is returned. On error, \-1 is returned and .I errno is set appropriately. .SH ERRORS .TP .B EINVAL Invalid argument value. .TP .B ENODEV Invalid AFU device. .TP .B ENOMEM Insufficient memory. .SH FILES .TP .BI /dev/cxl/afu . d AFU device in dedicated process mode. .TP .BI /dev/cxl/afu . m AFU device in AFU directed mode, master context. .TP .BI /dev/cxl/afu . s AFU device in AFU directed mode, slave context. .SH SEE ALSO .BR cxl (3), .BR cxl_adapter_afu_next (3), .BR cxl_afu_next (3), .BR cxl_mmio_map (3), .BR cxl_mmio_ptr (3), .BR cxl_mmio_read32 (3), .BR cxl_mmio_read64 (3), .BR cxl_mmio_unmap (3), .BR cxl_mmio_write32 (3), .BR cxl_mmio_write64 (3)