From: Atish Patra <atish.patra@xxxxxxxxxx> Date: Tue, 5 Dec 2017 19:41:47 -0600 > I am looking at a spinlock bad magic issue in timer code on a legacy > sparc machine. > > 0eeda71b (timer: Replace timer base by a cpu index) > As per my understanding, the above patch assumes there is always a cpu > 0 and that timer to CPU0 should be assigned statically to avoid > boot_tvec_base logic. > DEFINE_TIMER macro seems to initialize the flags to 0 and the commit > text also points to that. > Please let me know if I missed something. > > We observed the spinlock bad magic with legacy sun4u machines which > have sparse numbered cpus and does not have cpu0. > We may be wrong but our investigation pointed out that per-cpu > timer_base structure for cpu 0 is not initialized leading invalid > magic value. console_timer seems to be statically assigned to cpu0 in > this case. Yeah, you can't really assume that cpu 0 is the boot cpu let alone even exists. And it is clear that the timer code now has such a dependency. Thomas, you'll probably have to do something like have a fixup early in the boot process which fixes up the flags field of all of the statically defined timer objects so that it contains the cpu that is running the early bootup process. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html