[FSL P50x0] Kernel 6.9-rc1 compiling issue

Christian Zigotzky chzigotzky at xenosoft.de
Mon Mar 25 22:01:37 AEDT 2024


Configured:

CONFIG_VMCORE_INFO=y
# CONFIG_CRASH_DUMP is not set
CONFIG_KEXEC_CORE=y

PowerPC updates 6.9-2:

-#ifdef CONFIG_VMCORE_INFO
+#ifdef CONFIG_CRASH_DUMP
  /* This keeps a track of which one is the crashing cpu. */
  int crashing_cpu = -1;
  #endif

---------

int crashing_cpu = -1; was used before.

I continue to use it with the following temporary patch:

--- a/arch/powerpc/platforms/85xx/smp.c    2024-03-25 06:14:02.201209476 
+0100
+++ b/arch/powerpc/platforms/85xx/smp.c    2024-03-25 06:10:04.421425931 
+0100
@@ -393,6 +393,7 @@ static void mpc85xx_smp_kexec_cpu_down(i
      int disable_threadbit = 0;
      long start = mftb();
      long now;
+    int crashing_cpu = -1;

      local_irq_disable();
      hard_irq_disable();

---------

-- Christian


On 25 March 2024 at 10:14 am, Christian Zigotzky wrote:
> We have configured (kernel config):
>
> # CONFIG_CRASH_DUMP is not set
> CONFIG_KEXEC_CORE=y
>
> Link: 
> https://github.com/chzigotzky/kernels/blob/main/configs/x5000_defconfig
>
> Compiling error:
>
> arch/powerpc/platforms/85xx/smp.c: In function 
> 'mpc85xx_smp_kexec_cpu_down':
> arch/powerpc/platforms/85xx/smp.c:401:13: error: 'crashing_cpu' 
> undeclared (first use in this function); did you mean 'crash_save_cpu'?
>   401 |  if (cpu == crashing_cpu && cpu_thread_in_core(cpu) != 0) {
>       |             ^~~~~~~~~~~~
>       |             crash_save_cpu
> arch/powerpc/platforms/85xx/smp.c:401:13: note: each undeclared 
> identifier is reported only once for each function it appears in
> make[5]: *** [scripts/Makefile.build:244: 
> arch/powerpc/platforms/85xx/smp.o] Error 1
> make[4]: *** [scripts/Makefile.build:485: arch/powerpc/platforms/85xx] 
> Error 2
> make[3]: *** [scripts/Makefile.build:485: arch/powerpc/platforms] Error 2
> make[2]: *** [scripts/Makefile.build:485: arch/powerpc] Error 2
>
> -----------------
>
> PowerPC updates 6.9-2:
>
> #ifdef CONFIG_KEXEC_CORE
>
> -extern int crashing_cpu;
>
> -----------------
>
> +#if defined(CONFIG_CRASH_DUMP)
> ...
> +extern int crashing_cpu;
>
> +#ifdef CONFIG_CRASH_DUMP
>  /* This keeps a track of which one is the crashing cpu. */
>  int crashing_cpu = -1;
>  #endif
>
> -----------------
>
> -- Christian
>
>
> On 25 March 2024 at 08:15 am, Christian Zigotzky wrote:
>> Thanks a lot for the hint.
>>
>> Could you please add #include <asm/kexec.h> to 
>> arch/powerpc/platforms/85xx/smp.c for the next PowerPC fixes?
>>
>> Christian
>>
>>
>> On 25 March 2024 at 07:43 am, Christophe Leroy wrote:
>>> Hi,
>>>
>>> Le 25/03/2024 à 06:18, Christian Zigotzky a écrit :
>>>> I have created a patch:
>>>>
>>>> --- a/arch/powerpc/platforms/85xx/smp.c 2024-03-25 
>>>> 06:14:02.201209476 +0100
>>>> +++ b/arch/powerpc/platforms/85xx/smp.c 2024-03-25 
>>>> 06:10:04.421425931 +0100
>>>> @@ -393,6 +393,7 @@ static void mpc85xx_smp_kexec_cpu_down(i
>>>>           int disable_threadbit = 0;
>>>>           long start = mftb();
>>>>           long now;
>>>> +       int crashing_cpu = -1;
>>> crashing_cpu is a global variable defined in
>>> arch/powerpc/kernel/setup-common.c and declared in
>>> arch/powerpc/include/asm/kexec.h
>>>
>>> So you can't redefine crashing_cpu as a local stub.
>>>
>>> All you need to do is to add #include <asm/kexec.h> just like
>>> arch/powerpc/platforms/powernv/smp.c I guess.
>>>
>>> Christophe
>>>
>>>
>>>
>>>>           local_irq_disable();
>>>>           hard_irq_disable();
>>>>
>>>> ---
>>>>
>>>> -- Christian
>>>>
>>>>
>>>> On 25 March 2024 at 05:48 am, Christian Zigotzky wrote:
>>>>> Hi All,
>>>>>
>>>>> Compiling of the RC1 of kernel 6.9 doesn’t work anymore for our FSL
>>>>> P5020/P5040 boards [1] since the PowerPC updates 6.9-2 [2].
>>>>>
>>>>> Error messages:
>>>>>
>>>>> arch/powerpc/platforms/85xx/smp.c: In function
>>>>> 'mpc85xx_smp_kexec_cpu_down':
>>>>> arch/powerpc/platforms/85xx/smp.c:401:13: error: 'crashing_cpu'
>>>>> undeclared (first use in this function); did you mean 
>>>>> 'crash_save_cpu'?
>>>>>    401 |  if (cpu == crashing_cpu && cpu_thread_in_core(cpu) != 0) {
>>>>>        |             ^~~~~~~~~~~~
>>>>>        |             crash_save_cpu
>>>>> arch/powerpc/platforms/85xx/smp.c:401:13: note: each undeclared
>>>>> identifier is reported only once for each function it appears in
>>>>> make[5]: *** [scripts/Makefile.build:244:
>>>>> arch/powerpc/platforms/85xx/smp.o] Error 1
>>>>> make[4]: *** [scripts/Makefile.build:485: 
>>>>> arch/powerpc/platforms/85xx]
>>>>> Error 2
>>>>> make[3]: *** [scripts/Makefile.build:485: arch/powerpc/platforms] 
>>>>> Error 2
>>>>> make[2]: *** [scripts/Makefile.build:485: arch/powerpc] Error 2
>>>>>
>>>>> ---
>>>>>
>>>>> I was able to revert it. After that the compiling works again.
>>>>>
>>>>> Could you please check the PowerPC updates 6.9-2? [2]
>>>>>
>>>>> Thanks,
>>>>> Christian
>>>>>
>>>>> [1] http://wiki.amiga.org/index.php?title=X5000
>>>>> [2]
>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.9-rc1&id=484193fecd2b6349a6fd1554d306aec646ae1a6a 
>>>>>
>>
>



More information about the Linuxppc-dev mailing list