]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
mutex: Avoid gcc version dependent __builtin_constant_p() usage
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Thu, 17 Oct 2013 10:45:29 +0000 (19:45 +0900)
committerIngo Molnar <mingo@kernel.org>
Fri, 18 Oct 2013 19:58:54 +0000 (21:58 +0200)
commitb0267507dfd0187fb7840a0ec461a510a7f041c5
tree8d17053d2ac87eb4f53120dc8d83cc084819096a
parent04919afb85c8f007b7326c4da5eb61c52e91b9c7
mutex: Avoid gcc version dependent __builtin_constant_p() usage

Commit 040a0a37 ("mutex: Add support for wound/wait style locks")
used "!__builtin_constant_p(p == NULL)" but gcc 3.x cannot
handle such expression correctly, leading to boot failure when
built with CONFIG_DEBUG_MUTEXES=y.

Fix it by explicitly passing a bool which tells whether p != NULL
or not.

[ PeterZ: This is a sad patch, but provided it actually generates
          similar code I suppose its the best we can do bar whole
  sale deprecating gcc-3. ]

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: peterz@infradead.org
Cc: imirkin@alum.mit.edu
Cc: daniel.vetter@ffwll.ch
Cc: robdclark@gmail.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/201310171945.AGB17114.FSQVtHOJFOOFML@I-love.SAKURA.ne.jp
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/mutex.c