From: Ralf Baechle <ralf@linux-mips.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jun Sun <jsun@mvista.com>,
Linux/MIPS Development <linux-mips@linux-mips.org>
Subject: Re: semaphore woes in 2.6, 32bit
Date: Sun, 9 May 2004 14:57:50 +0200 [thread overview]
Message-ID: <20040509125750.GA19225@linux-mips.org> (raw)
In-Reply-To: <Pine.GSO.4.58.0405091108150.26985@waterleaf.sonytel.be>
On Sun, May 09, 2004 at 11:09:29AM +0200, Geert Uytterhoeven wrote:
> > Kernel is yesterday's CVS. gcc is 3.3.1. config is ddb5477. No
> > additional patch. See below.
> >
> > In any case if you look at the uart code you should see there
> > is a problem already. 'state' is allocated through kmalloc() which only
> > gives 4-byte alignement. The only puzzling thing is that why this
> > did not show up before. Maybe kmalloc() was giving 8-byte aligned block?
>
> AFAIK, kmaloc() always[*] returns 8-byte (or higher, for archs that need it)
> aligned blocks.
We got tripped by a change in 2.6.6-rc2. Before that change the kmalloc
slab caches were being created with SLAB_HWCACHE_ALIGN which results in
L1_CACHE_SHIFT alignment for allocations of L1_CACHE_SHIFT for slab caches
that are at least that size. For the sake of S390 this behaviour was
changed; new it defaults to BYTES_PER_WORD alignment which is four bytes.
Fixed by defining ARCH_KMALLOC_MINALIGN as 8.
Ralf
Index: include/asm-mips/cache.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/cache.h,v
retrieving revision 1.16
diff -u -r1.16 cache.h
--- include/asm-mips/cache.h 10 Oct 2003 20:37:35 -0000 1.16
+++ include/asm-mips/cache.h 9 May 2004 12:57:38 -0000
@@ -18,4 +18,6 @@
#define SMP_CACHE_SHIFT L1_CACHE_SHIFT
#define SMP_CACHE_BYTES L1_CACHE_BYTES
+#define ARCH_KMALLOC_MINALIGN 8
+
#endif /* _ASM_CACHE_H */
next prev parent reply other threads:[~2004-05-09 12:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-08 1:10 semaphore woes in 2.6, 32bit Jun Sun
2004-05-08 7:18 ` Ralf Baechle
2004-05-09 5:48 ` Jun Sun
2004-05-09 9:09 ` Geert Uytterhoeven
2004-05-09 12:57 ` Ralf Baechle [this message]
2004-05-09 13:56 ` Atsushi Nemoto
2004-05-09 16:48 ` Ralf Baechle
2004-05-10 13:28 ` Atsushi Nemoto
2004-05-10 14:06 ` Ralf Baechle
2004-05-11 13:53 ` Atsushi Nemoto
2004-05-11 14:05 ` Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040509125750.GA19225@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=geert@linux-m68k.org \
--cc=jsun@mvista.com \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox