struct resource *_sparc_find_resource(struct resource *r, unsigned long);
-static void *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz);
-static void *_sparc_alloc_io(unsigned int busno, unsigned long phys,
+static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz);
+static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys,
unsigned long size, char *name);
static void _sparc_free_io(struct resource *res);
/* This points to the next to use virtual memory for DVMA mappings */
static struct resource _sparc_dvma = {
- "sparc_dvma", DVMA_VADDR, DVMA_END - 1
+ .name = "sparc_dvma", .start = DVMA_VADDR, .end = DVMA_END - 1
};
/* This points to the start of I/O mappings, cluable from outside. */
/*ext*/ struct resource sparc_iomap = {
- "sparc_iomap", IOBASE_VADDR, IOBASE_END - 1
+ .name = "sparc_iomap", .start = IOBASE_VADDR, .end = IOBASE_END - 1
};
/*
*
* Bus type is always zero on IIep.
*/
-void *ioremap(unsigned long offset, unsigned long size)
+void __iomem *ioremap(unsigned long offset, unsigned long size)
{
char name[14];
/*
* Comlimentary to ioremap().
*/
-void iounmap(void *virtual)
+void iounmap(volatile void __iomem *virtual)
{
unsigned long vaddr = (unsigned long) virtual & PAGE_MASK;
struct resource *res;
/*
*/
-unsigned long sbus_ioremap(struct resource *phyres, unsigned long offset,
+void __iomem *sbus_ioremap(struct resource *phyres, unsigned long offset,
unsigned long size, char *name)
{
- return (unsigned long) _sparc_alloc_io(phyres->flags & 0xF,
+ return _sparc_alloc_io(phyres->flags & 0xF,
phyres->start + offset, size, name);
}
/*
*/
-void sbus_iounmap(unsigned long addr, unsigned long size)
+void sbus_iounmap(volatile void __iomem *addr, unsigned long size)
{
- iounmap((void *)addr);
+ iounmap(addr);
}
/*
* Meat of mapping
*/
-static void *_sparc_alloc_io(unsigned int busno, unsigned long phys,
+static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys,
unsigned long size, char *name)
{
static int printed_full;
struct resource *res;
char *tack;
int tlen;
- void *va; /* P3 diag */
+ void __iomem *va; /* P3 diag */
if (name == NULL) name = "???";
/*
*/
-static void *
+static void __iomem *
_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz)
{
unsigned long offset = ((unsigned long) pa) & (~PAGE_MASK);
pa &= PAGE_MASK;
sparc_mapiorange(bus, pa, res->start, res->end - res->start + 1);
- return (void *) (res->start + offset);
+ return (void __iomem *) (res->start + offset);
}
/*
}
order = get_order(len_total);
- if ((va = __get_free_pages(GFP_KERNEL, order)) == 0)
+ if ((va = __get_free_pages(GFP_KERNEL|__GFP_COMP, order)) == 0)
goto err_nopages;
if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL)