Re: [PATCH 36/56] microblaze_v2: dma support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arnd and Geert,

struct scatterlist {
#ifdef CONFIG_DEBUG_SG
       unsigned long     sg_magic; /* 32 bit */
#endif
       unsigned long     page_link; /* 32 bit */
       dma_addr_t        dma_address; /* 32/64 bit */
       unsigned int      length;  /* 32 bit */
       unsigned int      offset; /* 32 bit */
};

#define sg_dma_address(sg)      ((sg)->dma_address)
#define sg_dma_len(sg)          ((sg)->length)

Is it OK now? This will moved to asm-generic too.

M

>> here is proposed struct.
>>
>> struct scatterlist {
>>       dma_addr_t        dma_address;
>>       unsigned long     page_link;
>> #ifdef CONFIG_DEBUG_SG
>>       unsigned long     sg_magic;
>> #endif
>>       unsigned int      length;
>>       unsigned int      offset;
>> };
>>
>> Is it OK now?
> 
> Everyone else has the sg_magic first, which makes sense for debugging.
> Don't worry about it too much, just use the same code as avr32, h8300,
> blackfin, fvr, mk68knommu, mn10300, sh, v850 and xtensa.
> 
> These are all the same, but I just saw that they also have
> 
> #define sg_dma_address(sg)      ((sg)->dma_address)
> #define sg_dma_len(sg)          ((sg)->length)
> 
> which you probably want as well.
> 
> 	Arnd <><
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux