From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: "Pali Rohár" <pali@kernel.org>, "Michael Ellerman" <mpe@ellerman.id.au>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Regression: Linux v5.15+ does not boot on Freescale P2020
Date: Mon, 25 Jul 2022 16:20:49 +0000 [thread overview]
Message-ID: <e2487668-b6d9-9ddb-1bb4-9f4d37fae1a7@csgroup.eu> (raw)
In-Reply-To: <20220725125256.cg6su4d2ageylvp6@pali>
Le 25/07/2022 à 14:52, Pali Rohár a écrit :
> On Monday 25 July 2022 18:20:01 Michael Ellerman wrote:
>> Pali Rohár <pali@kernel.org> writes:
>>> On Saturday 23 July 2022 14:42:22 Christophe Leroy wrote:
>>>> Le 22/07/2022 à 11:09, Pali Rohár a écrit :
>>>>> Trying to boot mainline Linux kernel v5.15+, including current version
>>>>> from master branch, on Freescale P2020 does not work. Kernel does not
>>>>> print anything to serial console, seems that it does not work and after
>>>>> timeout watchdog reset the board.
>>>>
>>>> Can you provide more information ? Which defconfig or .config, which
>>>> version of gcc, etc ... ?
>>>
>>> I used default defconfig for mpc85xx with gcc 8, compilation for e500
>>> cores.
>>>
>>> If you need exact .config content I can send it during week.
>>>
>>>>> I run git bisect and it found following commit:
>>>>>
>>>>> 9401f4e46cf6965e23738f70e149172344a01eef is the first bad commit
>>>>> commit 9401f4e46cf6965e23738f70e149172344a01eef
>>>>> Author: Christophe Leroy <christophe.leroy@csgroup.eu>
>>>>> Date: Tue Mar 2 08:48:11 2021 +0000
>>>>>
>>>>> powerpc: Use lwarx/ldarx directly instead of PPC_LWARX/LDARX macros
>>>>>
>>>>> Force the eh flag at 0 on PPC32.
>>>>>
>>>>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>>>>> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>>>>> Link: https://lore.kernel.org/r/1fc81f07cabebb875b963e295408cc3dd38c8d85.1614674882.git.christophe.leroy@csgroup.eu
>>>>>
>>>>> :040000 040000 fe6747e45736dfcba74914a9445e5f70f5120600 96358d08b65d3200928a973efb5b969b3d45f2b0 M arch
>>>>>
>>>>>
>>>>> If I revert this commit then kernel boots correctly. It also boots fine
>>>>> if I revert this commit on top of master branch.
>>>>>
>>>>> Freescale P2020 has two 32-bit e500 powerpc cores.
>>>>>
>>>>> Any idea why above commit is causing crash of the kernel? And why it is
>>>>> needed? Could eh flag set to 0 cause deadlock?
>>>>
>>>> Setting the eh flag to 0 is not supposed to be a change introduced by
>>>> that commit. Indeed that commit is not supposed to change anything at
>>>> all in the generated code.
>>>
>>> My understanding of that commit is that it changed eh flag parameter
>>> from 1 to 0 for 32-bit powerpc, including also p2020.
>>
>> Can you compare the disassembly before and after and find a place where
>> an instruction has changed?
>>
>> cheers
>
> Yes, of course. Here is diff between output from objdump -d vmlinux.
> original version --- is from git master branch and modified version +++
> is the original version with reverted above problematic commit.
> So the +++ version is the one which is working.
>
> --- vmlinux.master.dump 2022-07-25 14:43:45.922239496 +0200
> +++ vmlinux.revert.dump 2022-07-25 14:43:49.238259296 +0200
> @@ -1,5 +1,5 @@
>
> -vmlinux.master: file format elf32-powerpc
> +vmlinux.revert: file format elf32-powerpc
>
>
> Disassembly of section .head.text:
> @@ -11213,7 +11213,7 @@ c000b850: 3f a0 c1 0f lis r29,-1611
> c000b854: 81 02 00 04 lwz r8,4(r2)
> c000b858: 3b fd 10 68 addi r31,r29,4200
> c000b85c: 39 40 00 01 li r10,1
> -c000b860: 7d 20 f8 29 lwarx r9,0,r31,1
> +c000b860: 7d 20 f8 28 lwarx r9,0,r31
> c000b864: 2c 09 00 00 cmpwi r9,0
> c000b868: 40 82 00 10 bne c000b878 <die+0x68>
> c000b86c: 7d 40 f9 2d stwcx. r10,0,r31
That's really strange. I made a try with mpc85xx_defconfig with GCC 11
and I don't get any such difference.
Does your version of GCC has anything special ?
Can you send you exact .config ?
Thanks
Christophe
next prev parent reply other threads:[~2022-07-25 16:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 9:09 Regression: Linux v5.15+ does not boot on Freescale P2020 Pali Rohár
2022-07-23 14:42 ` Christophe Leroy
2022-07-23 15:07 ` Pali Rohár
2022-07-25 8:20 ` Michael Ellerman
2022-07-25 12:52 ` Pali Rohár
2022-07-25 16:20 ` Christophe Leroy [this message]
2022-07-25 20:10 ` Pali Rohár
2022-07-25 21:54 ` Segher Boessenkool
2022-07-26 8:34 ` Pali Rohár
2022-07-26 9:02 ` Arnd Bergmann
2022-07-26 13:44 ` Segher Boessenkool
2022-07-26 14:01 ` Pali Rohár
2022-07-26 14:14 ` Segher Boessenkool
2022-08-02 6:47 ` Christophe Leroy
2022-08-02 8:28 ` Arnd Bergmann
2022-07-26 14:30 ` Christophe Leroy
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=e2487668-b6d9-9ddb-1bb4-9f4d37fae1a7@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=pali@kernel.org \
/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).