diff --git a/src/arch/x86/include/librm.h b/src/arch/x86/include/librm.h index 22b7e3933..4fce7e8c8 100644 --- a/src/arch/x86/include/librm.h +++ b/src/arch/x86/include/librm.h @@ -126,11 +126,6 @@ UACCESS_INLINE ( librm, virt_to_phys ) ( volatile const void *virt ) { return ( addr + virt_offset ); } -static inline __always_inline userptr_t -UACCESS_INLINE ( librm, virt_to_user ) ( volatile const void *addr ) { - return trivial_virt_to_user ( addr ); -} - /****************************************************************************** * * Access to variables in .data16 and .text16 diff --git a/src/arch/x86/transitions/librm_mgmt.c b/src/arch/x86/transitions/librm_mgmt.c index da5055cd8..14e00eda8 100644 --- a/src/arch/x86/transitions/librm_mgmt.c +++ b/src/arch/x86/transitions/librm_mgmt.c @@ -431,7 +431,6 @@ void setup_sipi ( unsigned int vector, uint32_t handler, PROVIDE_UACCESS_INLINE ( librm, phys_to_virt ); PROVIDE_UACCESS_INLINE ( librm, virt_to_phys ); -PROVIDE_UACCESS_INLINE ( librm, virt_to_user ); PROVIDE_IOMAP_INLINE ( pages, io_to_bus ); PROVIDE_IOMAP ( pages, ioremap, ioremap_pages ); PROVIDE_IOMAP ( pages, iounmap, iounmap_pages ); diff --git a/src/core/uaccess.c b/src/core/uaccess.c index bf922f66d..e73f4d7fb 100644 --- a/src/core/uaccess.c +++ b/src/core/uaccess.c @@ -34,4 +34,3 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); /* Flat address space user access API */ PROVIDE_UACCESS_INLINE ( flat, phys_to_virt ); PROVIDE_UACCESS_INLINE ( flat, virt_to_phys ); -PROVIDE_UACCESS_INLINE ( flat, virt_to_user ); diff --git a/src/include/ipxe/linux/linux_uaccess.h b/src/include/ipxe/linux/linux_uaccess.h index 7d5f5f642..a5d7d73f3 100644 --- a/src/include/ipxe/linux/linux_uaccess.h +++ b/src/include/ipxe/linux/linux_uaccess.h @@ -5,9 +5,6 @@ * * iPXE user access API for Linux * - * We run with no distinction between internal and external addresses, - * so can use trivial_virt_to_user() et al. - * * We have no concept of the underlying physical addresses, since * these are not exposed to userspace. We provide a stub * implementation of virt_to_phys() since this is required by @@ -57,9 +54,4 @@ UACCESS_INLINE ( linux, phys_to_virt ) ( physaddr_t phys ) { return ( ( void * ) phys ); } -static inline __always_inline userptr_t -UACCESS_INLINE ( linux, virt_to_user ) ( volatile const void *addr ) { - return trivial_virt_to_user ( addr ); -} - #endif /* _IPXE_LINUX_UACCESS_H */ diff --git a/src/include/ipxe/uaccess.h b/src/include/ipxe/uaccess.h index 82f29f793..8d93cbf4f 100644 --- a/src/include/ipxe/uaccess.h +++ b/src/include/ipxe/uaccess.h @@ -20,35 +20,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #define UACCESS_PREFIX_flat __flat_ #endif -/** - * A pointer to a user buffer - * - */ -typedef void * userptr_t; - -/** - * @defgroup uaccess_trivial Trivial user access API implementations - * - * User access API implementations that can be used by environments in - * which virtual addresses allow access to all of memory. - * - * @{ - * - */ - -/** - * Convert virtual address to user pointer - * - * @v addr Virtual address - * @ret userptr User pointer - */ -static inline __always_inline userptr_t -trivial_virt_to_user ( volatile const void *addr ) { - return ( ( userptr_t ) addr ); -} - -/** @} */ - /** * Calculate static inline user access API function name * @@ -88,25 +59,12 @@ UACCESS_INLINE ( flat, virt_to_phys ) ( volatile const void *virt ) { return ( ( physaddr_t ) virt ); } -static inline __always_inline userptr_t -UACCESS_INLINE ( flat, virt_to_user ) ( volatile const void *addr ) { - return trivial_virt_to_user ( addr ); -} - /* Include all architecture-independent user access API headers */ #include /* Include all architecture-dependent user access API headers */ #include -/** - * Convert virtual address to user pointer - * - * @v addr Virtual address - * @ret userptr User pointer - */ -userptr_t virt_to_user ( volatile const void *addr ); - /** * Convert virtual address to a physical address * diff --git a/src/interface/linux/linux_uaccess.c b/src/interface/linux/linux_uaccess.c index 436707757..7f7f8931b 100644 --- a/src/interface/linux/linux_uaccess.c +++ b/src/interface/linux/linux_uaccess.c @@ -29,4 +29,3 @@ FILE_LICENCE(GPL2_OR_LATER); PROVIDE_UACCESS_INLINE(linux, phys_to_virt); PROVIDE_UACCESS_INLINE(linux, virt_to_phys); -PROVIDE_UACCESS_INLINE(linux, virt_to_user);