Skip to content

Commit 8bf1a52

Browse files
committed
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 updates from Catalin Marinas: - Support for arm64 SME 2 and 2.1. SME2 introduces a new 512-bit architectural register (ZT0, for the look-up table feature) that Linux needs to save/restore - Include TPIDR2 in the signal context and add the corresponding kselftests - Perf updates: Arm SPEv1.2 support, HiSilicon uncore PMU updates, ACPI support to the Marvell DDR and TAD PMU drivers, reset DTM_PMU_CONFIG (ARM CMN) at probe time - Support for DYNAMIC_FTRACE_WITH_CALL_OPS on arm64 - Permit EFI boot with MMU and caches on. Instead of cleaning the entire loaded kernel image to the PoC and disabling the MMU and caches before branching to the kernel bare metal entry point, leave the MMU and caches enabled and rely on EFI's cacheable 1:1 mapping of all of system RAM to populate the initial page tables - Expose the AArch32 (compat) ELF_HWCAP features to user in an arm64 kernel (the arm32 kernel only defines the values) - Harden the arm64 shadow call stack pointer handling: stash the shadow stack pointer in the task struct on interrupt, load it directly from this structure - Signal handling cleanups to remove redundant validation of size information and avoid reading the same data from userspace twice - Refactor the hwcap macros to make use of the automatically generated ID registers. It should make new hwcaps writing less error prone - Further arm64 sysreg conversion and some fixes - arm64 kselftest fixes and improvements - Pointer authentication cleanups: don't sign leaf functions, unify asm-arch manipulation - Pseudo-NMI code generation optimisations - Minor fixes for SME and TPIDR2 handling - Miscellaneous updates: ARCH_FORCE_MAX_ORDER is now selectable, replace strtobool() to kstrtobool() in the cpufeature.c code, apply dynamic shadow call stack in two passes, intercept pfn changes in set_pte_at() without the required break-before-make sequence, attempt to dump all instructions on unhandled kernel faults * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (130 commits) arm64: fix .idmap.text assertion for large kernels kselftest/arm64: Don't require FA64 for streaming SVE+ZA tests kselftest/arm64: Copy whole EXTRA context arm64: kprobes: Drop ID map text from kprobes blacklist perf: arm_spe: Print the version of SPE detected perf: arm_spe: Add support for SPEv1.2 inverted event filtering perf: Add perf_event_attr::config3 arm64/sme: Fix __finalise_el2 SMEver check drivers/perf: fsl_imx8_ddr_perf: Remove set-but-not-used variable arm64/signal: Only read new data when parsing the ZT context arm64/signal: Only read new data when parsing the ZA context arm64/signal: Only read new data when parsing the SVE context arm64/signal: Avoid rereading context frame sizes arm64/signal: Make interface for restore_fpsimd_context() consistent arm64/signal: Remove redundant size validation from parse_user_sigframe() arm64/signal: Don't redundantly verify FPSIMD magic arm64/cpufeature: Use helper macros to specify hwcaps arm64/cpufeature: Always use symbolic name for feature value in hwcaps arm64/sysreg: Initial unsigned annotations for ID registers arm64/sysreg: Initial annotation of signed ID registers ...
2 parents b327dfe + d541708 commit 8bf1a52

File tree

121 files changed

+3632
-1051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+3632
-1051
lines changed

Documentation/arm64/booting.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Before jumping into the kernel, the following conditions must be met:
223223
For systems with a GICv3 interrupt controller to be used in v3 mode:
224224
- If EL3 is present:
225225

226-
- ICC_SRE_EL3.Enable (bit 3) must be initialiased to 0b1.
226+
- ICC_SRE_EL3.Enable (bit 3) must be initialised to 0b1.
227227
- ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1.
228228
- ICC_CTLR_EL3.PMHE (bit 6) must be set to the same value across
229229
all CPUs the kernel is executing on, and must stay constant
@@ -369,6 +369,16 @@ Before jumping into the kernel, the following conditions must be met:
369369

370370
- HCR_EL2.ATA (bit 56) must be initialised to 0b1.
371371

372+
For CPUs with the Scalable Matrix Extension version 2 (FEAT_SME2):
373+
374+
- If EL3 is present:
375+
376+
- SMCR_EL3.EZT0 (bit 30) must be initialised to 0b1.
377+
378+
- If the kernel is entered at EL1 and EL2 is present:
379+
380+
- SMCR_EL2.EZT0 (bit 30) must be initialised to 0b1.
381+
372382
The requirements described above for CPU mode, caches, MMUs, architected
373383
timers, coherency and system registers apply to all CPUs. All CPUs must
374384
enter the kernel in the same exception level. Where the values documented

Documentation/arm64/elf_hwcaps.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Some hardware or software features are only available on some CPU
1414
implementations, and/or with certain kernel configurations, but have no
1515
architected discovery mechanism available to userspace code at EL0. The
1616
kernel exposes the presence of these features to userspace through a set
17-
of flags called hwcaps, exposed in the auxilliary vector.
17+
of flags called hwcaps, exposed in the auxiliary vector.
1818

1919
Userspace software can test for features by acquiring the AT_HWCAP or
2020
AT_HWCAP2 entry of the auxiliary vector, and testing whether the relevant
@@ -284,6 +284,24 @@ HWCAP2_RPRFM
284284
HWCAP2_SVE2P1
285285
Functionality implied by ID_AA64ZFR0_EL1.SVEver == 0b0010.
286286

287+
HWCAP2_SME2
288+
Functionality implied by ID_AA64SMFR0_EL1.SMEver == 0b0001.
289+
290+
HWCAP2_SME2P1
291+
Functionality implied by ID_AA64SMFR0_EL1.SMEver == 0b0010.
292+
293+
HWCAP2_SMEI16I32
294+
Functionality implied by ID_AA64SMFR0_EL1.I16I32 == 0b0101
295+
296+
HWCAP2_SMEBI32I32
297+
Functionality implied by ID_AA64SMFR0_EL1.BI32I32 == 0b1
298+
299+
HWCAP2_SMEB16B16
300+
Functionality implied by ID_AA64SMFR0_EL1.B16B16 == 0b1
301+
302+
HWCAP2_SMEF16F16
303+
Functionality implied by ID_AA64SMFR0_EL1.F16F16 == 0b1
304+
287305
4. Unused AT_HWCAP bits
288306
-----------------------
289307

Documentation/arm64/sme.rst

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,19 @@ model features for SME is included in Appendix A.
1818
1. General
1919
-----------
2020

21-
* PSTATE.SM, PSTATE.ZA, the streaming mode vector length, the ZA
22-
register state and TPIDR2_EL0 are tracked per thread.
21+
* PSTATE.SM, PSTATE.ZA, the streaming mode vector length, the ZA and (when
22+
present) ZTn register state and TPIDR2_EL0 are tracked per thread.
2323

2424
* The presence of SME is reported to userspace via HWCAP2_SME in the aux vector
2525
AT_HWCAP2 entry. Presence of this flag implies the presence of the SME
2626
instructions and registers, and the Linux-specific system interfaces
2727
described in this document. SME is reported in /proc/cpuinfo as "sme".
2828

29+
* The presence of SME2 is reported to userspace via HWCAP2_SME2 in the
30+
aux vector AT_HWCAP2 entry. Presence of this flag implies the presence of
31+
the SME2 instructions and ZT0, and the Linux-specific system interfaces
32+
described in this document. SME2 is reported in /proc/cpuinfo as "sme2".
33+
2934
* Support for the execution of SME instructions in userspace can also be
3035
detected by reading the CPU ID register ID_AA64PFR1_EL1 using an MRS
3136
instruction, and checking that the value of the SME field is nonzero. [3]
@@ -44,6 +49,7 @@ model features for SME is included in Appendix A.
4449
HWCAP2_SME_B16F32
4550
HWCAP2_SME_F32F32
4651
HWCAP2_SME_FA64
52+
HWCAP2_SME2
4753

4854
This list may be extended over time as the SME architecture evolves.
4955

@@ -52,8 +58,8 @@ model features for SME is included in Appendix A.
5258
cpu-feature-registers.txt for details.
5359

5460
* Debuggers should restrict themselves to interacting with the target via the
55-
NT_ARM_SVE, NT_ARM_SSVE and NT_ARM_ZA regsets. The recommended way
56-
of detecting support for these regsets is to connect to a target process
61+
NT_ARM_SVE, NT_ARM_SSVE, NT_ARM_ZA and NT_ARM_ZT regsets. The recommended
62+
way of detecting support for these regsets is to connect to a target process
5763
first and then attempt a
5864

5965
ptrace(PTRACE_GETREGSET, pid, NT_ARM_<regset>, &iov).
@@ -89,13 +95,13 @@ be zeroed.
8995
-------------------------
9096

9197
* On syscall PSTATE.ZA is preserved, if PSTATE.ZA==1 then the contents of the
92-
ZA matrix are preserved.
98+
ZA matrix and ZTn (if present) are preserved.
9399

94100
* On syscall PSTATE.SM will be cleared and the SVE registers will be handled
95101
as per the standard SVE ABI.
96102

97-
* Neither the SVE registers nor ZA are used to pass arguments to or receive
98-
results from any syscall.
103+
* None of the SVE registers, ZA or ZTn are used to pass arguments to
104+
or receive results from any syscall.
99105

100106
* On process creation (eg, clone()) the newly created process will have
101107
PSTATE.SM cleared.
@@ -111,6 +117,9 @@ be zeroed.
111117

112118
* Signal handlers are invoked with streaming mode and ZA disabled.
113119

120+
* A new signal frame record TPIDR2_MAGIC is added formatted as a struct
121+
tpidr2_context to allow access to TPIDR2_EL0 from signal handlers.
122+
114123
* A new signal frame record za_context encodes the ZA register contents on
115124
signal delivery. [1]
116125

@@ -134,6 +143,14 @@ be zeroed.
134143
__reserved[] referencing this space. za_context is then written in the
135144
extra space. Refer to [1] for further details about this mechanism.
136145

146+
* If ZTn is supported and PSTATE.ZA==1 then a signal frame record for ZTn will
147+
be generated.
148+
149+
* The signal record for ZTn has magic ZT_MAGIC (0x5a544e01) and consists of a
150+
standard signal frame header followed by a struct zt_context specifying
151+
the number of ZTn registers supported by the system, then zt_context.nregs
152+
blocks of 64 bytes of data per register.
153+
137154

138155
5. Signal return
139156
-----------------
@@ -151,6 +168,9 @@ When returning from a signal handler:
151168
the signal frame does not match the current vector length, the signal return
152169
attempt is treated as illegal, resulting in a forced SIGSEGV.
153170

171+
* If ZTn is not supported or PSTATE.ZA==0 then it is illegal to have a
172+
signal frame record for ZTn, resulting in a forced SIGSEGV.
173+
154174

155175
6. prctl extensions
156176
--------------------
@@ -214,8 +234,8 @@ prctl(PR_SME_SET_VL, unsigned long arg)
214234
vector length that will be applied at the next execve() by the calling
215235
thread.
216236

217-
* Changing the vector length causes all of ZA, P0..P15, FFR and all bits of
218-
Z0..Z31 except for Z0 bits [127:0] .. Z31 bits [127:0] to become
237+
* Changing the vector length causes all of ZA, ZTn, P0..P15, FFR and all
238+
bits of Z0..Z31 except for Z0 bits [127:0] .. Z31 bits [127:0] to become
219239
unspecified, including both streaming and non-streaming SVE state.
220240
Calling PR_SME_SET_VL with vl equal to the thread's current vector
221241
length, or calling PR_SME_SET_VL with the PR_SVE_SET_VL_ONEXEC flag,
@@ -317,6 +337,15 @@ The regset data starts with struct user_za_header, containing:
317337

318338
* The effect of writing a partial, incomplete payload is unspecified.
319339

340+
* A new regset NT_ARM_ZT is defined for access to ZTn state via
341+
PTRACE_GETREGSET and PTRACE_SETREGSET.
342+
343+
* The NT_ARM_ZT regset consists of a single 512 bit register.
344+
345+
* When PSTATE.ZA==0 reads of NT_ARM_ZT will report all bits of ZTn as 0.
346+
347+
* Writes to NT_ARM_ZT will set PSTATE.ZA to 1.
348+
320349

321350
8. ELF coredump extensions
322351
---------------------------
@@ -331,6 +360,11 @@ The regset data starts with struct user_za_header, containing:
331360
been read if a PTRACE_GETREGSET of NT_ARM_ZA were executed for each thread
332361
when the coredump was generated.
333362

363+
* A NT_ARM_ZT note will be added to each coredump for each thread of the
364+
dumped process. The contents will be equivalent to the data that would have
365+
been read if a PTRACE_GETREGSET of NT_ARM_ZT were executed for each thread
366+
when the coredump was generated.
367+
334368
* The NT_ARM_TLS note will be extended to two registers, the second register
335369
will contain TPIDR2_EL0 on systems that support SME and will be read as
336370
zero with writes ignored otherwise.
@@ -406,6 +440,9 @@ In A64 state, SME adds the following:
406440
For best system performance it is strongly encouraged for software to enable
407441
ZA only when it is actively being used.
408442

443+
* A new ZT0 register is introduced when SME2 is present. This is a 512 bit
444+
register which is accessible when PSTATE.ZA is set, as ZA itself is.
445+
409446
* Two new 1 bit fields in PSTATE which may be controlled via the SMSTART and
410447
SMSTOP instructions or by access to the SVCR system register:
411448

Documentation/arm64/sve.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ the SVE instruction set architecture.
175175
When returning from a signal handler:
176176

177177
* If there is no sve_context record in the signal frame, or if the record is
178-
present but contains no register data as desribed in the previous section,
178+
present but contains no register data as described in the previous section,
179179
then the SVE registers/bits become non-live and take unspecified values.
180180

181181
* If sve_context is present in the signal frame and contains full register
@@ -223,7 +223,7 @@ prctl(PR_SVE_SET_VL, unsigned long arg)
223223
Defer the requested vector length change until the next execve()
224224
performed by this thread.
225225

226-
The effect is equivalent to implicit exceution of the following
226+
The effect is equivalent to implicit execution of the following
227227
call immediately after the next execve() (if any) by the thread:
228228

229229
prctl(PR_SVE_SET_VL, arg & ~PR_SVE_SET_VL_ONEXEC)

arch/arm/include/asm/arch_gicv3.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,5 +252,10 @@ static inline void gic_arch_enable_irqs(void)
252252
WARN_ON_ONCE(true);
253253
}
254254

255+
static inline bool gic_has_relaxed_pmr_sync(void)
256+
{
257+
return false;
258+
}
259+
255260
#endif /* !__ASSEMBLY__ */
256261
#endif /* !__ASM_ARCH_GICV3_H */

arch/arm64/Kconfig

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ config ARM64
123123
select DMA_DIRECT_REMAP
124124
select EDAC_SUPPORT
125125
select FRAME_POINTER
126+
select FUNCTION_ALIGNMENT_4B
127+
select FUNCTION_ALIGNMENT_8B if DYNAMIC_FTRACE_WITH_CALL_OPS
126128
select GENERIC_ALLOCATOR
127129
select GENERIC_ARCH_TOPOLOGY
128130
select GENERIC_CLOCKEVENTS_BROADCAST
@@ -184,6 +186,8 @@ config ARM64
184186
select HAVE_DEBUG_KMEMLEAK
185187
select HAVE_DMA_CONTIGUOUS
186188
select HAVE_DYNAMIC_FTRACE
189+
select HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS \
190+
if (DYNAMIC_FTRACE_WITH_ARGS && !CFI_CLANG)
187191
select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \
188192
if DYNAMIC_FTRACE_WITH_ARGS
189193
select HAVE_EFFICIENT_UNALIGNED_ACCESS
@@ -1470,10 +1474,23 @@ config XEN
14701474
help
14711475
Say Y if you want to run Linux in a Virtual Machine on Xen on ARM64.
14721476

1477+
# include/linux/mmzone.h requires the following to be true:
1478+
#
1479+
# MAX_ORDER - 1 + PAGE_SHIFT <= SECTION_SIZE_BITS
1480+
#
1481+
# so the maximum value of MAX_ORDER is SECTION_SIZE_BITS + 1 - PAGE_SHIFT:
1482+
#
1483+
# | SECTION_SIZE_BITS | PAGE_SHIFT | max MAX_ORDER | default MAX_ORDER |
1484+
# ----+-------------------+--------------+-----------------+--------------------+
1485+
# 4K | 27 | 12 | 16 | 11 |
1486+
# 16K | 27 | 14 | 14 | 12 |
1487+
# 64K | 29 | 16 | 14 | 14 |
14731488
config ARCH_FORCE_MAX_ORDER
1474-
int
1489+
int "Maximum zone order" if ARM64_4K_PAGES || ARM64_16K_PAGES
14751490
default "14" if ARM64_64K_PAGES
1491+
range 12 14 if ARM64_16K_PAGES
14761492
default "12" if ARM64_16K_PAGES
1493+
range 11 16 if ARM64_4K_PAGES
14771494
default "11"
14781495
help
14791496
The kernel memory allocator divides physically contiguous memory
@@ -1486,7 +1503,7 @@ config ARCH_FORCE_MAX_ORDER
14861503
This config option is actually maximum order plus one. For example,
14871504
a value of 11 means that the largest free memory block is 2^10 pages.
14881505

1489-
We make sure that we can allocate upto a HugePage size for each configuration.
1506+
We make sure that we can allocate up to a HugePage size for each configuration.
14901507
Hence we have :
14911508
MAX_ORDER = (PMD_SHIFT - PAGE_SHIFT) + 1 => PAGE_SHIFT - 2
14921509

@@ -1832,7 +1849,7 @@ config ARM64_PTR_AUTH_KERNEL
18321849
bool "Use pointer authentication for kernel"
18331850
default y
18341851
depends on ARM64_PTR_AUTH
1835-
depends on (CC_HAS_SIGN_RETURN_ADDRESS || CC_HAS_BRANCH_PROT_PAC_RET) && AS_HAS_PAC
1852+
depends on (CC_HAS_SIGN_RETURN_ADDRESS || CC_HAS_BRANCH_PROT_PAC_RET) && AS_HAS_ARMV8_3
18361853
# Modern compilers insert a .note.gnu.property section note for PAC
18371854
# which is only understood by binutils starting with version 2.33.1.
18381855
depends on LD_IS_LLD || LD_VERSION >= 23301 || (CC_IS_GCC && GCC_VERSION < 90100)
@@ -1857,7 +1874,7 @@ config CC_HAS_SIGN_RETURN_ADDRESS
18571874
# GCC 7, 8
18581875
def_bool $(cc-option,-msign-return-address=all)
18591876

1860-
config AS_HAS_PAC
1877+
config AS_HAS_ARMV8_3
18611878
def_bool $(cc-option,-Wa$(comma)-march=armv8.3-a)
18621879

18631880
config AS_HAS_CFI_NEGATE_RA_STATE

arch/arm64/Kconfig.platforms

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ config ARCH_MVEBU
187187
select PINCTRL_ARMADA_CP110
188188
select PINCTRL_AC5
189189
help
190-
This enables support for Marvell EBU familly, including:
190+
This enables support for Marvell EBU family, including:
191191
- Armada 3700 SoC Family
192192
- Armada 7K SoC Family
193193
- Armada 8K SoC Family

arch/arm64/Makefile

Lines changed: 30 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -63,50 +63,37 @@ stack_protector_prepare: prepare0
6363
include/generated/asm-offsets.h))
6464
endif
6565

66-
ifeq ($(CONFIG_AS_HAS_ARMV8_2), y)
67-
# make sure to pass the newest target architecture to -march.
68-
asm-arch := armv8.2-a
69-
endif
70-
71-
# Ensure that if the compiler supports branch protection we default it
72-
# off, this will be overridden if we are using branch protection.
73-
branch-prot-flags-y += $(call cc-option,-mbranch-protection=none)
74-
75-
ifeq ($(CONFIG_ARM64_PTR_AUTH_KERNEL),y)
76-
branch-prot-flags-$(CONFIG_CC_HAS_SIGN_RETURN_ADDRESS) := -msign-return-address=all
77-
# We enable additional protection for leaf functions as there is some
78-
# narrow potential for ROP protection benefits and no substantial
79-
# performance impact has been observed.
80-
PACRET-y := pac-ret+leaf
81-
82-
# Using a shadow call stack in leaf functions is too costly, so avoid PAC there
83-
# as well when we may be patching PAC into SCS
84-
PACRET-$(CONFIG_UNWIND_PATCH_PAC_INTO_SCS) := pac-ret
85-
8666
ifeq ($(CONFIG_ARM64_BTI_KERNEL),y)
87-
branch-prot-flags-$(CONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI) := -mbranch-protection=$(PACRET-y)+bti
67+
KBUILD_CFLAGS += -mbranch-protection=pac-ret+bti
68+
else ifeq ($(CONFIG_ARM64_PTR_AUTH_KERNEL),y)
69+
ifeq ($(CONFIG_CC_HAS_BRANCH_PROT_PAC_RET),y)
70+
KBUILD_CFLAGS += -mbranch-protection=pac-ret
71+
else
72+
KBUILD_CFLAGS += -msign-return-address=non-leaf
73+
endif
8874
else
89-
branch-prot-flags-$(CONFIG_CC_HAS_BRANCH_PROT_PAC_RET) := -mbranch-protection=$(PACRET-y)
90-
endif
91-
# -march=armv8.3-a enables the non-nops instructions for PAC, to avoid the
92-
# compiler to generate them and consequently to break the single image contract
93-
# we pass it only to the assembler. This option is utilized only in case of non
94-
# integrated assemblers.
95-
ifeq ($(CONFIG_AS_HAS_PAC), y)
96-
asm-arch := armv8.3-a
97-
endif
98-
endif
99-
100-
KBUILD_CFLAGS += $(branch-prot-flags-y)
101-
102-
ifeq ($(CONFIG_AS_HAS_ARMV8_4), y)
103-
# make sure to pass the newest target architecture to -march.
104-
asm-arch := armv8.4-a
75+
KBUILD_CFLAGS += $(call cc-option,-mbranch-protection=none)
10576
endif
10677

78+
# Tell the assembler to support instructions from the latest target
79+
# architecture.
80+
#
81+
# For non-integrated assemblers we'll pass this on the command line, and for
82+
# integrated assemblers we'll define ARM64_ASM_ARCH and ARM64_ASM_PREAMBLE for
83+
# inline usage.
84+
#
85+
# We cannot pass the same arch flag to the compiler as this would allow it to
86+
# freely generate instructions which are not supported by earlier architecture
87+
# versions, which would prevent a single kernel image from working on earlier
88+
# hardware.
10789
ifeq ($(CONFIG_AS_HAS_ARMV8_5), y)
108-
# make sure to pass the newest target architecture to -march.
109-
asm-arch := armv8.5-a
90+
asm-arch := armv8.5-a
91+
else ifeq ($(CONFIG_AS_HAS_ARMV8_4), y)
92+
asm-arch := armv8.4-a
93+
else ifeq ($(CONFIG_AS_HAS_ARMV8_3), y)
94+
asm-arch := armv8.3-a
95+
else ifeq ($(CONFIG_AS_HAS_ARMV8_2), y)
96+
asm-arch := armv8.2-a
11097
endif
11198

11299
ifdef asm-arch
@@ -139,7 +126,10 @@ endif
139126

140127
CHECKFLAGS += -D__aarch64__
141128

142-
ifeq ($(CONFIG_DYNAMIC_FTRACE_WITH_ARGS),y)
129+
ifeq ($(CONFIG_DYNAMIC_FTRACE_WITH_CALL_OPS),y)
130+
KBUILD_CPPFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY
131+
CC_FLAGS_FTRACE := -fpatchable-function-entry=4,2
132+
else ifeq ($(CONFIG_DYNAMIC_FTRACE_WITH_ARGS),y)
143133
KBUILD_CPPFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY
144134
CC_FLAGS_FTRACE := -fpatchable-function-entry=2
145135
endif

0 commit comments

Comments
 (0)