summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/ps3.h
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2021-06-03 19:17:02 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2021-06-10 21:44:58 +1000
commit9733862e50fdba55e7f1554e4286fcc5302ff28e (patch)
treef47f7de30d0a26d9b0513602093203ab0c97e893 /arch/powerpc/include/asm/ps3.h
parent472b440fd26822c645befe459172dafdc2d225de (diff)
downloadlinux-stable-9733862e50fdba55e7f1554e4286fcc5302ff28e.tar.gz
linux-stable-9733862e50fdba55e7f1554e4286fcc5302ff28e.tar.bz2
linux-stable-9733862e50fdba55e7f1554e4286fcc5302ff28e.zip
powerpc/ps3: Add dma_mask to ps3_dma_region
Commit f959dcd6ddfd29235030e8026471ac1b022ad2b0 (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
Diffstat (limited to 'arch/powerpc/include/asm/ps3.h')
-rw-r--r--arch/powerpc/include/asm/ps3.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/ps3.h
index 7df145901def..8a0d8fb35328 100644
--- a/arch/powerpc/include/asm/ps3.h
+++ b/arch/powerpc/include/asm/ps3.h
@@ -71,6 +71,7 @@ struct ps3_dma_region_ops;
* @bus_addr: The 'translated' bus address of the region.
* @len: The length in bytes of the region.
* @offset: The offset from the start of memory of the region.
+ * @dma_mask: Device dma_mask.
* @ioid: The IOID of the device who owns this region
* @chunk_list: Opaque variable used by the ioc page manager.
* @region_ops: struct ps3_dma_region_ops - dma region operations
@@ -85,6 +86,7 @@ struct ps3_dma_region {
enum ps3_dma_region_type region_type;
unsigned long len;
unsigned long offset;
+ u64 dma_mask;
/* driver variables (set by ps3_dma_region_create) */
unsigned long bus_addr;