summaryrefslogtreecommitdiff
path: root/scripts/build-all.py
diff options
context:
space:
mode:
authorVikram Mulukutla <markivx@codeaurora.org>2016-05-24 15:37:13 -0700
committerVikram Mulukutla <markivx@codeaurora.org>2016-07-26 16:34:38 -0700
commitcbe08a7835d71e2737eaf5befcd38c24441b1e26 (patch)
tree107a2dd5d7fbe36ccb944fb033dd5bd128493556 /scripts/build-all.py
parentd1313a37fe6bafccfff7f33d07ebfbdf178c35cf (diff)
sched,preempt: Fix preempt_count manipulations
Vikram reported that his ARM64 compiler managed to 'optimize' away the preempt_count manipulations in code like: preempt_enable_no_resched(); put_user(); preempt_disable(); Irrespective of that fact that that is horrible code that should be fixed for many reasons, it does highlight a deficiency in the generic preempt_count manipulators. As it is never right to combine/elide preempt_count manipulations like this. Therefore sprinkle some volatile in the two generic accessors to ensure the compiler is aware of the fact that the preempt_count is observed outside of the regular program-order view and thus cannot be optimized away like this. x86; the only arch not using the generic code is not affected as we do all this in asm in order to use the segment base per-cpu stuff. Change-Id: I781dc34fdf52823fd34f4bb93872f85847076c66 Cc: stable@vger.kernel.org Cc: Thomas Gleixner <tglx@linutronix.de> Fixes: a787870924db ("sched, arch: Create asm/preempt.h") Reported-by: Vikram Mulukutla <markivx@codeaurora.org> Tested-by: Vikram Mulukutla <markivx@codeaurora.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Git-commit: 2e636d5e66c35dfcbaf617aa8fa963f6847478fe Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Link: https://lkml.org/lkml/2016/5/16/190 [vmulukut@codeaurora.org: merge conflict fixups] Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Diffstat (limited to 'scripts/build-all.py')
0 files changed, 0 insertions, 0 deletions