]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: preempt: Provide our own implementation of asm/preempt.h
authorWill Deacon <will.deacon@arm.com>
Thu, 20 Sep 2018 09:26:40 +0000 (10:26 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 7 Dec 2018 12:35:53 +0000 (12:35 +0000)
commit6752d2e5d09d3381c1ab8bf00d2474176d7b6248
tree154bdebdb94f8ec79c1b19a8273ca9e0809036f5
parentaa17dd3394935d66bfe936c30c3e2e8f6d9c7e5a
arm64: preempt: Provide our own implementation of asm/preempt.h

The asm-generic/preempt.h implementation doesn't make use of the
PREEMPT_NEED_RESCHED flag, since this can interact badly with load/store
architectures which rely on the preempt_count word being unchanged across
an interrupt.

However, since we're a 64-bit architecture and the preempt count is
only 32 bits wide, we can simply pack it next to the resched flag and
load the whole thing in one go, so that a dec-and-test operation doesn't
need to load twice.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/Kbuild
arch/arm64/include/asm/preempt.h [new file with mode: 0644]
arch/arm64/include/asm/thread_info.h