Message ID | 20171017053542.7924-1-npiggin@gmail.com |
---|---|
State | New |
Headers | show |
Series | mambo: disable OPAL_SIGNAL_SYSTEM_RESET | expand |
Nicholas Piggin <npiggin@gmail.com> writes: > mambo does not deliver system reset interrupts correctly (details in > the added comment), so disable it for now. > > Signed-off-by: Nicholas Piggin <npiggin@gmail.com> > -- > > This feature was useful for developing the NMI IPI system in Linux, > but now it's somewhat working, and we've got OPAL_SIGNAL_SYSTEM_RESET > implemented on real hardware (and equivalent hypercall for QEMU > guests), it is less important now. It's annoing because it causes > breaking to xmon to usually often crash the kernel in an SMP sim. (looking back at patches I've neglected in patchwork as I have a notmuch query for that now) I'm interested in another alternative as we do have stupid unittests for part of this code that is nice to have work. I guess we could look at what idle states are enabled, and for the unit tests, just enable none of them?
On Thu, 26 Jul 2018 18:03:50 +1000 Stewart Smith <stewart@linux.ibm.com> wrote: > Nicholas Piggin <npiggin@gmail.com> writes: > > mambo does not deliver system reset interrupts correctly (details in > > the added comment), so disable it for now. > > > > Signed-off-by: Nicholas Piggin <npiggin@gmail.com> > > -- > > > > This feature was useful for developing the NMI IPI system in Linux, > > but now it's somewhat working, and we've got OPAL_SIGNAL_SYSTEM_RESET > > implemented on real hardware (and equivalent hypercall for QEMU > > guests), it is less important now. It's annoing because it causes > > breaking to xmon to usually often crash the kernel in an SMP sim. > > (looking back at patches I've neglected in patchwork as I have a notmuch > query for that now) > > I'm interested in another alternative as we do have stupid unittests for > part of this code that is nice to have work. > > I guess we could look at what idle states are enabled, and for the unit > tests, just enable none of them? > Yeah that could work for unit tests. One day if we get mambo fixed we could turn it back on too. I'll have to get back to looking at that, but I've had enough system reset problems for the moment :) The mambo devs are busy with other things too I think. Thanks, Nick
Nicholas Piggin <npiggin@gmail.com> writes: > On Thu, 26 Jul 2018 18:03:50 +1000 > Stewart Smith <stewart@linux.ibm.com> wrote: > >> Nicholas Piggin <npiggin@gmail.com> writes: >> > mambo does not deliver system reset interrupts correctly (details in >> > the added comment), so disable it for now. >> > >> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com> >> > -- >> > >> > This feature was useful for developing the NMI IPI system in Linux, >> > but now it's somewhat working, and we've got OPAL_SIGNAL_SYSTEM_RESET >> > implemented on real hardware (and equivalent hypercall for QEMU >> > guests), it is less important now. It's annoing because it causes >> > breaking to xmon to usually often crash the kernel in an SMP sim. >> >> (looking back at patches I've neglected in patchwork as I have a notmuch >> query for that now) >> >> I'm interested in another alternative as we do have stupid unittests for >> part of this code that is nice to have work. >> >> I guess we could look at what idle states are enabled, and for the unit >> tests, just enable none of them? >> > > Yeah that could work for unit tests. One day if we get mambo fixed we > could turn it back on too. I'll have to get back to looking at that, > but I've had enough system reset problems for the moment :) The mambo > devs are busy with other things too I think. Yeah, there's probably a few things above this on the TODO list for them :) I'll see if I can be bothered whipping up a patch shortly.
diff --git a/platforms/mambo/mambo.c b/platforms/mambo/mambo.c index cb6e103c..8afd01c2 100644 --- a/platforms/mambo/mambo.c +++ b/platforms/mambo/mambo.c @@ -259,7 +259,22 @@ static int64_t mambo_signal_system_reset(int32_t cpu_nr) static void mambo_sreset_init(void) { - opal_register(OPAL_SIGNAL_SYSTEM_RESET, mambo_signal_system_reset, 1); + /* + * Mambo currently does not deliver system reset interrupts + * correctly if the CPU was in idle state. The expected + * behavior (and what the hardware does) is to set SRR1 to a + * power save wakeup, with wakeup reason system reset. This + * allows CPU state to be restored and then the system reset + * interrupt to be taken. + * + * Mambo does a non-power-saving wakeup, which immediately + * crashes if MSR[RI] is clear as part of the idle entry sequence. + * + * Disable this for now until mambo can be fixed, or a workaround + * put in the tcl injection. + */ + if (0) + opal_register(OPAL_SIGNAL_SYSTEM_RESET, mambo_signal_system_reset, 1); } static void mambo_platform_init(void)
mambo does not deliver system reset interrupts correctly (details in the added comment), so disable it for now. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> -- This feature was useful for developing the NMI IPI system in Linux, but now it's somewhat working, and we've got OPAL_SIGNAL_SYSTEM_RESET implemented on real hardware (and equivalent hypercall for QEMU guests), it is less important now. It's annoing because it causes breaking to xmon to usually often crash the kernel in an SMP sim. --- platforms/mambo/mambo.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)