Skip to content

Commit 3e00e39

Browse files
mrutland-armwilldeacon
authored andcommitted
arm64: insn: move AARCH64_INSN_SIZE into <asm/insn.h>
For histroical reasons, we define AARCH64_INSN_SIZE in <asm/alternative-macros.h>, but it would make more sense to do so in <asm/insn.h>. Let's move it into <asm/insn.h>, and add the necessary include directives for this. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20210609102301.17332-3-mark.rutland@arm.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 78b92c7 commit 3e00e39

7 files changed

Lines changed: 9 additions & 3 deletions

File tree

arch/arm64/include/asm/alternative-macros.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
#define __ASM_ALTERNATIVE_MACROS_H
44

55
#include <asm/cpucaps.h>
6+
#include <asm/insn.h>
67

78
#define ARM64_CB_PATCH ARM64_NCAPS
89

9-
/* A64 instructions are always 32 bits. */
10-
#define AARCH64_INSN_SIZE 4
11-
1210
#ifndef __ASSEMBLY__
1311

1412
#include <linux/stringify.h>

arch/arm64/include/asm/insn.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
#include <asm/alternative.h>
1414

15+
/* A64 instructions are always 32 bits. */
16+
#define AARCH64_INSN_SIZE 4
17+
1518
#ifndef __ASSEMBLY__
1619
/*
1720
* ARM Architecture Reference Manual for ARMv8 Profile-A, Issue A.a

arch/arm64/include/asm/kvm_asm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define __ARM_KVM_ASM_H__
99

1010
#include <asm/hyp_image.h>
11+
#include <asm/insn.h>
1112
#include <asm/virt.h>
1213

1314
#define ARM_EXIT_WITH_SERROR_BIT 31

arch/arm64/kernel/cpufeature.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
#include <asm/cpufeature.h>
7777
#include <asm/cpu_ops.h>
7878
#include <asm/fpsimd.h>
79+
#include <asm/insn.h>
7980
#include <asm/kvm_host.h>
8081
#include <asm/mmu_context.h>
8182
#include <asm/mte.h>

arch/arm64/kernel/patching.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <asm/cacheflush.h>
1010
#include <asm/fixmap.h>
11+
#include <asm/insn.h>
1112
#include <asm/kprobes.h>
1213
#include <asm/patching.h>
1314
#include <asm/sections.h>

arch/arm64/kernel/traps.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <asm/esr.h>
3737
#include <asm/exception.h>
3838
#include <asm/extable.h>
39+
#include <asm/insn.h>
3940
#include <asm/kprobes.h>
4041
#include <asm/patching.h>
4142
#include <asm/traps.h>

arch/arm64/net/bpf_jit_comp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <asm/byteorder.h>
1717
#include <asm/cacheflush.h>
1818
#include <asm/debug-monitors.h>
19+
#include <asm/insn.h>
1920
#include <asm/set_memory.h>
2021

2122
#include "bpf_jit.h"

0 commit comments

Comments
 (0)