diff for duplicates of <1503022785.28554.101.camel@gmail.com> diff --git a/a/1.txt b/N1/1.txt index c911384..566865a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -6,68 +6,68 @@ I haven't had any respond to this patch. Thank you. On Tue, 2017-08-08 at 10:22 +0900, Hoeun Ryu wrote: -> ?Commit 0ee5941 : (x86/panic: replace smp_send_stop() with kdump friendly +> Commit 0ee5941 : (x86/panic: replace smp_send_stop() with kdump friendly > version in panic path) introduced crash_smp_send_stop() which is a weak > function and can be overriden by architecture codes to fix the side effect > caused by commit f06e515 : (kernel/panic.c: add "crash_kexec_post_ > notifiers" option). > -> ?ARM architecture uses the weak version function and the problem is that +> ARM architecture uses the weak version function and the problem is that > the weak function simply calls smp_send_stop() which makes other CPUs > offline and takes away the chance to save crash information for nonpanic > CPUs in machine_crash_shutdown() when crash_kexec_post_notifiers kernel > option is enabled. > -> ?Calling smp_call_function(machine_crash_nonpanic_core, NULL, false) in +> Calling smp_call_function(machine_crash_nonpanic_core, NULL, false) in > the function is useless because all nonpanic CPUs are already offline by > smp_send_stop() in this case and smp_call_function() only works against > online CPUs. > -> ?The result is that /proc/vmcore is not available with the error messages; +> The result is that /proc/vmcore is not available with the error messages; > "Warning: Zero PT_NOTE entries found", "Kdump: vmcore not initialized". > -> ?crash_smp_send_stop() is implemented for ARM architecture to fix this +> crash_smp_send_stop() is implemented for ARM architecture to fix this > problem and the function (strong symbol version) saves crash information > for nonpanic CPUs using smp_call_function() and machine_crash_shutdown() > tries to save crash information for nonpanic CPUs only when > crash_kexec_post_notifiers kernel option is disabled. > -> ?We might be able to implement the function like arm64 or x86 using a +> We might be able to implement the function like arm64 or x86 using a > dedicated IPI (let's say IPI_CPU_CRASH_STOP), but we cannot implement this > function like that because of the lack of IPI slots. Please see the commit > e7273ff4 : (ARM: 8488/1: Make IPI_CPU_BACKTRACE a "non-secure" SGI) > > Signed-off-by: Hoeun Ryu <hoeun.ryu@gmail.com> > --- -> ?v3: -> ???- remove 'WARN_ON(num_online_cpus() > 1)' in machine_crash_shutdown(). -> ?????it's a false check for the case when crash_kexec_post_notifiers -> ?????kernel option is disabled. -> ?v2: -> ???- calling crash_smp_send_stop() in machine_crash_shutdown() for the case -> ?????when crash_kexec_post_notifiers kernel option is disabled. -> ???- fix commit messages for it. +> v3: +> - remove 'WARN_ON(num_online_cpus() > 1)' in machine_crash_shutdown(). +> it's a false check for the case when crash_kexec_post_notifiers +> kernel option is disabled. +> v2: +> - calling crash_smp_send_stop() in machine_crash_shutdown() for the case +> when crash_kexec_post_notifiers kernel option is disabled. +> - fix commit messages for it. > -> ?arch/arm/kernel/machine_kexec.c | 40 +++++++++++++++++++++++++++++----------- -> ?1 file changed, 29 insertions(+), 11 deletions(-) +> arch/arm/kernel/machine_kexec.c | 40 +++++++++++++++++++++++++++++----------- +> 1 file changed, 29 insertions(+), 11 deletions(-) > > diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c > index fe1419e..82ef7c7 100644 > --- a/arch/arm/kernel/machine_kexec.c > +++ b/arch/arm/kernel/machine_kexec.c > @@ -94,6 +94,34 @@ void machine_crash_nonpanic_core(void *unused) -> ? cpu_relax(); -> ?} -> ? +> cpu_relax(); +> } +> > +void crash_smp_send_stop(void) > +{ > + static int cpus_stopped; > + unsigned long msecs; > + > + /* -> + ?* This function can be called twice in panic path, but obviously -> + ?* we execute this only once. -> + ?*/ +> + * This function can be called twice in panic path, but obviously +> + * we execute this only once. +> + */ > + if (cpus_stopped) > + return; > + @@ -87,17 +87,17 @@ On Tue, 2017-08-08 at 10:22 +0900, Hoeun Ryu wrote: > + pr_warn("Non-crashing CPUs did not react to IPI\n"); > +} > + -> ?static void machine_kexec_mask_interrupts(void) -> ?{ -> ? unsigned int i; +> static void machine_kexec_mask_interrupts(void) +> { +> unsigned int i; > @@ -119,19 +147,9 @@ static void machine_kexec_mask_interrupts(void) -> ? -> ?void machine_crash_shutdown(struct pt_regs *regs) -> ?{ +> +> void machine_crash_shutdown(struct pt_regs *regs) +> { > - unsigned long msecs; > - -> ? local_irq_disable(); -> ? +> local_irq_disable(); +> > - atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1); > - smp_call_function(machine_crash_nonpanic_core, NULL, false); > - msecs = 1000; /* Wait at most a second for the other cpus to stop */ @@ -108,6 +108,6 @@ On Tue, 2017-08-08 at 10:22 +0900, Hoeun Ryu wrote: > - if (atomic_read(&waiting_for_crash_ipi) > 0) > - pr_warn("Non-crashing CPUs did not react to IPI\n"); > + crash_smp_send_stop(); -> ? -> ? crash_save_cpu(regs, smp_processor_id()); -> ? machine_kexec_mask_interrupts(); +> +> crash_save_cpu(regs, smp_processor_id()); +> machine_kexec_mask_interrupts(); diff --git a/a/content_digest b/N1/content_digest index c23b1bc..41ea93e 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,8 +1,12 @@ "ref\01502155416-5735-1-git-send-email-hoeun.ryu@gmail.com\0" - "From\0hoeun.ryu@gmail.com (Hoeun Ryu)\0" - "Subject\0[PATCHv3] arm:kexec: have own crash_smp_send_stop() for crash dump for nonpanic cores\0" + "From\0Hoeun Ryu <hoeun.ryu@gmail.com>\0" + "Subject\0Re: [PATCHv3] arm:kexec: have own crash_smp_send_stop() for crash dump for nonpanic cores\0" "Date\0Fri, 18 Aug 2017 11:19:45 +0900\0" - "To\0linux-arm-kernel@lists.infradead.org\0" + "To\0Russell King <linux@armlinux.org.uk>" + Andrew Morton <akpm@linux-foundation.org> + " Laura Abbott <labbott@redhat.com>\0" + "Cc\0linux-arm-kernel@lists.infradead.org" + " linux-kernel@vger.kernel.org\0" "\00:1\0" "b\0" "Hello, All.\n" @@ -13,68 +17,68 @@ "Thank you.\n" "\n" "On Tue, 2017-08-08 at 10:22 +0900, Hoeun Ryu wrote:\n" - "> ?Commit 0ee5941 : (x86/panic: replace smp_send_stop() with kdump friendly\n" + "> \302\240Commit 0ee5941 : (x86/panic: replace smp_send_stop() with kdump friendly\n" "> version in panic path) introduced crash_smp_send_stop() which is a weak\n" "> function and can be overriden by architecture codes to fix the side effect\n" "> caused by commit f06e515 : (kernel/panic.c: add \"crash_kexec_post_\n" "> notifiers\" option).\n" "> \n" - "> ?ARM architecture uses the weak version function and the problem is that\n" + "> \302\240ARM architecture uses the weak version function and the problem is that\n" "> the weak function simply calls smp_send_stop() which makes other CPUs\n" "> offline and takes away the chance to save crash information for nonpanic\n" "> CPUs in machine_crash_shutdown() when crash_kexec_post_notifiers kernel\n" "> option is enabled.\n" "> \n" - "> ?Calling smp_call_function(machine_crash_nonpanic_core, NULL, false) in\n" + "> \302\240Calling smp_call_function(machine_crash_nonpanic_core, NULL, false) in\n" "> the function is useless because all nonpanic CPUs are already offline by\n" "> smp_send_stop() in this case and smp_call_function() only works against\n" "> online CPUs.\n" "> \n" - "> ?The result is that /proc/vmcore is not available with the error messages;\n" + "> \302\240The result is that /proc/vmcore is not available with the error messages;\n" "> \"Warning: Zero PT_NOTE entries found\", \"Kdump: vmcore not initialized\".\n" "> \n" - "> ?crash_smp_send_stop() is implemented for ARM architecture to fix this\n" + "> \302\240crash_smp_send_stop() is implemented for ARM architecture to fix this\n" "> problem and the function (strong symbol version) saves crash information\n" "> for nonpanic CPUs using smp_call_function() and machine_crash_shutdown()\n" "> tries to save crash information for nonpanic CPUs only when\n" "> crash_kexec_post_notifiers kernel option is disabled.\n" "> \n" - "> ?We might be able to implement the function like arm64 or x86 using a\n" + "> \302\240We might be able to implement the function like arm64 or x86 using a\n" "> dedicated IPI (let's say IPI_CPU_CRASH_STOP), but we cannot implement this\n" "> function like that because of the lack of IPI slots. Please see the commit\n" "> e7273ff4 : (ARM: 8488/1: Make IPI_CPU_BACKTRACE a \"non-secure\" SGI)\n" "> \n" "> Signed-off-by: Hoeun Ryu <hoeun.ryu@gmail.com>\n" "> ---\n" - "> ?v3:\n" - "> ???- remove 'WARN_ON(num_online_cpus() > 1)' in machine_crash_shutdown().\n" - "> ?????it's a false check for the case when crash_kexec_post_notifiers\n" - "> ?????kernel option is disabled.\n" - "> ?v2:\n" - "> ???- calling crash_smp_send_stop() in machine_crash_shutdown() for the case\n" - "> ?????when crash_kexec_post_notifiers kernel option is disabled.\n" - "> ???- fix commit messages for it.\n" + "> \302\240v3:\n" + "> \302\240\302\240\302\240- remove 'WARN_ON(num_online_cpus() > 1)' in machine_crash_shutdown().\n" + "> \302\240\302\240\302\240\302\240\302\240it's a false check for the case when crash_kexec_post_notifiers\n" + "> \302\240\302\240\302\240\302\240\302\240kernel option is disabled.\n" + "> \302\240v2:\n" + "> \302\240\302\240\302\240- calling crash_smp_send_stop() in machine_crash_shutdown() for the case\n" + "> \302\240\302\240\302\240\302\240\302\240when crash_kexec_post_notifiers kernel option is disabled.\n" + "> \302\240\302\240\302\240- fix commit messages for it.\n" "> \n" - "> ?arch/arm/kernel/machine_kexec.c | 40 +++++++++++++++++++++++++++++-----------\n" - "> ?1 file changed, 29 insertions(+), 11 deletions(-)\n" + "> \302\240arch/arm/kernel/machine_kexec.c | 40 +++++++++++++++++++++++++++++-----------\n" + "> \302\2401 file changed, 29 insertions(+), 11 deletions(-)\n" "> \n" "> diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c\n" "> index fe1419e..82ef7c7 100644\n" "> --- a/arch/arm/kernel/machine_kexec.c\n" "> +++ b/arch/arm/kernel/machine_kexec.c\n" "> @@ -94,6 +94,34 @@ void machine_crash_nonpanic_core(void *unused)\n" - "> ?\t\tcpu_relax();\n" - "> ?}\n" - "> ?\n" + "> \302\240\t\tcpu_relax();\n" + "> \302\240}\n" + "> \302\240\n" "> +void crash_smp_send_stop(void)\n" "> +{\n" "> +\tstatic int cpus_stopped;\n" "> +\tunsigned long msecs;\n" "> +\n" "> +\t/*\n" - "> +\t?* This function can be called twice in panic path, but obviously\n" - "> +\t?* we execute this only once.\n" - "> +\t?*/\n" + "> +\t\302\240* This function can be called twice in panic path, but obviously\n" + "> +\t\302\240* we execute this only once.\n" + "> +\t\302\240*/\n" "> +\tif (cpus_stopped)\n" "> +\t\treturn;\n" "> +\n" @@ -94,17 +98,17 @@ "> +\t\tpr_warn(\"Non-crashing CPUs did not react to IPI\\n\");\n" "> +}\n" "> +\n" - "> ?static void machine_kexec_mask_interrupts(void)\n" - "> ?{\n" - "> ?\tunsigned int i;\n" + "> \302\240static void machine_kexec_mask_interrupts(void)\n" + "> \302\240{\n" + "> \302\240\tunsigned int i;\n" "> @@ -119,19 +147,9 @@ static void machine_kexec_mask_interrupts(void)\n" - "> ?\n" - "> ?void machine_crash_shutdown(struct pt_regs *regs)\n" - "> ?{\n" + "> \302\240\n" + "> \302\240void machine_crash_shutdown(struct pt_regs *regs)\n" + "> \302\240{\n" "> -\tunsigned long msecs;\n" "> -\n" - "> ?\tlocal_irq_disable();\n" - "> ?\n" + "> \302\240\tlocal_irq_disable();\n" + "> \302\240\n" "> -\tatomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);\n" "> -\tsmp_call_function(machine_crash_nonpanic_core, NULL, false);\n" "> -\tmsecs = 1000; /* Wait at most a second for the other cpus to stop */\n" @@ -115,8 +119,8 @@ "> -\tif (atomic_read(&waiting_for_crash_ipi) > 0)\n" "> -\t\tpr_warn(\"Non-crashing CPUs did not react to IPI\\n\");\n" "> +\tcrash_smp_send_stop();\n" - "> ?\n" - "> ?\tcrash_save_cpu(regs, smp_processor_id());\n" - "> ?\tmachine_kexec_mask_interrupts();" + "> \302\240\n" + "> \302\240\tcrash_save_cpu(regs, smp_processor_id());\n" + "> \302\240\tmachine_kexec_mask_interrupts();" -50dc7b4282399053daa6cb2ab1880fdaaa8df1b1cf5798635c79ae31b9791415 +4995c1aef32deefe4564744db5c24268ef5eabf66c15ccde7938c5dffd970dee
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.