44 size_t offset,
size_t size);
64 size_t offset,
size_t size);
87 #define REGION_DEV_INIT(ops_, offset_, size_) \
92 .offset = (offset_), \
202 #define MEM_REGION_DEV_INIT(base_, size_, ops_) \
204 .base = (void *)(base_), \
205 .rdev = REGION_DEV_INIT((ops_), 0, (size_)), \
208 #define MEM_REGION_DEV_RO_INIT(base_, size_) \
209 MEM_REGION_DEV_INIT(base_, size_, &mem_rdev_ro_ops) \
211 #define MEM_REGION_DEV_RW_INIT(base_, size_) \
212 MEM_REGION_DEV_INIT(base_, size_, &mem_rdev_rw_ops) \
219 #define MMAP_HELPER_DEV_INIT(ops_, offset_, size_, mpool_) \
221 .rdev = REGION_DEV_INIT((ops_), (offset_), (size_)), \
262 #define XLATE_REGION_DEV_INIT(window_arr_, parent_sz_, ops_) \
264 .window_count = ARRAY_SIZE(window_arr_), \
265 .window_arr = window_arr_, \
266 .rdev = REGION_DEV_INIT((ops_), 0, (parent_sz_)), \
269 #define XLATE_REGION_DEV_RO_INIT(window_arr_, parent_sz_) \
270 XLATE_REGION_DEV_INIT(window_arr_, parent_sz_, &xlate_rdev_ro_ops)
272 #define XLATE_REGION_DEV_RW_INIT(window_count_, window_arr_, parent_sz_) \
273 XLATE_REGION_DEV_INIT(window_arr_, parent_sz_, &xlate_rdev_rw_ops)
277 size_t window_count,
const struct xlate_window *window_arr,
281 size_t window_count,
const struct xlate_window *window_arr,
285 size_t sub_region_offset,
size_t sub_region_size);
static struct mmap_helper_region_device mdev
static struct region_device rdev
static struct device_operations ops
static size_t region_sz(const struct region *r)
ssize_t rdev_eraseat(const struct region_device *rd, size_t offset, size_t size)
void * mmap_helper_rdev_mmap(const struct region_device *, size_t, size_t)
ssize_t rdev_relative_offset(const struct region_device *p, const struct region_device *c)
int rdev_munmap(const struct region_device *rd, void *mapping)
static size_t region_device_sz(const struct region_device *rdev)
int region_is_subregion(const struct region *p, const struct region *c)
int rdev_chain_mem(struct region_device *child, const void *base, size_t size)
int mmap_helper_rdev_munmap(const struct region_device *, void *)
static int rdev_chain_full(struct region_device *child, const struct region_device *parent)
const struct region_device_ops mem_rdev_rw_ops
ssize_t rdev_writeat(const struct region_device *rd, const void *b, size_t offset, size_t size)
void xlate_window_init(struct xlate_window *window, const struct region_device *access_dev, size_t sub_region_offset, size_t sub_region_size)
void mem_region_device_ro_init(struct mem_region_device *mdev, void *base, size_t size)
static bool region_overlap(const struct region *r1, const struct region *r2)
const struct region_device_ops xlate_rdev_rw_ops
static void * rdev_mmap_full(const struct region_device *rd)
void * rdev_mmap(const struct region_device *rd, size_t offset, size_t size)
int rdev_chain_mem_rw(struct region_device *child, void *base, size_t size)
void xlate_region_device_rw_init(struct xlate_region_device *xdev, size_t window_count, const struct xlate_window *window_arr, size_t parent_size)
static size_t region_device_end(const struct region_device *rdev)
void mem_region_device_rw_init(struct mem_region_device *mdev, void *base, size_t size)
static size_t region_end(const struct region *r)
int rdev_chain(struct region_device *child, const struct region_device *parent, size_t offset, size_t size)
static const struct region * region_device_region(const struct region_device *rdev)
void region_device_init(struct region_device *rdev, const struct region_device_ops *ops, size_t offset, size_t size)
const struct region_device_ops xlate_rdev_ro_ops
const struct region_device_ops mem_rdev_ro_ops
void xlate_region_device_ro_init(struct xlate_region_device *xdev, size_t window_count, const struct xlate_window *window_arr, size_t parent_size)
ssize_t rdev_readat(const struct region_device *rd, void *b, size_t offset, size_t size)
static size_t region_offset(const struct region *r)
static ssize_t rdev_read_full(const struct region_device *rd, void *b)
const struct region_device * incoherent_rdev_init(struct incoherent_rdev *irdev, const struct region *r, const struct region_device *read, const struct region_device *write)
static size_t region_device_offset(const struct region_device *rdev)
const struct region_device * write
const struct region_device * read
struct region_device rdev
struct region_device rdev
struct region_device rdev
ssize_t(* eraseat)(const struct region_device *, size_t, size_t)
ssize_t(* readat)(const struct region_device *, void *, size_t, size_t)
int(* munmap)(const struct region_device *, void *)
ssize_t(* writeat)(const struct region_device *, const void *, size_t, size_t)
const struct region_device * root
const struct region_device_ops * ops
struct region_device rdev
const struct xlate_window * window_arr
const struct region_device * access_dev
#define c(value, pmcreg, dst_bits)