From: jsg Date: Wed, 20 Mar 2024 02:44:57 +0000 (+0000) Subject: start implementing io_mapping X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=347f24fdad5a0e9fa4c93173630ceb50b09b5a28;p=openbsd start implementing io_mapping --- diff --git a/sys/dev/pci/drm/include/linux/io-mapping.h b/sys/dev/pci/drm/include/linux/io-mapping.h index 7a49ffef9da..87930d29761 100644 --- a/sys/dev/pci/drm/include/linux/io-mapping.h +++ b/sys/dev/pci/drm/include/linux/io-mapping.h @@ -3,4 +3,34 @@ #ifndef _LINUX_IO_MAPPING_H #define _LINUX_IO_MAPPING_H +#include + +struct io_mapping { + resource_size_t base; + unsigned long size; + void *iomem; +}; + +static inline void * +io_mapping_map_wc(struct io_mapping *map, unsigned long off, unsigned long size) +{ + return ((uint8_t *)map->iomem + off); +} + +static inline void +io_mapping_unmap(void *va) +{ +} + +static inline void * +io_mapping_map_local_wc(struct io_mapping *map, unsigned long off) +{ + return ((uint8_t *)map->iomem + off); +} + +static inline void +io_mapping_unmap_local(void *va) +{ +} + #endif