smp: Support all 3 PowerPC cores
The Wii U has 3 CPU cores we could be using, but these remain unused due to a CPU bug:
In fact, the SMPization of the 750 in the Espresso is not perfect. There appears to be a bug that affects load-exclusive and store-exclusive instructions (an explicit cache flush is required), which means that using SMP Linux with them will require patching the kernel and libpthread to work around it (and possibly other software that directly uses these instructions to e.g. implement atomics). They would’ve never shipped such a blatant bug on a general-purpose CPU, but I guess they called it good enough for a game console since they can just work around it in the SDK (which they do: the Cafe OS locking primitives have the workaround).
-marcan, 2014, Console Hacking 2013: Omake
This sounds like an easy enough distro-level fix, however q99 (Void dev) pointed out that this basically amounts to recompiling everything that uses c++11's
<atomic> and c11's
<stdatomic.h>, or the equivalent gcc builtins; using a patched compiler. It doesn't seem possible for us to work around this at the kernel level.
Also, there might be this.
At very least, we might be able to get smp working for Gentoo users, or an extremely friendly distro. Low-priority, I think.