Attention is currently required from: Jason Glenesk, Raul Rangel, Nico Huber, Marshall Dawson, Julius Werner, Felix Held. Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59020 )
Change subject: treewide: Remove unused spinlock functions ......................................................................
Patch Set 2:
(4 comments)
File src/arch/x86/include/arch/smp/spinlock.h:
https://review.coreboot.org/c/coreboot/+/59020/comment/5928aef0_3caab82b PS2, Line 31: #define barrier() __asm__ __volatile__("" : : : "memory") static void phys_memory_barrier(void) in lib/ramtest.c static inline void barrier(void) in pineview/raminit.c
So this should probably stay and get cleaned up a bit.
CB:43810 was related
File src/include/smp/spinlock.h:
https://review.coreboot.org/c/coreboot/+/59020/comment/b1689fd3_65f68b3a PS2, Line 5: #include <arch/smp/spinlock.h> IMHO this file must provide valid spinlocks due the SMP guard.
File src/soc/amd/common/psp_verstage/include/arch/smp/spinlock.h:
https://review.coreboot.org/c/coreboot/+/59020/comment/786aad33_af8508ea PS2, Line 8: #define spin_unlock(lock) do {} while (0) We enter this file undef CONFIG(SMP) so these are not really acceptable. The trouble is CONFIG(SMP) and CONFIG_MAX_CPUS evaluate incorrectly for psp_verstage.
CB:47650 and CB:43310 were related with criticism on fast-tracking this in in the shape you see it today.
https://review.coreboot.org/c/coreboot/+/59020/comment/5f58c7d2_a5a3ca7f PS2, Line 11: #define boot_cpu() 1 Why does spinlock.h have #include <smp/node.h> at the end?
Does the sequence below make sense?
int boot_cpu(void); #define boot_cpu() 1