Re: [PATCH -mm 1/2] scsi: remove dma_is_consistent usage in 53c700

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: FUJITA Tomonori
Date: Tuesday, June 29, 2010 - 7:39 pm

On Tue, 29 Jun 2010 08:37:35 -0500
James Bottomley <James.Bottomley@HansenPartnership.com> wrote:


(snip)


Ah, I see.

If slab.h doesn't define ARCH_KMALLOC_MINALIGN for architectures that
don't define it, the driver could do something like:

#ifdef ARCH_KMALLOC_MINALIGN
#define DMA_ALIGN(x) ALIGN(x, ARCH_KMALLOC_MINALIGN)
#else
#define DMA_ALIGN(x) ALIGN(x, L1_CACHE_BYTES)
#endif

Seems that it's better to rename ARCH_KMALLOC_MINALIGN to something
like ARCH_DMA_MINALIGN and make ARCH_KMALLOC_MINALIGN the slab
internal thing.



Ok, it's fine by me too. let's simply remove the BUG_ON.

I think that you want to document that dma_get_cache_alignment()
cannot be greater than the L1 cache stride. However, seems that
dma_get_cache_alignment() is greater than L1_CACHE_BYTES on some
architectures (they have some reasons, I assume). So I'll just remove
the BUG_ON.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -mm 2/2] remove dma_is_consistent() API, FUJITA Tomonori, (Sun Jun 27, 3:10 am)
Re: [PATCH -mm 1/2] scsi: remove dma_is_consistent usage i ..., FUJITA Tomonori, (Tue Jun 29, 7:39 pm)