mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
37 lines
750 B
C
37 lines
750 B
C
![]() |
#ifndef __UM_IO_H
|
||
|
#define __UM_IO_H
|
||
|
|
||
|
#include "asm/page.h"
|
||
|
|
||
|
#define IO_SPACE_LIMIT 0xdeadbeef /* Sure hope nothing uses this */
|
||
|
|
||
|
static inline int inb(unsigned long i) { return(0); }
|
||
|
static inline void outb(char c, unsigned long i) { }
|
||
|
|
||
|
/*
|
||
|
* Change virtual addresses to physical addresses and vv.
|
||
|
* These are pretty trivial
|
||
|
*/
|
||
|
static inline unsigned long virt_to_phys(volatile void * address)
|
||
|
{
|
||
|
return __pa((void *) address);
|
||
|
}
|
||
|
|
||
|
static inline void * phys_to_virt(unsigned long address)
|
||
|
{
|
||
|
return __va(address);
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
* Convert a physical pointer to a virtual kernel pointer for /dev/mem
|
||
|
* access
|
||
|
*/
|
||
|
#define xlate_dev_mem_ptr(p) __va(p)
|
||
|
|
||
|
/*
|
||
|
* Convert a virtual cached pointer to an uncached pointer
|
||
|
*/
|
||
|
#define xlate_dev_kmem_ptr(p) p
|
||
|
|
||
|
#endif
|