]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: simplify contextidr_thread_switch
authorMark Rutland <mark.rutland@arm.com>
Thu, 8 Sep 2016 12:55:39 +0000 (13:55 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 9 Sep 2016 10:43:50 +0000 (11:43 +0100)
commit0a29d89eeaf8cb78e7b318074892e3c897b13465
treea9a5c116c242eab0415e82b1a969ad0642f74364
parent215c5a9b095f94c32b54d6f61e2c049554cab02b
arm64: simplify contextidr_thread_switch

When CONFIG_PID_IN_CONTEXTIDR is not selected, we use an empty stub
definition of contextidr_thread_switch(). As everything we rely upon
exists regardless of CONFIG_PID_IN_CONTEXTIDR, we don't strictly require
an empty stub.

By using IS_ENABLED() rather than ifdeffery, we avoid duplication, and
get compiler coverage on all the code even when CONFIG_PID_IN_CONTEXTIDR
is not selected and the code is optimised away.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/mmu_context.h