* ebus & ioremap?
@ 2005-03-10 12:42 Meelis Roos
2005-03-10 19:40 ` David S. Miller
2005-03-11 18:47 ` Eric Brower
0 siblings, 2 replies; 3+ messages in thread
From: Meelis Roos @ 2005-03-10 12:42 UTC (permalink / raw)
To: sparclinux
While trying to see if I can cleanly fix the iomem warnings for sparc
floppy, I came to stop ath this code at asm/floppy.5:653
/* XXX ioremap */
sun_pci_fd_ebus_dma.regs = edev->resource[1].start;
I can understand why someone did put a XXX there but why does it work
this way?
--
Meelis Roos (mroos@linux.ee)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: ebus & ioremap?
2005-03-10 12:42 ebus & ioremap? Meelis Roos
@ 2005-03-10 19:40 ` David S. Miller
2005-03-11 18:47 ` Eric Brower
1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2005-03-10 19:40 UTC (permalink / raw)
To: sparclinux
On Thu, 10 Mar 2005 14:42:56 +0200 (EET)
Meelis Roos <mroos@linux.ee> wrote:
> While trying to see if I can cleanly fix the iomem warnings for sparc
> floppy, I came to stop ath this code at asm/floppy.5:653
>
> /* XXX ioremap */
> sun_pci_fd_ebus_dma.regs = edev->resource[1].start;
>
> I can understand why someone did put a XXX there but why does it work
> this way?
On sparc64, we store the physical I/O address in the resources,
and that is what the I/O accessor routines take as well.
Therefore ioremap() just pass the address through unchanged, they
are just a NOP.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ebus & ioremap?
2005-03-10 12:42 ebus & ioremap? Meelis Roos
2005-03-10 19:40 ` David S. Miller
@ 2005-03-11 18:47 ` Eric Brower
1 sibling, 0 replies; 3+ messages in thread
From: Eric Brower @ 2005-03-11 18:47 UTC (permalink / raw)
To: sparclinux
From asm/io.h:
/* On sparc64 we have the whole physical IO address space accessible
* using physically addressed loads and stores, so this does nothing.
*/
static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
{
return (void __iomem *)offset;
}
It is nice to use ioremap to remain idiomatic with other
architectures, though, esp. in drivers and the like.
E
On Thu, 10 Mar 2005 14:42:56 +0200 (EET), Meelis Roos <mroos@linux.ee> wrote:
> While trying to see if I can cleanly fix the iomem warnings for sparc
> floppy, I came to stop ath this code at asm/floppy.5:653
>
> /* XXX ioremap */
> sun_pci_fd_ebus_dma.regs = edev->resource[1].start;
>
> I can understand why someone did put a XXX there but why does it work
> this way?
>
> --
> Meelis Roos (mroos@linux.ee)
> -
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
E
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-11 18:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-10 12:42 ebus & ioremap? Meelis Roos
2005-03-10 19:40 ` David S. Miller
2005-03-11 18:47 ` Eric Brower
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.