All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	Russell King <linux@armlinux.org.uk>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	David Laight <David.Laight@aculab.com>,
	Charlie Jenkins <charlie@rivosinc.com>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	Helge Deller <deller@gmx.de>,
	Palmer Dabbelt <palmer@rivosinc.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: [PATCH v11] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests
Date: Sun, 3 Mar 2024 07:26:55 -0800	[thread overview]
Message-ID: <6df98c91-26b1-497a-9202-18bf86c0130d@roeck-us.net> (raw)
In-Reply-To: <f422742a-4c86-4cb0-a4f7-a62f0310eb23@csgroup.eu>

On 3/3/24 02:20, Christophe Leroy wrote:
> 
> 
> Le 01/03/2024 à 19:32, Guenter Roeck a écrit :
>> This leaves the mps2-an385:mps2_defconfig crash, which is avoided by
>> this patch.
>> My understanding, which may be wrong, is that arm images with thumb
>> instructions
>> do not support unaligned accesses (maybe I should say do not support
>> unaligned
>> accesses with the mps2-an385 qemu emulation; I did not test with real
>> hardware,
>> after all).
>>
>> Given all that, the continued discussion around the subject, and the lack
>> of agreement if unaligned accesses should be tested or not, I don't really
>> see a path forward for this patch. The remaining known problem is arm with
>> thumb instructions. I don't think that is going to be fixed. I suspect that
>> no one but me even tries to run that code (or any arm:nommu images, for
>> that
>> matter). I'd suggest to drop this patch, and I'll stop testing IP checksum
>> generation for mps2-an385:mps2_defconfig.
> 
> I'm trying to run an ARM kernel built with GCC 13.2 and mps2_defconfig
> on the mps2-an385 qemu emulation, and I get the following fatal error.
> 
> $ qemu-system-arm -M mps2-an385 -kernel vmlinux
> qemu: fatal: Lockup: can't escalate 3 to HardFault (current priority -1)
> 
> R00=00000000 R01=00000000 R02=00000000 R03=00000000
> R04=00000000 R05=00000000 R06=00000000 R07=00000000
> R08=00000000 R09=00000000 R10=00000000 R11=00000000
> R12=00000000 R13=ffffffe0 R14=fffffff9 R15=00000000
> XPSR=40000003 -Z-- A handler
> FPSCR: 00000000
> Abandon (core dumped)
> 
> Can you tell how to proceed ?
> 

You can't run it directly. mps2-an385 is one of the platforms where
the qemu maintainers insisted that qemu shall not initialize the CPU.
You have to provide a shim such as
https://github.com/groeck/linux-build-test/blob/master/rootfs/arm/mps2-boot.axf
as bios. You also have to provide the dtb file.

On top of that, you would need a customized version of qemu which
actually reads the command line, the bios file, and the dtb. See
https://github.com/groeck/linux-build-test/tree/master/qemu
branch v8.2.1-local or v8.1.5-local.

It might be possible to find a bootloader which does all that and
prepares the emulation for running Linux, but I don't know if that
exists somewhere.

Guenter


  reply	other threads:[~2024-03-03 15:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-29 22:46 [PATCH v11] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests Charlie Jenkins
2024-03-01  7:17 ` Christophe Leroy
2024-03-01  7:17   ` Christophe Leroy
2024-03-01 17:09   ` Charlie Jenkins
2024-03-01 17:09     ` Charlie Jenkins
2024-03-01 17:24     ` David Laight
2024-03-01 17:24       ` David Laight
2024-03-01 17:30       ` Charlie Jenkins
2024-03-01 17:30         ` Charlie Jenkins
2024-03-01 18:32 ` Guenter Roeck
2024-03-01 18:58   ` Charlie Jenkins
2024-03-11 15:34     ` Christophe Leroy
2024-03-03 10:20   ` Christophe Leroy
2024-03-03 15:26     ` Guenter Roeck [this message]
2024-03-04 11:39       ` Christophe Leroy
2024-03-04 11:39         ` Christophe Leroy
2024-03-04 13:39         ` Arnd Bergmann
2024-03-04 13:39           ` Arnd Bergmann
2024-03-05  9:27           ` David Laight
2024-03-05  9:27             ` David Laight

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=6df98c91-26b1-497a-9202-18bf86c0130d@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=David.Laight@aculab.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=charlie@rivosinc.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=deller@gmx.de \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=palmer@dabbelt.com \
    --cc=palmer@rivosinc.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 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.