#ifndef CONFIG_IA64
#define should_use_kmap(pfn) page_is_ram(pfn)
#else
/* ioremap will take care of cache attributes */
#define should_use_kmap(pfn) 0
#endif
static void __iomem *acpi_map(acpi_physical_address pg_off, unsigned long pg_sz)
{
unsigned long pfn;
The relevant code from osl.c
#ifndef CONFIG_IA64 use_kmap( pfn) page_is_ram(pfn) use_kmap( pfn) 0
#define should_
#else
/* ioremap will take care of cache attributes */
#define should_
#endif
static void __iomem *acpi_map( acpi_physical_ address pg_off, unsigned long pg_sz)
{
unsigned long pfn;
pfn = pg_off >> PAGE_SHIFT; use_kmap( pfn)) { pfn_to_ page(pfn) ); ioremap( pg_off, pg_sz);
if (should_
if (pg_sz > PAGE_SIZE)
return NULL;
return (void __iomem __force *)kmap(
} else
return acpi_os_
}
static void acpi_unmap( acpi_physical_ address pg_off, void __iomem *vaddr)
{
unsigned long pfn;
pfn = pg_off >> PAGE_SHIFT; use_kmap( pfn)) pfn_to_ page(pfn) );
if (should_
kunmap(
else
iounmap(vaddr);
}