Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1452163 > unrolled thread
| Started by | Andrey Smirnov <andrew.smirnov@gmail.com> |
|---|---|
| First post | 2016-07-29 01:10 +0200 |
| Last post | 2016-08-09 20:30 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 2/3] powerpc: Call chained reset handlers during reset Andrey Smirnov <andrew.smirnov@gmail.com> - 2016-07-29 01:10 +0200
Re: [PATCH v2 2/3] powerpc: Call chained reset handlers during reset Nicholas Piggin <npiggin@gmail.com> - 2016-08-01 05:50 +0200
Re: [PATCH v2 2/3] powerpc: Call chained reset handlers during reset Andrey Smirnov <andrew.smirnov@gmail.com> - 2016-08-09 20:30 +0200
| From | Andrey Smirnov <andrew.smirnov@gmail.com> |
|---|---|
| Date | 2016-07-29 01:10 +0200 |
| Subject | [PATCH v2 2/3] powerpc: Call chained reset handlers during reset |
| Message-ID | <s02Bb-4AR-1@gated-at.bofh.it> |
Call out to all restart handlers that were added via register_restart_handler() API when restarting the machine. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> --- No changes compared to v1 arch/powerpc/kernel/setup-common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 5cd3283..205d073 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -145,6 +145,10 @@ void machine_restart(char *cmd) ppc_md.restart(cmd); smp_send_stop(); + + do_kernel_restart(cmd); + mdelay(1000); + machine_hang(); } -- 2.5.5
[toc] | [next] | [standalone]
| From | Nicholas Piggin <npiggin@gmail.com> |
|---|---|
| Date | 2016-08-01 05:50 +0200 |
| Subject | Re: [PATCH v2 2/3] powerpc: Call chained reset handlers during reset |
| Message-ID | <s1coO-Tv-23@gated-at.bofh.it> |
| In reply to | #1452163 |
On Thu, 28 Jul 2016 16:07:17 -0700 Andrey Smirnov <andrew.smirnov@gmail.com> wrote: > Call out to all restart handlers that were added via > register_restart_handler() API when restarting the machine. > > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> > --- > > No changes compared to v1 > > arch/powerpc/kernel/setup-common.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/powerpc/kernel/setup-common.c > b/arch/powerpc/kernel/setup-common.c index 5cd3283..205d073 100644 > --- a/arch/powerpc/kernel/setup-common.c > +++ b/arch/powerpc/kernel/setup-common.c > @@ -145,6 +145,10 @@ void machine_restart(char *cmd) > ppc_md.restart(cmd); > > smp_send_stop(); > + > + do_kernel_restart(cmd); > + mdelay(1000); > + > machine_hang(); > } > Ah, I see why you don't move smp_send_stop(). 3 other architectures call do_kernel_restart(). arm and arm64 call it with local_irq_disabled(). arm and mips insert the 1s delay. All call it after smp_send_stop(). I don't see the harm in the delay. Should we call it with local interrupts disabled?
[toc] | [prev] | [next] | [standalone]
| From | Andrey Smirnov <andrew.smirnov@gmail.com> |
|---|---|
| Date | 2016-08-09 20:30 +0200 |
| Message-ID | <s4jWN-2Jb-13@gated-at.bofh.it> |
| In reply to | #1452968 |
On Sun, Jul 31, 2016 at 8:47 PM, Nicholas Piggin <npiggin@gmail.com> wrote: > On Thu, 28 Jul 2016 16:07:17 -0700 > Andrey Smirnov <andrew.smirnov@gmail.com> wrote: > >> Call out to all restart handlers that were added via >> register_restart_handler() API when restarting the machine. >> >> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> >> --- >> >> No changes compared to v1 >> >> arch/powerpc/kernel/setup-common.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/arch/powerpc/kernel/setup-common.c >> b/arch/powerpc/kernel/setup-common.c index 5cd3283..205d073 100644 >> --- a/arch/powerpc/kernel/setup-common.c >> +++ b/arch/powerpc/kernel/setup-common.c >> @@ -145,6 +145,10 @@ void machine_restart(char *cmd) >> ppc_md.restart(cmd); >> >> smp_send_stop(); >> + >> + do_kernel_restart(cmd); >> + mdelay(1000); >> + >> machine_hang(); >> } >> > > Ah, I see why you don't move smp_send_stop(). 3 other architectures > call do_kernel_restart(). arm and arm64 call it with > local_irq_disabled(). I am not very familiar with low-level SPM code, so take all below with a grain of salt. From my understanding of the code ARM's implementation of smp_send_stop() is different from MIPS/PowerPC ones in that it just raises an IPI with a special "stop" flag set, which can and probably should be done with IRQs disabled. Both MIPS and PowerPC call smp_call_fuction() in their smp_send_stop() implementation, which if I read the documentation correctly should not be called with interrupts disabled, so it looks like the call to local_irq_disabled() could only be placed after the call to smp_send_stop() on those platforms. > arm and mips insert the 1s delay. All call it > after smp_send_stop(). I don't see the harm in the delay. Should we > call it with local interrupts disabled? > With all above being said I don't see any harm in disabling interrupts. Thanks, Andrey
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web