Skip to contentSkip to conversation

Alchemy DMA and GFP_DMA

PATCH Ralf Baechle 2 participants 3 messages Aug 16, 2007 – Aug 26, 2007 MIPS

lore
Share & tools
lore
#0 lore raw

arch/mips/au1000/common/dbdma.c uses GFP_DMA in two places and I think both instances are uncessary. Could some alchmist confirm that both are unnecessary?

Thanks,

Ralf

arch/mips/au1000/common/dbdma.c +2 -2
index 626de44..708b83b 100644
@@ -397,7 +397,7 @@ au1xxx_dbdma_ring_alloc(u32 chanid, int entries)
 	 * slabs of memory.
 	 */
 	desc_base = (u32)kmalloc(entries * sizeof(au1x_ddma_desc_t),
-			GFP_KERNEL|GFP_DMA);
+			GFP_KERNEL);
 	if (desc_base == 0)
 		return 0;
 
@@ -408,7 +408,7 @@ au1xxx_dbdma_ring_alloc(u32 chanid, int entries)
 		kfree((const void *)desc_base);
 		i = entries * sizeof(au1x_ddma_desc_t);
 		i += (sizeof(au1x_ddma_desc_t) - 1);
-		if ((desc_base = (u32)kmalloc(i, GFP_KERNEL|GFP_DMA)) == 0)
+		if ((desc_base = (u32)kmalloc(i, GFP_KERNEL)) == 0)
 			return 0;
 
 		desc_base = ALIGN_ADDR(desc_base, sizeof(au1x_ddma_desc_t));
#1 lore raw

Hello.

Quoted 24 lines · Ralf Baechle

arch/mips/au1000/common/dbdma.c uses GFP_DMA in two places and I think both instances are uncessary. Could some alchmist confirm that both are unnecessary?

Thanks,

Ralf

arch/mips/au1000/common/dbdma.c +1 -1
index 626de44..708b83b 100644
@@ -397,7 +397,7 @@ au1xxx_dbdma_ring_alloc(u32 chanid, int entries)
 	 * slabs of memory.
 	 */
 	desc_base = (u32)kmalloc(entries * sizeof(au1x_ddma_desc_t),
-			GFP_KERNEL|GFP_DMA);
+			GFP_KERNEL);
 	if (desc_base == 0)
 		return 0;
 

arch/mips/au1000/common/dbdma.c au1xxx_dbdma_ring_alloc(u32 chanid, int entries) · line 414

Quoted 8 lines
arch/mips/au1000/common/dbdma.c +1 -1
@@ -408,7 +408,7 @@ au1xxx_dbdma_ring_alloc(u32 chanid, int entries)
 		kfree((const void *)desc_base);
 		i = entries * sizeof(au1x_ddma_desc_t);
 		i += (sizeof(au1x_ddma_desc_t) - 1);
-		if ((desc_base = (u32)kmalloc(i, GFP_KERNEL|GFP_DMA)) == 0)
+		if ((desc_base = (u32)kmalloc(i, GFP_KERNEL)) == 0)
 			return 0;
 
 		desc_base = ALIGN_ADDR(desc_base, sizeof(au1x_ddma_desc_t));

Those are probably still necessary because the DBDMA descriptors itselves
(not the data they address) must have 32-bit addresses.

WBR, Sergei

#2 lore raw
Quoted 2 lines · Sergei Shtylyov

Those are probably still necessary because the DBDMA descriptors itselves (not the data they address) must have 32-bit addresses.

A normla GFP_KERNEL allocation will give you that.

Ralf