]> git.baikalelectronics.ru Git - kernel.git/commit
locking/atomic, sched: Unexport fetch_or()
authorFrederic Weisbecker <fweisbec@gmail.com>
Thu, 24 Mar 2016 14:38:01 +0000 (15:38 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 29 Mar 2016 09:52:11 +0000 (11:52 +0200)
commit805d549ddc7831cf1a08a0608d14de0721dbb91a
tree5cbd7b8d522cd07c0afc0f57b34d77fa7e12516a
parent7bc60c67f76f96a84b78abaf694f98969ad79dc6
locking/atomic, sched: Unexport fetch_or()

This patch functionally reverts:

  6454be575f73 ("atomic: Export fetch_or()")

During the merge Linus observed that the generic version of fetch_or()
was messy:

  " This makes the ugly "fetch_or()" macro that the scheduler used
    internally a new generic helper, and does a bad job at it. "

  c874203d3226 Merge branch 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Now that we have introduced atomic_fetch_or(), fetch_or() is only used
by the scheduler in order to deal with thread_info flags which type
can vary across architectures.

Lets confine fetch_or() back to the scheduler so that we encourage
future users to use the more robust and well typed atomic_t version
instead.

While at it, fetch_or() gets robustified, pasting improvements from a
previous patch by Ingo Molnar that avoids needless expression
re-evaluations in the loop.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1458830281-4255-4-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/atomic.h
kernel/sched/core.c