[PATCH 2/3] arm: return both physical and virtual addresses from addruart
Jeremy Kerr
jeremy.kerr at canonical.com
Mon Aug 23 10:36:45 EDT 2010
Hi Uwe,
> > + .macro addruart_current, rx, tmp1, tmp2
> > + addruart \tmp1, \tmp2
> > + mrc p15, 0, \rx, c1, c0
> > + tst \rx, #1
> > + moveq \rx, \tmp1
> > + movne \rx, \tmp2
> > + .endm
> Don't you need to depend on MMU somehow to do this in generic code?
>
Yeah, it would make sense to have a separate paths for CONFIG_MMU/!
CONFIG_MMU (the latter just using \tmp1).
Although, What will the mrc instruction do if there is no MMU? if it
doesn't cause an exception, we can assume that the platform's addruart
macro will return the same address in both registers and the existing
code will just work.
Cheers,
Jeremy
More information about the linux-arm-kernel
mailing list