ARM: PXA multiplatform support
Subsystems (24)
Guenter Roeck
maintainerQuoted 35 lines · Guenter Roeck
Quoted 24 lines · Arnd Bergmann
Quoted 11 lines · Arnd Bergmann
Quoted 10 lines · Guenter Roeck
Quoted 8 lines · Arnd Bergmann
On Sun, Apr 24, 2022 at 4:09 AM Guenter Roeck <[email protected]> wrote:
into the defconfig file, otherwise the multiplatform target defaults to an ARMv7 instead of ARMv5 build. For an OMAP15xx as in the SX1, you also need to enableCONFIG_ARCH_MULTI_V4T.This is slightly unfortunate, but I don't see any way to avoid it, and the modified defconfig will still work fine with older kernel trees.
Quoted 5 lines
Quoted 1 line
Yes, that works. I changed it in my configuration.
Ok, great!. I managed to boot the z2 machine with PCMCIA support and it gets around the issue with my patch, correctly detecting the CF card.
Hi Guenter,
I have now sent out a fix that I'm happy with, and applied it to the pxa-multiplatform-5.18 branch of the soc tree as well as the combined arm/multiplatform tree.
Quoted 9 lines
I have not merged this new version into the for-next branch since I would like to see if there are any other regressions first.
Can you run your boot tests on the arm/multiplatform branch and let me know if that fixes everything you found? If that takes a lot of manual steps on your side, I'd just wait for the build bots and merge it after all there are no new compile-time issues.
Quoted 3 lines
I tried the pxa-multiplatform-5.18 branch. Its failures match those in v5.18-rc1.
Uuh, wait, the build wasn't complete. There are still some failures. I'll report later.
Guenter
Quoted 8 lines · Guenter Roeck
Quoted 4 lines · Guenter Roeck
I tried the pxa-multiplatform-5.18 branch. Its failures match those in v5.18-rc1.
Uuh, wait, the build wasn't complete. There are still some failures. I'll report later.
Sorry about the breakage, I got a few more reports about minor build errors and warnings, the newly uploaded branches should address all of the ones I got reports for.
Arnd
Guenter Roeck
maintainerQuoted 7 lines · Arnd Bergmann
Quoted 6 lines · Guenter Roeck
Quoted 4 lines · Guenter Roeck
I tried the pxa-multiplatform-5.18 branch. Its failures match those in v5.18-rc1.
Quoted 7 lines
Quoted 2 lines
Uuh, wait, the build wasn't complete. There are still some failures. I'll report later.
Sorry about the breakage, I got a few more reports about minor build errors and warnings, the newly uploaded branches should address all of the ones I got reports for.
Unless I am missing something the failures are the same as before. See
https://kerneltests.org/builders/qemu-arm-testing/builds/74/steps/qemubuildcommand/logs/stdio
This is with v5.18-rc1-49-ge8ab9a9a2745 which is the tip of soc/pxa-multiplatform-5.18.
Should I check a different branch ?
Thanks,
Guenter
Quoted 16 lines · Guenter Roeck
Quoted 7 lines · Arnd Bergmann
Quoted 6 lines · Guenter Roeck
Quoted 4 lines · Guenter Roeck
I tried the pxa-multiplatform-5.18 branch. Its failures match those in v5.18-rc1.
Quoted 7 lines
Quoted 2 lines
Uuh, wait, the build wasn't complete. There are still some failures. I'll report later.
Sorry about the breakage, I got a few more reports about minor build errors and warnings, the newly uploaded branches should address all of the ones I got reports for.
Quoted 7 lines
Unless I am missing something the failures are the same as before. See
https://kerneltests.org/builders/qemu-arm-testing/builds/74/steps/qemubuildcommand/logs/stdioThis is with v5.18-rc1-49-ge8ab9a9a2745 which is the tip of soc/pxa-multiplatform-5.18.
Should I check a different branch ?
I only addressed the pcmcia probe failure that you reported for the final pxa patch, which
previously caused a NULL pointer reference here:
[ 1.405319] PC is at pcmcia_init_one+0xf8/0x27c [ 1.405476] LR is at devres_add+0x40/0x6c [ 1.405611] pc : [<c04bdea0>] lr : [<c044d808>] psr: a0000113 [ 1.405846] sp : c48a5d00 ip : c15f4220 fp : 60000113 [ 1.406026] r10: 00000000 r9 : c48b000e r8 : c48b0000 [ 1.406195] r7 : feeb0000 r6 : feeb000e r5 : c15ec090 r4 : c15ec020 [ 1.406395] r3 : 00000002 r2 : 00000000 r1 : c15f4200 r0 : feeb000e
This now seems to work:
[ 1.435846] pcmcia_socket pcmcia_socket1: pccard: PCMCIA card inserted into slot 1 [ 1.456350] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0 [ 1.457489] pcmcia 0.0: pcmcia: registering new device pcmcia0.0 (IRQ: 217) [ 1.460275] pata_pcmcia: probe of 0.0 failed with error -12
So it sounds like there are additional bugs that I have to look at. I probably won't
be able to do that in time for the merge window. The logs contain a number of warnings, but I have no idea which ones of those are preexisting issue. I had a look at
[ 0.689982] pxa-dma pxa-dma.0: error -ENXIO: IRQ index 1 not found
and concluded that it must have done this for a long time. In my own qemu instance, I see a crash from iWMMXt, but that works fine on your machine. OTOH, your failed instances all look like they either time out or failed to find a
rootfs. I tried passing an MMC device as root, and that works here.
Arnd
Guenter Roeck
maintainerQuoted 46 lines · Arnd Bergmann
Quoted 16 lines · Guenter Roeck
Quoted 7 lines · Arnd Bergmann
Quoted 6 lines · Guenter Roeck
Quoted 4 lines · Guenter Roeck
I tried the pxa-multiplatform-5.18 branch. Its failures match those in v5.18-rc1.
Quoted 7 lines
Quoted 2 lines
Uuh, wait, the build wasn't complete. There are still some failures. I'll report later.
Sorry about the breakage, I got a few more reports about minor build errors and warnings, the newly uploaded branches should address all of the ones I got reports for.
Quoted 7 lines
Unless I am missing something the failures are the same as before. See
https://kerneltests.org/builders/qemu-arm-testing/builds/74/steps/qemubuildcommand/logs/stdioThis is with v5.18-rc1-49-ge8ab9a9a2745 which is the tip of soc/pxa-multiplatform-5.18.
Should I check a different branch ?
I only addressed the pcmcia probe failure that you reported for the final pxa patch, which
previously caused a NULL pointer reference here:[ 1.405319] PC is at pcmcia_init_one+0xf8/0x27c [ 1.405476] LR is at devres_add+0x40/0x6c [ 1.405611] pc : [<c04bdea0>] lr : [<c044d808>] psr: a0000113 [ 1.405846] sp : c48a5d00 ip : c15f4220 fp : 60000113 [ 1.406026] r10: 00000000 r9 : c48b000e r8 : c48b0000 [ 1.406195] r7 : feeb0000 r6 : feeb000e r5 : c15ec090 r4 : c15ec020 [ 1.406395] r3 : 00000002 r2 : 00000000 r1 : c15f4200 r0 : feeb000eThis now seems to work:
[ 1.435846] pcmcia_socket pcmcia_socket1: pccard: PCMCIA card inserted into slot 1 [ 1.456350] pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0 [ 1.457489] pcmcia 0.0: pcmcia: registering new device pcmcia0.0 (IRQ: 217) [ 1.460275] pata_pcmcia: probe of 0.0 failed with error -12
Quoted 8 lines
So it sounds like there are additional bugs that I have to look at. I probably won't
be able to do that in time for the merge window. The logs contain a number of warnings, but I have no idea which ones of those are preexisting issue. I had a look at[ 0.689982] pxa-dma pxa-dma.0: error -ENXIO: IRQ index 1 not found
Yes, those messages are indeed old.
Quoted 6 lines
and concluded that it must have done this for a long time. In my own qemu instance, I see a crash from iWMMXt, but that works fine on your machine. OTOH, your failed instances all look like they either time out or failed to find a
rootfs. I tried passing an MMC device as root, and that works here.
Booting from mmc works for me as well. Booting from pcmcia worked before, so I assume that there must be some regression.
Guenter
Quoted 10 lines · Guenter Roeck
Quoted 6 lines · Arnd Bergmann
and concluded that it must have done this for a long time. In my own qemu instance, I see a crash from iWMMXt, but that works fine on your machine. OTOH, your failed instances all look like they either time out or failed to find a
rootfs. I tried passing an MMC device as root, and that works here.Booting from mmc works for me as well. Booting from pcmcia worked before, so I assume that there must be some regression.
Ok, got it, and managed to reproduce the hang now. My "ARM: pxa/sa1100: move I/O space to PCI_IOBASE" patch managed to get it to the point of detecting the pcmcia device instead of crashing, so I assumed it was enough when it clearly was not. Before that patch, it still works, afterwards it hangs with "pata_pcmcia: probe of 0.0 failed with error -12" as mentioned above. I'll have another look.
Arnd
Quoted 13 lines · Arnd Bergmann
Quoted 10 lines · Guenter Roeck
Quoted 6 lines · Arnd Bergmann
and concluded that it must have done this for a long time. In my own qemu instance, I see a crash from iWMMXt, but that works fine on your machine. OTOH, your failed instances all look like they either time out or failed to find a
rootfs. I tried passing an MMC device as root, and that works here.Booting from mmc works for me as well. Booting from pcmcia worked before, so I assume that there must be some regression.
Quoted 6 lines
Ok, got it, and managed to reproduce the hang now. My "ARM: pxa/sa1100: move I/O space to
PCI_IOBASE" patch managed to get it to the point of detecting the pcmcia device instead of crashing, so I assumed it was enough when it clearly was not. Before that patch, it still works, afterwards it hangs with "pata_pcmcia: probe of 0.0 failed with error -12" as mentioned above. I'll have another look.
Got it: as the PCMCIA bus on this machine is the only thing with an I/O space, I assigned it port number range 0-0x1000, with an io_offset of 0, but this was apparently unexpected and triggered this sanity check:
static int static_find_io(struct pcmcia_socket *s, unsigned int attr,
unsigned int *base, unsigned int num, unsigned int align, struct resource **parent)
{
if (!s->io_offset)
return -EINVAL;
...
return 0;
}I moved the devices around now, giving zeus/viper I/O space an offset of zero, and moving PCMCIA to offset 0x10000 and 0x11000 for the two slots, which now works because the io_offset is nonzero. I've regenerated the branches again, and confirmed the for-next branch still boots from pcmcia.
Arnd
Guenter Roeck
maintainerQuoted 35 lines · Arnd Bergmann
Quoted 13 lines · Arnd Bergmann
Quoted 10 lines · Guenter Roeck
Quoted 6 lines · Arnd Bergmann
and concluded that it must have done this for a long time. In my own qemu instance, I see a crash from iWMMXt, but that works fine on your machine. OTOH, your failed instances all look like they either time out or failed to find a
rootfs. I tried passing an MMC device as root, and that works here.Booting from mmc works for me as well. Booting from pcmcia worked before, so I assume that there must be some regression.
Quoted 6 lines
Ok, got it, and managed to reproduce the hang now. My "ARM: pxa/sa1100: move I/O space to
PCI_IOBASE" patch managed to get it to the point of detecting the pcmcia device instead of crashing, so I assumed it was enough when it clearly was not. Before that patch, it still works, afterwards it hangs with "pata_pcmcia: probe of 0.0 failed with error -12" as mentioned above. I'll have another look.Got it: as the PCMCIA bus on this machine is the only thing with an I/O space, I assigned it port number range 0-0x1000, with an
io_offsetof 0, but this was apparently unexpected and triggered this sanity check:static int static_find_io(struct
pcmcia_socket*s, unsigned int attr,
unsigned int *base, unsigned int num, unsigned int align, struct resource **parent){ if (!s->io_offset) return -EINVAL; ... return 0; }
Quoted 5 lines
I moved the devices around now, giving zeus/viper I/O space an offset of zero, and moving PCMCIA to offset
0x10000and0x11000for the two slots, which now works because theio_offsetis nonzero. I've regenerated the branches again, and confirmed the for-next branch still boots from pcmcia.
With v5.18-rc1-49-gcb813018b5c1, I still get:
[ 0.797668] RAMDISK: Couldn't find valid RAM disk image starting at 0. [ 0.805262] /dev/root: Can't open blockdev [ 0.805487] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6 [ 0.805674] Please append a correct "root=" boot option; here are the available partitions:
when trying to boot z2 from initrd.
The other problems are gone.
Guenter
Quoted 11 lines · Guenter Roeck
With v5.18-rc1-49-gcb813018b5c1, I still get:
[ 0.797668] RAMDISK: Couldn't find valid RAM disk image starting at 0. [ 0.805262] /dev/root: Can't open blockdev [ 0.805487] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6 [ 0.805674] Please append a correct "root=" boot option; here are the available partitions:when trying to boot z2 from initrd.
The other problems are gone.
Ok, progress!
What is your qemu command line? I see that z2 has no pcmcia device, so I tried booting
from MMC, but this already fails with 5.18-rc1 without any of my patches, giving me
[ 0.697481] Creating 3 MTD partitions on "physmap-flash": [ 0.698161] 0x000000000000-0x000000040000 : "U-Boot Bootloader" [ 0.702815] 0x000000040000-0x000000060000 : "U-Boot Environment" [ 0.706541] 0x000000060000-0x000000800000 : "Flash" [ 0.718066] pxa2xx-mci pxa2xx-mci.0: incomplete constraints, dummy supplies not allowed [ 0.718501] pxa2xx-mci pxa2xx-mci.0: incomplete constraints, dummy
supplies not allowed
Do you have MMC or some other rootfs working without my patch series?
Arnd
Guenter Roeck
maintainerQuoted 20 lines · Arnd Bergmann
Quoted 11 lines · Guenter Roeck
With v5.18-rc1-49-gcb813018b5c1, I still get:
[ 0.797668] RAMDISK: Couldn't find valid RAM disk image starting at 0. [ 0.805262] /dev/root: Can't open blockdev [ 0.805487] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6 [ 0.805674] Please append a correct "root=" boot option; here are the available partitions:when trying to boot z2 from initrd.
The other problems are gone.
Ok, progress!
What is your qemu command line? I see that z2 has no pcmcia device, so I tried booting
from MMC, but this already fails with 5.18-rc1 without any of my patches, giving me
Quoted 9 lines
[ 0.697481] Creating 3 MTD partitions on "physmap-flash": [ 0.698161] 0x000000000000-0x000000040000 : "U-Boot Bootloader" [ 0.702815] 0x000000040000-0x000000060000 : "U-Boot Environment" [ 0.706541] 0x000000060000-0x000000800000 : "Flash" [ 0.718066] pxa2xx-mci pxa2xx-mci.0: incomplete constraints, dummy supplies not allowed [ 0.718501] pxa2xx-mci pxa2xx-mci.0: incomplete constraints, dummysupplies not allowed
To boot from initrd:
qemu-system-arm -M z2 -kernel \
arch/arm/boot/zImage -no-reboot -initrd \
rootfs-armv5.cpio --append \
"panic=-1 slub_debug=FZPUA rdinit=/sbin/init console=ttyS0" -nographic \
-monitor null -serial stdiowhere rootfs-armv5.cpio is from my repository at github.com.
https://github.com/groeck/linux-build-test/blob/master/rootfs/arm/rootfs-armv5.cpio.gz
Quoted 2 lines
Do you have MMC or some other rootfs working without my patch series?
I can boot z2 from mmc and flash, but I have a number of configuration flags enabled on top of pxa_defconfig. That also works with your latest patch series. See
https://kerneltests.org/builders/qemu-arm-testing/builds/75/steps/qemubuildcommand/logs/stdio
# Always enable ...
enable_config "${defconfig}" CONFIG_DEVTMPFS CONFIG_DEVTMPFS_MOUNT CONFIG_BLK_DEV_INITRD
# Options needed to be built into the kernel for device support
# on pxa devices
# MTD, squashfs
enable_config_cond "${defconfig}" CONFIG_MTD_BLOCK CONFIG_MTD_PXA2XX CONFIG_SQUASHFS
# MMC
enable_config_cond "${defconfig}" CONFIG_MMC_BLOCK CONFIG_MMC_PXA
# PCMCIA
enable_config_cond "${defconfig}" CONFIG_ATA CONFIG_BLK_DEV_SD CONFIG_PCCARD
enable_config_cond "${defconfig}" CONFIG_PCMCIA CONFIG_PATA_PCMCIA CONFIG_PCMCIA_PXA2XX
# USB
enable_config_cond "${defconfig}" CONFIG_USB CONFIG_USB_STORAGE CONFIG_USB_OHCI_HCD CONFIG_USB_OHCI_HCD_PXA27XHope this helps,
Guenter
Quoted 11 lines · Guenter Roeck
Quoted 1 line · Arnd Bergmann
To boot from initrd:
qemu-system-arm -M z2 -kernel \ arch/arm/boot/zImage -no-reboot -initrd \ rootfs-armv5.cpio --append \ "panic=-1 slub_debug=FZPUA rdinit=/sbin/init console=ttyS0" -nographic \ -monitor null -serial stdio
Quoted 4 lines
where rootfs-armv5.cpio is from my repository at github.com.
https://github.com/groeck/linux-build-test/blob/master/rootfs/arm/rootfs-armv5.cpio.gz
Ok, that works here with any configuration, I don't see a regression. Could this be a problem with the size increase? The machine only has 32MB of RAM, so it's possible that the multiplatform-enabled kernel with DT support etc pushes it over the edge, especially with an initramfs.
My configuration is clearly a bit different from yours, so I tried giving it a larger initramfs file, which randomly crashes elsewhere for me:
[ 0.648659] pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 38, base_baud = 928571) is a UART1 [ 0.697984] kworker/u2:0 invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0 [ 0.698278] CPU: 0 PID: 7 Comm: kworker/u2:0 Not tainted 5.18.0-rc1-00109-gee927ad51300-dirty #52 [ 0.698382] Hardware name: Zipit Z2 [ 0.698520] Workqueue: events_unbound async_run_entry_fn [ 0.699063] unwind_backtrace from show_stack+0x18/0x1c [ 0.699148] show_stack from dump_header+0x68/0x254 [ 0.699186] dump_header from out_of_memory+0x474/0x4f0 [ 0.699208] out_of_memory from __alloc_pages+0xa0c/0xb84 [ 0.699227] __alloc_pages from shmem_getpage_gfp.constprop.0+0x270/0x9e0 [ 0.699247] shmem_getpage_gfp.constprop.0 from generic_perform_write+0xd8/0x210 [ 0.699268] generic_perform_write from __generic_file_write_iter+0x130/0x198 [ 0.699286] __generic_file_write_iter from generic_file_write_iter+0x64/0xd0 [ 0.699302] generic_file_write_iter from __kernel_write+0x114/0x2b0 [ 0.699321] __kernel_write from kernel_write+0x68/0x194 [ 0.699337] kernel_write from xwrite+0x3c/0x78 [ 0.699363] xwrite from do_copy+0xc0/0x11c [ 0.699381] do_copy from write_buffer+0x2c/0x44 [ 0.699397] write_buffer from flush_buffer+0x3c/0xa0 [ 0.699413] flush_buffer from __gunzip+0x2a4/0x364 [ 0.699434] __gunzip from gunzip+0x2c/0x34 [ 0.699449] gunzip from unpack_to_rootfs+0x19c/0x304 [ 0.699465] unpack_to_rootfs from do_populate_rootfs+0x6c/0x1dc [ 0.699483] do_populate_rootfs from async_run_entry_fn+0x44/0x1a0 [ 0.699502] async_run_entry_fn from process_one_work+0x1e8/0x544 [ 0.699520] process_one_work from worker_thread+0x34/0x578 [ 0.699579] worker_thread from kthread+0xdc/0x114 [ 0.699599] kthread from ret_from_fork+0x14/0x2c [ 0.699651] Exception stack(0xc2821fb0 to 0xc2821ff8) [ 0.699711] 1fa0: 00000000 00000000 00000000 00000000 [ 0.699731] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 0.699744] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 0.699801] Mem-Info: [ 0.699889] active_anon:90 inactive_anon:674 isolated_anon:0 [ 0.699889] active_file:0 inactive_file:0 isolated_file:0 [ 0.699889] unevictable:0 dirty:0 writeback:0 [ 0.699889] slab_reclaimable:0 slab_unreclaimable:1691 [ 0.699889] mapped:0 shmem:771 pagetables:0 bounce:0 [ 0.699889] kernel_misc_reclaimable:0 [ 0.699889] free:207 free_pcp:37 free_cma:0 [ 0.699986] Node 0 active_anon:360kB inactive_anon:2696kB
active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:0kB dirty:0kB writeback:0kB shmem:3084kB writeback_tmp:0kB kernel_stack:192kB pagetables:0kB all_unreclaimable? yes
[ 0.700116] Normal free:828kB boost:1024kB min:1464kB low:1572kB
high:1680kB reserved_highatomic:0KB active_anon:360kB inactive_anon:2696kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:32768kB managed:12232kB mlocked:0kB bounce:0kB free_pcp:148kB local_pcp:148kB free_cma:0kB
[ 0.700177] lowmem_reserve[]: 0 0 [ 0.700247] Normal: 3*4kB (UM) 2*8kB (UM) 2*16kB (M) 0*32kB 0*64kB
0*128kB 1*256kB (M) 1*512kB (M) 0*1024kB = 828kB
Arnd
Guenter Roeck
maintainerQuoted 14 lines · Arnd Bergmann
Quoted 13 lines · Guenter Roeck
Quoted 1 line · Arnd Bergmann
To boot from initrd:
qemu-system-arm -M z2 -kernel \ arch/arm/boot/zImage -no-reboot -initrd \ rootfs-armv5.cpio --append \ "panic=-1 slub_debug=FZPUA rdinit=/sbin/init console=ttyS0" -nographic \ -monitor null -serial stdiowhere rootfs-armv5.cpio is from my repository at github.com.
Quoted 8 lines
Quoted 2 lines
https://github.com/groeck/linux-build-test/blob/master/rootfs/arm/rootfs-armv5.cpio.gz
Ok, that works here with any configuration, I don't see a regression. Could this be a problem with the size increase? The machine only has 32MB of RAM, so it's possible that the multiplatform-enabled kernel with DT support etc pushes it over the edge, especially with an initramfs.
qemu puts initrd in the middle of available memory. With the image size being ~1MB larger than with v5.18-rc, this is too much, and the kernel overwrites part of initrd. This causes it to be corrupted.
It looks like that would have happened eventually, your patch series just made it happen now. The kernel is just getting too large to run on such small systems. I worked around the problem in my version of qemu by loading initrd at the end of the (small) RAM. With that, I no longer see the boot failure.
Guenter
Quoted 4 lines · Guenter Roeck
Quoted 2 lines · Arnd Bergmann
Quoted 1 line · Guenter Roeck
On 5/2/22 12:21, Arnd Bergmann wrote:
Quoted 8 lines
qemu puts initrd in the middle of available memory. With the image size being ~1MB larger than with v5.18-rc, this is too much, and the kernel overwrites part of initrd. This causes it to be corrupted.
It looks like that would have happened eventually, your patch series just made it happen now. The kernel is just getting too large to run on such small systems. I worked around the problem in my version of qemu by loading initrd at the end of the (small) RAM. With that, I no longer see the boot failure.
Ok, thanks for confirming. If it's just the image size that changed, then I think
we can live with it. Having the kernel image grow by 1MB seems excessive though, I'd like to understand better where that increase comes from.
Starting out from pxa_defconfig, I see a 40KB increase from the final patch that moves to multiplatform support, which I think is fine.
If you have a z2 specific config, that would probably not enable CONFIG_OF, which is always turned on for multiplatform, but again that only adds around 250KB in my builds (using gcc-11). This is more than I'd like it to be, but still much less than 1MB.
Arnd
Guenter Roeck
maintainerQuoted 19 lines · Arnd Bergmann
Quoted 4 lines · Guenter Roeck
Quoted 2 lines · Arnd Bergmann
Quoted 1 line · Guenter Roeck
On 5/2/22 12:21, Arnd Bergmann wrote:
Quoted 8 lines
qemu puts initrd in the middle of available memory. With the image size being ~1MB larger than with v5.18-rc, this is too much, and the kernel overwrites part of initrd. This causes it to be corrupted.
It looks like that would have happened eventually, your patch series just made it happen now. The kernel is just getting too large to run on such small systems. I worked around the problem in my version of qemu by loading initrd at the end of the (small) RAM. With that, I no longer see the boot failure.
Ok, thanks for confirming. If it's just the image size that changed, then I think
we can live with it. Having the kernel image grow by 1MB seems excessive though, I'd like to understand better where that increase comes from.
Quoted 8 lines
Starting out from
pxa_defconfig, I see a 40KB increase from the final patch that moves to multiplatform support, which I think is fine.If you have a z2 specific config, that would probably not enable
CONFIG_OF, which is always turned on for multiplatform, but again that only adds around 250KB in my builds (using gcc-11). This is more than I'd like it to be, but still much less than 1MB.
Maybe it is a bit less; I only compared the size of "Image". Either case, it is enough to cause the problem. I am not sure if it is worth the time trying to track this down further.
Guenter
Quoted 11 lines · Guenter Roeck
Quoted 5 lines · Arnd Bergmann
If you have a z2 specific config, that would probably not enable
CONFIG_OF, which is always turned on for multiplatform, but again that only adds around 250KB in my builds (using gcc-11). This is more than I'd like it to be, but still much less than 1MB.Maybe it is a bit less; I only compared the size of "Image". Either case, it is enough to cause the problem. I am not sure if it is worth the time trying to track this down further.
Sure, I'm not worried about the boot regression any more, as that is definitely explained by the size growth. The only question is whether the patches make the kernel grow more than it should. The 40+250KB I measured seem within my expectations, so unless you have specific data showing much more, I think we're good.
Thanks for all the help!
Arnd