arm: Prevent compilation of old, experimental SMP support
The ARM SMP feature was added a long time ago and has never really been used by anyone since. We are still always compiling cpu_info() even though we don't use it, and it makes some dangerous assumptions about stack alignment that are not guaranteed anywhere. I'm planning to change the way the stack boundaries are defined. Rather than trying to work that into this unsafe, unused and hard to test feature, I think we should just seal it off with police tape and make sure that if anyone ever tries to use it again (which currently seems unlikely), they get forced to do their due diligence on making sure it works as intended. BUG=None TEST=Compiled Veyron_Pinky. Change-Id: I8a60bd30e8b27a22bb3da68ca84daea99424dee9 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/219680 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
parent
e2c0ede19c
commit
5b517fc46b
2 changed files with 6 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ ifeq ($(CONFIG_ARCH_RAMSTAGE_ARM),y)
|
|||
|
||||
ramstage-y += stages.c
|
||||
ramstage-y += div0.c
|
||||
ramstage-y += cpu.c
|
||||
ramstage-$(CONFIG_COOP_MULTITASKING) += cpu.c
|
||||
ramstage-y += eabi_compat.c
|
||||
ramstage-y += boot.c
|
||||
ramstage-y += tables.c
|
||||
|
|
|
|||
|
|
@ -34,6 +34,11 @@
|
|||
*/
|
||||
struct cpu_info *cpu_info(void)
|
||||
{
|
||||
#error "This is BROKEN! ARM stacks are currently not guaranteed to be " \
|
||||
"STACK_SIZE-aligned in any way. If you ever plan to revive this " \
|
||||
"feature, make sure you add the proper assertions " \
|
||||
"(and maybe consider revising the whole thing to work closer to what " \
|
||||
"arm64 is doing now)."
|
||||
uintptr_t addr = ALIGN((uintptr_t)__builtin_frame_address(0),
|
||||
CONFIG_STACK_SIZE);
|
||||
addr -= sizeof(struct cpu_info);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue