ioremap definition in generic io.h

Jonas Bonn
2010-09-29T08:18:06Z

Hi,

I'm wondering about the usefulness of the definition of ioremap and
__ioremap in asm-generic/io.h. How is this intended to be used? How
are the page tables for this mapping supposed to be constructed?

The definition is as follows:

/*
* Change "struct page" to physical address.
*/
static inline void __iomem *ioremap(phys_addr_t offset, unsigned long
size)
{
return (void __iomem*) (unsigned long)offset;
}

#define __ioremap(offset, size, flags) ioremap(offset, size)

Regards,
Jonas