linux-mips
[Top] [All Lists]

kmalloc alignment

To: linux-mips@linux-mips.org
Subject: kmalloc alignment
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Tue, 19 Oct 2004 23:51:29 +0900 (JST)
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
In include/asm-mips/cache.h:

#define ARCH_KMALLOC_MINALIGN   8

Is this line really needed?

If it was not defined (and ARCH_KMALLOC_FLAGS was also not defined),
default alignment (cache_line_size()) will be used for kmalloc.  It is
enough, isn't it?

Also, with current 8 byte alignment, many PCI drivers which are using
kmalloc and dma_map_single are broken on non-coherent system.  I was
told that those drivers should use dma_get_cache_alignment() API, but
currently nobody do it anyway.  Removing ARCH_KMALLOC_MINALIGN will
help those (broken?) drivers.

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>