linux-next: boot failure after merge of the dma-mapping tree
Subsystems (2)
Hi all,
After merging the dma-mapping tree, today's linux-next qemu boot test (powerpc pseries_le_defconfig) failed like this:
[ 0.219439][ T1] ibmvscsi 71000003: SRP_VERSION: 16.a [ 0.219472][ T1] ibmvscsi 71000003: Error -4 opening adapter [ 0.219507][ T1] ibmvscsi 71000003: couldn't initialize crq. rc=-1 [ 0.221963][ T1] ibmvscsi 71000003: probe with driver ibmvscsi failed with error -1
The normal output is:
[ 0.221208][ T1] ibmvscsi 71000003: SRP_VERSION: 16.a [ 0.221272][ T1] ibmvscsi 71000003: Maximum ID: 64 Maximum LUN: 32 Maximum Channel: 3 [ 0.221310][ T1] scsi host0: IBM POWER Virtual SCSI Adapter 1.5.9 [ 0.221653][ C0] ibmvscsi 71000003: partner initialization complete [ 0.221696][ C0] ibmvscsi 71000003: host srp version: 16.a, host partition qemu (0), OS 2, max io 2097152 [ 0.221752][ C0] ibmvscsi 71000003: sent SRP login [ 0.221778][ C0] ibmvscsi 71000003: SRP_LOGIN succeeded [ 0.223269][ T1] scsi 0:0:2:0: CD-ROM QEMU QEMU CD-ROM 2.5+ PQ: 0 ANSI: 5 [ 0.239389][ T28] Freeing initrd memory: 1844K [ 0.302192][ C0] sr 0:0:2:0: Power-on or device reset occurred [ 0.302411][ T1] sr 0:0:2:0: [sr0] scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray [ 0.302450][ T1] cdrom: Uniform CD-ROM driver Revision: 3.20 [ 0.302800][ T1] sr 0:0:2:0: Attached scsi generic sg0 type 5
Bisectd to commit
ec7352735abf ("dma-mapping: export new dma_*map_phys() interface")
And reverting that commit, and the following one, in today's linux-next release, fixes the problem.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 26 lines · Stephen Rothwell
Hi all,
After merging the dma-mapping tree, today's linux-next qemu boot test (powerpc
pseries_le_defconfig) failed like this:[ 0.219439][ T1] ibmvscsi 71000003: SRP_VERSION: 16.a [ 0.219472][ T1] ibmvscsi 71000003: Error -4 opening adapter [ 0.219507][ T1] ibmvscsi 71000003: couldn't initialize crq. rc=-1 [ 0.221963][ T1] ibmvscsi 71000003: probe with driver ibmvscsi failed with error -1The normal output is:
[ 0.221208][ T1] ibmvscsi 71000003: SRP_VERSION: 16.a [ 0.221272][ T1] ibmvscsi 71000003: Maximum ID: 64 Maximum LUN: 32 Maximum Channel: 3 [ 0.221310][ T1] scsi host0: IBM POWER Virtual SCSI Adapter 1.5.9 [ 0.221653][ C0] ibmvscsi 71000003: partner initialization complete [ 0.221696][ C0] ibmvscsi 71000003: host srp version: 16.a, host partition qemu (0), OS 2, max io 2097152 [ 0.221752][ C0] ibmvscsi 71000003: sent SRP login [ 0.221778][ C0] ibmvscsi 71000003: SRP_LOGIN succeeded [ 0.223269][ T1] scsi 0:0:2:0: CD-ROM QEMU QEMU CD-ROM 2.5+ PQ: 0 ANSI: 5 [ 0.239389][ T28] Freeing initrd memory: 1844K [ 0.302192][ C0] sr 0:0:2:0: Power-on or device reset occurred [ 0.302411][ T1] sr 0:0:2:0: [sr0] scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray [ 0.302450][ T1] cdrom: Uniform CD-ROM driver Revision: 3.20 [ 0.302800][ T1] sr 0:0:2:0: Attached scsi generic sg0 type 5
Quoted 6 lines
Bisectd to commit
ec7352735abf("dma-mapping: export new dma_*map_phys() interface")And reverting that commit, and the following one, in today's linux-next release, fixes the problem.
Stephen,
Can you please provide the kernel command line to determine which DMA path is taken?
Thanks
Quoted 4 lines
Signature · 3 lines
-- Cheers, Stephen Rothwell
Quoted 26 lines · Stephen Rothwell
Hi all,
After merging the dma-mapping tree, today's linux-next qemu boot test (powerpc
pseries_le_defconfig) failed like this:[ 0.219439][ T1] ibmvscsi 71000003: SRP_VERSION: 16.a [ 0.219472][ T1] ibmvscsi 71000003: Error -4 opening adapter [ 0.219507][ T1] ibmvscsi 71000003: couldn't initialize crq. rc=-1 [ 0.221963][ T1] ibmvscsi 71000003: probe with driver ibmvscsi failed with error -1The normal output is:
[ 0.221208][ T1] ibmvscsi 71000003: SRP_VERSION: 16.a [ 0.221272][ T1] ibmvscsi 71000003: Maximum ID: 64 Maximum LUN: 32 Maximum Channel: 3 [ 0.221310][ T1] scsi host0: IBM POWER Virtual SCSI Adapter 1.5.9 [ 0.221653][ C0] ibmvscsi 71000003: partner initialization complete [ 0.221696][ C0] ibmvscsi 71000003: host srp version: 16.a, host partition qemu (0), OS 2, max io 2097152 [ 0.221752][ C0] ibmvscsi 71000003: sent SRP login [ 0.221778][ C0] ibmvscsi 71000003: SRP_LOGIN succeeded [ 0.223269][ T1] scsi 0:0:2:0: CD-ROM QEMU QEMU CD-ROM 2.5+ PQ: 0 ANSI: 5 [ 0.239389][ T28] Freeing initrd memory: 1844K [ 0.302192][ C0] sr 0:0:2:0: Power-on or device reset occurred [ 0.302411][ T1] sr 0:0:2:0: [sr0] scsi3-mmc drive: 16x/50x cd/rw xa/form2 cdda tray [ 0.302450][ T1] cdrom: Uniform CD-ROM driver Revision: 3.20 [ 0.302800][ T1] sr 0:0:2:0: Attached scsi generic sg0 type 5
Quoted 6 lines
Bisectd to commit
ec7352735abf("dma-mapping: export new dma_*map_phys() interface")And reverting that commit, and the following one, in today's linux-next release, fixes the problem.
I assume that this will fix the issue:
kernel/dma/mapping.c +1 -1
@@ -157,7 +157,7 @@ dma_addr_t dma_map_phys(struct device *dev, phys_addr_t phys, size_t size, {const struct dma_map_ops *ops =get_dma_ops (dev);struct page *page =phys_to_page (phys); -size_t offset =offset_in_page (page); +size_t offset =offset_in_page (phys);bool is_pfn_valid = true;dma_addr_t addr;
Quoted 4 lines
Signature · 3 lines
-- Cheers, Stephen Rothwell
Hi Leon,
Quoted 3 lines · On Wed, 9 Jul 2025 20:41:08 +0300 Leon Romanovsky <[email protected]> wrote:
Can you please provide the kernel command line to determine which DMA path is taken?
Sorry I did not respond earlier (your email arrived at 3:41am my time :-)) but you seem to have figured it out, thanks. I will let you know this evening if it has not worked.
For reference the qemu command line was
qemu-system-ppc64 -M pseries,cap-hpt-max-page-size=4k,accel=kvm -m 2G -vga none -nographic -enable-kvm -kernel $vmlinux -initrd $initrd
The kernel was a powercp pseries_le_defconfig build (but setting CONFIG_PPC_4K_PAGES=y instead of CONFIG_PPC_64K_PAGES=y).
Signature · 2 lines
Cheers, Stephen Rothwell
Stephen Rothwell
Tested-byHi Leon,
Quoted 8 lines · On Wed, 9 Jul 2025 21:16:31 +0300 Leon Romanovsky <[email protected]> wrote:
I assume that this will fix the issue:
kernel/dma/mapping.c +0
-0
kernel/dma/mapping.c dma_addr_t dma_map_phys(struct device *dev, phys_addr_t phys, size_t size, · line 162
Quoted 7 lines
kernel/dma/mapping.c +1
-1@@ -157,7 +157,7 @@ dma_addr_t dma_map_phys(struct device *dev, phys_addr_t phys, size_t size, {const struct dma_map_ops *ops =get_dma_ops (dev);struct page *page =phys_to_page (phys); -size_t offset =offset_in_page (page); +size_t offset =offset_in_page (phys);bool is_pfn_valid = true;dma_addr_t addr;
I found time to test the above on top of yesterday's linux-next and it fixes the problem for me. Thanks again.
Signature · 2 lines
Cheers, Stephen Rothwell