Re: [PATCH v2 19/24] xtensa/cpu: Make sure cpu_die() doesn't return

2023-02-14 Thread Josh Poimboeuf
On Tue, Feb 14, 2023 at 11:48:41AM -0800, Max Filippov wrote: > On Tue, Feb 14, 2023 at 10:23 AM Josh Poimboeuf wrote: > > On Tue, Feb 14, 2023 at 08:55:32AM +0100, Philippe Mathieu-Daudé wrote: > > > Can you update the documentation along? Currently we have: > > > > > > /* > > >* Called

Re: [PATCH v2 19/24] xtensa/cpu: Make sure cpu_die() doesn't return

2023-02-14 Thread Max Filippov
On Tue, Feb 14, 2023 at 10:23 AM Josh Poimboeuf wrote: > On Tue, Feb 14, 2023 at 08:55:32AM +0100, Philippe Mathieu-Daudé wrote: > > Can you update the documentation along? Currently we have: > > > > /* > >* Called from the idle thread for the CPU which has been shutdown. > >* > >*

Re: [PATCH v2 19/24] xtensa/cpu: Make sure cpu_die() doesn't return

2023-02-14 Thread Steven Rostedt
On Tue, 14 Feb 2023 10:23:22 -0800 Josh Poimboeuf wrote: > void __ref cpu_die(void) > { > idle_task_exit(); > local_irq_disable(); > __asm__ __volatile__( > " movia2, cpu_restart\n" > " jx a2\n"); > >

Re: [PATCH v2 19/24] xtensa/cpu: Make sure cpu_die() doesn't return

2023-02-14 Thread Josh Poimboeuf
On Tue, Feb 14, 2023 at 08:55:32AM +0100, Philippe Mathieu-Daudé wrote: > Hi Josh, > > On 14/2/23 08:05, Josh Poimboeuf wrote: > > cpu_die() doesn't return. Make that more explicit with a BUG(). > > > > BUG() is preferable to unreachable() because BUG() is a more explicit > > failure mode and

Re: [PATCH v2 19/24] xtensa/cpu: Make sure cpu_die() doesn't return

2023-02-13 Thread Philippe Mathieu-Daudé
Hi Josh, On 14/2/23 08:05, Josh Poimboeuf wrote: cpu_die() doesn't return. Make that more explicit with a BUG(). BUG() is preferable to unreachable() because BUG() is a more explicit failure mode and avoids undefined behavior like falling off the edge of the function into whatever code

[PATCH v2 19/24] xtensa/cpu: Make sure cpu_die() doesn't return

2023-02-13 Thread Josh Poimboeuf
cpu_die() doesn't return. Make that more explicit with a BUG(). BUG() is preferable to unreachable() because BUG() is a more explicit failure mode and avoids undefined behavior like falling off the edge of the function into whatever code happens to be next. Signed-off-by: Josh Poimboeuf ---