Thread (7 messages) flat view 7 messages, 3 authors, 2021-03-01

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

From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Date: 2021-03-01 15:55:01

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!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help