]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/ps3: Add dma_mask to ps3_dma_region
authorGeoff Levand <geoff@infradead.org>
Thu, 3 Jun 2021 19:17:02 +0000 (19:17 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 10 Jun 2021 11:44:58 +0000 (21:44 +1000)
commitd4b58081ba0019e7cee3fbc9959a9ae0889a87db
treef47f7de30d0a26d9b0513602093203ab0c97e893
parent745881b959114869e5cfb0584a6a31ba12b1a3e2
powerpc/ps3: Add dma_mask to ps3_dma_region

Commit 5f2fc58d092835b65c9fec63550430f0783209be (dma-direct: Fix
potential NULL pointer dereference) added a null check on the
dma_mask pointer of the kernel's device structure.

Add a dma_mask variable to the ps3_dma_region structure and set
the device structure's dma_mask pointer to point to this new variable.

Fixes runtime errors like these:
# WARNING: Fixes tag on line 10 doesn't match correct format
# WARNING: Fixes tag on line 10 doesn't match correct format

  ps3_system_bus_match:349: dev=8.0(sb_01), drv=8.0(ps3flash): match
  WARNING: CPU: 0 PID: 1 at kernel/dma/mapping.c:151 .dma_map_page_attrs+0x34/0x1e0
  ps3flash sb_01: ps3stor_setup:193: map DMA region failed

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/562d0c9ea0100a30c3b186bcc7adb34b0bbd2cd7.1622746428.git.geoff@infradead.org
arch/powerpc/include/asm/ps3.h
arch/powerpc/platforms/ps3/mm.c