Linux PARISC architecture development
 help / color / mirror / Atom feed
* dma_addr_t: which comment is correct?
@ 2007-12-22 12:15 rubisher
  2007-12-23  9:39 ` Grant Grundler
  0 siblings, 1 reply; 8+ messages in thread
From: rubisher @ 2007-12-22 12:15 UTC (permalink / raw)
  To: linux-parisc

Hello *,

Continuing my blind investigation on ccio-dma stuff, I read those 2 different comments:
in include/asm-parisc/scatterlist.h, scartterlist structure is defined like this:
struct scatterlist {
#ifdef CONFIG_DEBUG_SG
         unsigned long sg_magic;
#endif
         unsigned long page_link;
         unsigned int offset;

         unsigned int length;

         /* an IOVA can be 64-bits on some PA-Risc platforms. */
         dma_addr_t iova;        /* I/O Virtual Address */
         __u32      iova_length; /* bytes mapped */
};

in absolute the comment "an IOVA can be 64-bits on some PA-Risc platforms." seems ok.

but otoh, include/asm-parisc/types.h, defined dma_addr_t like this:

/* Dma addresses are 32-bits wide.  */

typedef u32 dma_addr_t;
typedef u64 dma64_addr_t;

#endif /* __ASSEMBLY__ */

OK it's just a comment but imho there is interesting matter in x86:

typedef u64 dma64_addr_t;
#if defined(CONFIG_X86_64) || defined(CONFIG_HIGHMEM64G)
/* DMA addresses come in 32-bit and 64-bit flavours. */
typedef u64 dma_addr_t;
#else
typedef u32 dma_addr_t;
#endif

But I simply have no idea which "#if defined" would be the most relevant for parisc, any idea?

Cheers,
	r.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-12-28 15:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-22 12:15 dma_addr_t: which comment is correct? rubisher
2007-12-23  9:39 ` Grant Grundler
2007-12-23 22:50   ` rubisher
2007-12-24  8:51     ` Grant Grundler
2007-12-26 10:01       ` Thibaut VARENE
2007-12-26 17:31       ` iommu_fill_pdir() and its /* Horrible hack. ... */ reading rubisher
2007-12-28  8:27         ` Grant Grundler
2007-12-28 15:27           ` rubisher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox