linux/arch/arm64
Mark Rutland 6ddae41868 arm64: jump labels: NOP out NOP -> NOP replacement
In the arm64 arch_static_branch implementation we place an A64 NOP into
the instruction stream and log relevant details to a jump_entry in a
__jump_table section. Later this may be replaced with an immediate
branch without link to the code for the unlikely case.

At init time, the core calls arch_jump_label_transform_static to
initialise the NOPs. On x86 this involves inserting the optimal NOP for
a given microarchitecture, but on arm64 we only use the architectural
NOP, and hence replace each NOP with the exact same NOP. This is
somewhat pointless.

Additionally, at module load time we don't call jump_label_apply_nops to
patch the optimal NOPs in, unlike other architectures, but get away with
this because we only use the architectural NOP anyway. A later notifier
will patch NOPs with branches as required.

Similarly to x86 commit 11570da1c5 (x86/jump-label: Do not bother
updating NOPs if they are correct), we can avoid patching NOPs with
identical NOPs. Given that we only use a single NOP encoding, this means
we can NOP-out the body of arch_jump_label_transform_static entirely. As
the default __weak arch_jump_label_transform_static implementation
performs a patch, we must use an empty function to achieve this.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: Laura Abbott <lauraa@codeaurora.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2014-11-26 17:19:47 +00:00
..
boot arm64: vexpress: Add CLCD support to the ARMv8 model platform 2014-10-22 15:33:16 +01:00
configs arm64: vexpress: Add CLCD support to the ARMv8 model platform 2014-10-22 15:33:16 +01:00
crypto arm64/crypto: use crypto instructions to generate AES key schedule 2014-11-06 17:25:28 +00:00
include arm64: Add FIX_HOLE to permanent fixed addresses 2014-11-26 11:32:17 +00:00
kernel arm64: jump labels: NOP out NOP -> NOP replacement 2014-11-26 17:19:47 +00:00
kvm arm64: kvm: eliminate literal pool entries 2014-11-07 15:04:54 +00:00
lib arm64: lib: Implement optimized string length routines 2014-05-23 15:17:12 +01:00
mm arm64: add support to dump the kernel page tables 2014-11-26 17:19:18 +00:00
net net: bpf: arm64: minor fix of type in jited 2014-10-20 17:47:04 +01:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig arm64: protect alternatives workarounds with Kconfig options 2014-11-25 15:56:42 +00:00
Kconfig.debug arm64: add support to dump the kernel page tables 2014-11-26 17:19:18 +00:00
Makefile Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-10-14 09:22:26 +02:00