[PATCH] ARM: Add SWP/SWPB emulation for ARMv7 processors (v3)

Catalin Marinas catalin.marinas at arm.com
Thu Jan 7 04:59:08 EST 2010


On Wed, 2010-01-06 at 18:17 +0000, Jamie Lokier wrote:
> Catalin Marinas wrote:
> > > Is there any reason why this wasn't always like that?
> >
> > On ARMv6 onwards (where this user RO, kernel RO is supported) we cannot
> > easily differentiate between the vectors page and a normal kernel page
> > unless we use another L_PTE_ bit. We need the vectors page to be
> > writable if there is no TLS register in hardware (I guess we could use
> > domain switching to override this though). But on ARMv7 we always have a
> > TLS register, so no need to write to the vectors page.
> 
> Could you map the TLS page writable (kernel access only) at another
> address at the same time, carefully choosing an aliasing address so
> that no cache flush is needed after writing?

It could be but I'm not sure it's worth. Leif's patch is intended for
ARMv7 where we always have a hardware TLS register. The FIQ handler
installation could probably be done by first calling set_fs(KERNEL_DS).

-- 
Catalin




More information about the linux-arm-kernel mailing list