]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: Move instruction encoder/decoder under lib/
authorJulien Thierry <jthierry@redhat.com>
Wed, 3 Mar 2021 17:05:32 +0000 (18:05 +0100)
committerWill Deacon <will@kernel.org>
Thu, 27 May 2021 16:38:30 +0000 (17:38 +0100)
Aarch64 instruction set encoding and decoding logic can prove useful
for some features/tools both part of the kernel and outside the kernel.

Isolate the function dealing only with encoding/decoding instructions,
with minimal dependency on kernel utilities in order to be able to reuse
that code.

Code was only moved, no code should have been added, removed nor
modifier.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
Link: https://lore.kernel.org/r/20210303170536.1838032-5-jthierry@redhat.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/Makefile
arch/arm64/lib/Makefile
arch/arm64/lib/insn.c [moved from arch/arm64/kernel/insn.c with 100% similarity]

index 3693156acc75f29e166607081f89407bb5572c50..03e8311ce5762642a573a5f5b064c3586c9fe06c 100644 (file)
@@ -18,7 +18,7 @@ CFLAGS_syscall.o      += -fno-stack-protector
 obj-y                  := debug-monitors.o entry.o irq.o fpsimd.o              \
                           entry-common.o entry-fpsimd.o process.o ptrace.o     \
                           setup.o signal.o sys.o stacktrace.o time.o traps.o   \
-                          io.o vdso.o hyp-stub.o psci.o cpu_ops.o insn.o       \
+                          io.o vdso.o hyp-stub.o psci.o cpu_ops.o              \
                           return_address.o cpuinfo.o cpu_errata.o              \
                           cpufeature.o alternative.o cacheinfo.o               \
                           smp.o smp_spin_table.o topology.o smccc-call.o       \
index d31e1169d9b8e94a98f8034fc3bd32720f90898f..9cd83908717da22ed8e57a3c1d39f704f80f890d 100644 (file)
@@ -1,9 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0
 lib-y          := clear_user.o delay.o copy_from_user.o                \
                   copy_to_user.o copy_in_user.o copy_page.o            \
-                  clear_page.o csum.o memchr.o memcpy.o memmove.o      \
-                  memset.o memcmp.o strcmp.o strncmp.o strlen.o        \
-                  strnlen.o strchr.o strrchr.o tishift.o
+                  clear_page.o csum.o insn.o memchr.o memcpy.o         \
+                  memmove.o memset.o memcmp.o strcmp.o strncmp.o       \
+                  strlen.o strnlen.o strchr.o strrchr.o tishift.o
 
 ifeq ($(CONFIG_KERNEL_MODE_NEON), y)
 obj-$(CONFIG_XOR_BLOCKS)       += xor-neon.o