]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
rwlocks: Fix section mismatch
authorJohn Kacur <jkacur@redhat.com>
Mon, 19 Sep 2011 09:09:27 +0000 (11:09 +0200)
committerMichal Sojka <sojka@merica.cz>
Sun, 13 Sep 2015 07:47:24 +0000 (09:47 +0200)
commit3c16b862ac025a822fb4de99680ebc6c365e43d5
treefe5902d6ada471e76e9b6c0b49ff623ba1de0d86
parent371b584f1eafd0dcddc49fa49e4c13dfe06fb10e
rwlocks: Fix section mismatch

This fixes the following build error for the preempt-rt kernel.

make kernel/fork.o
  CC      kernel/fork.o
kernel/fork.c:90: error: section of tasklist_lock conflicts with previous declaration
make[2]: *** [kernel/fork.o] Error 1
make[1]: *** [kernel/fork.o] Error 2

The rt kernel cache aligns the RWLOCK in DEFINE_RWLOCK by default.
The non-rt kernels explicitly cache align only the tasklist_lock in
kernel/fork.c
That can create a build conflict. This fixes the build problem by making the
non-rt kernels cache align RWLOCKs by default. The side effect is that
the other RWLOCKs are also cache aligned for non-rt.

This is a short term solution for rt only.
The longer term solution would be to push the cache aligned DEFINE_RWLOCK
to mainline. If there are objections, then we could create a
DEFINE_RWLOCK_CACHE_ALIGNED or something of that nature.

Comments? Objections?

Signed-off-by: John Kacur <jkacur@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/alpine.LFD.2.00.1109191104010.23118@localhost6.localdomain6
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/rwlock_types.h
kernel/fork.c