linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	Christian Zigotzky <chzigotzky@xenosoft.de>,
	"hbathini@linux.ibm.com" <hbathini@linux.ibm.com>
Cc: Darren Stevens <darren@stevens-zone.net>,
	"R.T.Dickinson" <rtd2@xtra.co.nz>,
	mad skateman <madskateman@gmail.com>,
	"R.T.Dickinson" <rtd@a-eon.com>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Matthew Leaman <matthew@a-eon.biz>,
	Christian Zigotzky <info@xenosoft.de>
Subject: Re: [FSL P50x0] Kernel 6.9-rc1 compiling issue
Date: Mon, 08 Apr 2024 22:20:05 +1000	[thread overview]
Message-ID: <87edbgavwq.fsf@mail.lhotse> (raw)
In-Reply-To: <41ff5851-6ff4-4c45-8f47-6336fd6c11ac@csgroup.eu>

Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Hi Christian, hi Hari,
>
> Le 04/04/2024 à 19:44, Christian Zigotzky a écrit :
>> Shall we use CONFIG_CRASH_DUMP to get int crashing_cpu = -1;?
>> 
>> Further information: 
>> https://lists.ozlabs.org/pipermail/linuxppc-dev/2024-March/269985.html 
>> <https://lists.ozlabs.org/pipermail/linuxppc-dev/2024-March/269985.html>
>
> Looking at problematic commit 5c4233cc0920 ("powerpc/kdump: Split 
> KEXEC_CORE and CRASH_DUMP dependency"), my feeling is that the change 
> should be as follows.
>
> Hari, can you confirm ?
>
> diff --git a/arch/powerpc/platforms/85xx/smp.c 
> b/arch/powerpc/platforms/85xx/smp.c
> index 40aa58206888..3209fc92ac19 100644
> --- a/arch/powerpc/platforms/85xx/smp.c
> +++ b/arch/powerpc/platforms/85xx/smp.c
> @@ -362,7 +362,7 @@ struct smp_ops_t smp_85xx_ops = {
>   #endif
>   };
>
> -#ifdef CONFIG_KEXEC_CORE
> +#ifdef CONFIG_CRASH_DUMP
>   #ifdef CONFIG_PPC32
>   atomic_t kexec_down_cpus = ATOMIC_INIT(0);
>
> @@ -465,7 +465,7 @@ static void mpc85xx_smp_machine_kexec(struct kimage 
> *image)
>
>   	default_machine_kexec(image);
>   }
> -#endif /* CONFIG_KEXEC_CORE */
> +#endif /* CONFIG_CRASH_DUMP */

That doesn't look right to me.

I think it needs something like below.

cheers

diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index 40aa58206888..276060c993a0 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -398,6 +398,7 @@ static void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
 	hard_irq_disable();
 	mpic_teardown_this_cpu(secondary);
 
+#ifdef CONFIG_CRASH_DUMP
 	if (cpu == crashing_cpu && cpu_thread_in_core(cpu) != 0) {
 		/*
 		 * We enter the crash kernel on whatever cpu crashed,
@@ -406,9 +407,11 @@ static void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
 		 */
 		disable_threadbit = 1;
 		disable_cpu = cpu_first_thread_sibling(cpu);
-	} else if (sibling != crashing_cpu &&
-		   cpu_thread_in_core(cpu) == 0 &&
-		   cpu_thread_in_core(sibling) != 0) {
+	} else if (sibling == crashing_cpu)
+		return;
+#endif
+	if (cpu_thread_in_core(cpu) == 0 &&
+	    cpu_thread_in_core(sibling) != 0) {
 		disable_threadbit = 2;
 		disable_cpu = sibling;
 	}

  reply	other threads:[~2024-04-08 12:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25  4:48 [FSL P50x0] Kernel 6.9-rc1 compiling issue Christian Zigotzky
2024-03-25  5:18 ` Christian Zigotzky
2024-03-25  6:43   ` Christophe Leroy
2024-03-25  7:15     ` Christian Zigotzky
2024-03-25  9:14       ` Christian Zigotzky
2024-03-25 11:01         ` Christian Zigotzky
2024-04-04 17:44         ` Christian Zigotzky
2024-04-04 19:00           ` Christophe Leroy
2024-04-08 12:20             ` Michael Ellerman [this message]
2024-05-09  5:15               ` Christian Zigotzky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87edbgavwq.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=christophe.leroy@csgroup.eu \
    --cc=chzigotzky@xenosoft.de \
    --cc=darren@stevens-zone.net \
    --cc=hbathini@linux.ibm.com \
    --cc=info@xenosoft.de \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madskateman@gmail.com \
    --cc=matthew@a-eon.biz \
    --cc=rtd2@xtra.co.nz \
    --cc=rtd@a-eon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).