1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-11 17:10:13 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Linus Torvalds
b927546677 dma-mapping fix for Linux 6.19
- important patch for recent rework of DMA API infrastructure, which
 fixes boot failure of parisc systems (Leon Romanovsky)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSrngzkoBtlA8uaaJ+Jp1EFxbsSRAUCaUlolgAKCRCJp1EFxbsS
 ROQHAPwLr3iylfnk3hanH0Cjh0Mo/dvCI0crvvY2WUyL/bvlggEAwcP8J3s9g0p2
 FFg5cdyNabLGfigoLLYUrSUrbIor5AI=
 =zWEZ
 -----END PGP SIGNATURE-----

Merge tag 'dma-mapping-6.19-2025-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux

Pull dma-mapping fix from Marek Szyprowski:

 - fix boot failure of parisc systems after recent rework of the DMA API
   infrastructure (Leon Romanovsky)

* tag 'dma-mapping-6.19-2025-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux:
  parisc: Set valid bit in high byte of 64‑bit physical address
2025-12-22 09:37:59 -08:00
Leon Romanovsky
7f2e8e1d22 parisc: Set valid bit in high byte of 64‑bit physical address
On 32‑bit systems, phys_addr_t is defined as u32. However, parisc
expects physical addresses to be 64‑bit values so it can store a
validity bit in the upper byte.

Resolve this mismatch by casting the physical address to unsigned
long, ensuring it is treated as a 64‑bit value where required. This
fixes the failure to start block device drivers on the C3700
platform, as reported by Guenter.

QEMU command line to reproduce the issue (with Debian SID as rootfs):
  qemu-system-hppa -machine C3700 \
	-kernel arch/parisc/boot/bzImage \
	-append "console=ttyS0 \
	root=/dev/sda rw rootwait panic=-1" \
	-nographic \
	-device lsi53c895a \
	-drive file=rootfs-hppa.img,if=none,format=raw,id=hd0 \
	-device scsi-hd,drive=hd0

Fixes: 96ddf2ef58ec ("parisc: Convert DMA map_page to map_phys interface")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Closes: https://lore.kernel.org/all/b184f1bf-96dc-4546-8512-9cba5ecb58f7@roeck-us.net/
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
[mszyprow: dropped the lpa() macro removal]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20251218-fix-parisc-conversion-v1-1-4a04d26b0168@nvidia.com
2025-12-19 13:56:17 +01:00

View File

@ -578,8 +578,8 @@ sba_io_pdir_entry(__le64 *pdir_ptr, space_t sid, phys_addr_t pba,
pba &= IOVP_MASK;
pba |= (ci >> PAGE_SHIFT) & 0xff; /* move CI (8 bits) into lowest byte */
pba |= SBA_PDIR_VALID_BIT; /* set "valid" bit */
*pdir_ptr = cpu_to_le64(pba); /* swap and store into I/O Pdir */
/* set "valid" bit, swap and store into I/O Pdir */
*pdir_ptr = cpu_to_le64((unsigned long)pba | SBA_PDIR_VALID_BIT);
/*
* If the PDC_MODEL capabilities has Non-coherent IO-PDIR bit set