[PATCH v2 3/3] ARM: cache-v7: get rid of mini-stack

Russell King - ARM Linux admin linux at armlinux.org.uk
Mon Mar 1 15:53:39 GMT 2021


On Wed, Feb 10, 2021 at 07:55:32PM +0100, Ard Biesheuvel wrote:
> Now that we have reduced the number of registers that we need to
> preserve when calling v7_invalidate_l1 from the boot code, we can use
> scratch registers to preserve the remaining ones, and get rid of the
> mini stack entirely. This works around any issues regarding cache
> behavior in relation to the uncached accesses to this memory, which is
> hard to get right in the general case (i.e., both bare metal and under
> virtualization)
> 
> While at it, switch v7_invalidate_l1 to using ip as a scratch register
> instead of r4. This makes the function AAPCS compliant, and removes the
> need to stash r4 in ip across the call.

You don't mention that we only do this for MP capable cores, which
is in itself quite a big change - maybe that change should be a
separate commit?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list