Skip to content

Commit 945409a

Browse files
committed
Merge branches 'for-next/misc', 'for-next/cache-ops-dzp', 'for-next/stacktrace', 'for-next/xor-neon', 'for-next/kasan', 'for-next/armv8_7-fp', 'for-next/atomics', 'for-next/bti', 'for-next/sve', 'for-next/kselftest' and 'for-next/kcsan', remote-tracking branch 'arm64/for-next/perf' into for-next/core
* arm64/for-next/perf: (32 commits) arm64: perf: Don't register user access sysctl handler multiple times drivers: perf: marvell_cn10k: fix an IS_ERR() vs NULL check perf/smmuv3: Fix unused variable warning when CONFIG_OF=n arm64: perf: Support new DT compatibles arm64: perf: Simplify registration boilerplate arm64: perf: Support Denver and Carmel PMUs drivers/perf: hisi: Add driver for HiSilicon PCIe PMU docs: perf: Add description for HiSilicon PCIe PMU driver dt-bindings: perf: Add YAML schemas for Marvell CN10K LLC-TAD pmu bindings drivers: perf: Add LLC-TAD perf counter support perf/smmuv3: Synthesize IIDR from CoreSight ID registers perf/smmuv3: Add devicetree support dt-bindings: Add Arm SMMUv3 PMCG binding perf/arm-cmn: Add debugfs topology info perf/arm-cmn: Add CI-700 Support dt-bindings: perf: arm-cmn: Add CI-700 perf/arm-cmn: Support new IP features perf/arm-cmn: Demarcate CMN-600 specifics perf/arm-cmn: Move group validation data off-stack perf/arm-cmn: Optimise DTC counter accesses ... * for-next/misc: : Miscellaneous patches arm64: Use correct method to calculate nomap region boundaries arm64: Drop outdated links in comments arm64: errata: Fix exec handling in erratum 1418040 workaround arm64: Unhash early pointer print plus improve comment asm-generic: introduce io_stop_wc() and add implementation for ARM64 arm64: remove __dma_*_area() aliases docs/arm64: delete a space from tagged-address-abi arm64/fp: Add comments documenting the usage of state restore functions arm64: mm: Use asid feature macro for cheanup arm64: mm: Rename asid2idx() to ctxid2asid() arm64: kexec: reduce calls to page_address() arm64: extable: remove unused ex_handler_t definition arm64: entry: Use SDEI event constants arm64: Simplify checking for populated DT arm64/kvm: Fix bitrotted comment for SVE handling in handle_exit.c * for-next/cache-ops-dzp: : Avoid DC instructions when DCZID_EL0.DZP == 1 arm64: mte: DC {GVA,GZVA} shouldn't be used when DCZID_EL0.DZP == 1 arm64: clear_page() shouldn't use DC ZVA when DCZID_EL0.DZP == 1 * for-next/stacktrace: : Unify the arm64 unwind code arm64: Make some stacktrace functions private arm64: Make dump_backtrace() use arch_stack_walk() arm64: Make profile_pc() use arch_stack_walk() arm64: Make return_address() use arch_stack_walk() arm64: Make __get_wchan() use arch_stack_walk() arm64: Make perf_callchain_kernel() use arch_stack_walk() arm64: Mark __switch_to() as __sched arm64: Add comment for stack_info::kr_cur arch: Make ARCH_STACKWALK independent of STACKTRACE * for-next/xor-neon: : Use SHA3 instructions to speed up XOR arm64/xor: use EOR3 instructions when available * for-next/kasan: : Log potential KASAN shadow aliases arm64: mm: log potential KASAN shadow alias arm64: mm: use die_kernel_fault() in do_mem_abort() * for-next/armv8_7-fp: : Add HWCAPS for ARMv8.7 FEAT_AFP amd FEAT_RPRES arm64: cpufeature: add HWCAP for FEAT_RPRES arm64: add ID_AA64ISAR2_EL1 sys register arm64: cpufeature: add HWCAP for FEAT_AFP * for-next/atomics: : arm64 atomics clean-ups and codegen improvements arm64: atomics: lse: define RETURN ops in terms of FETCH ops arm64: atomics: lse: improve constraints for simple ops arm64: atomics: lse: define ANDs in terms of ANDNOTs arm64: atomics lse: define SUBs in terms of ADDs arm64: atomics: format whitespace consistently * for-next/bti: : BTI clean-ups arm64: Ensure that the 'bti' macro is defined where linkage.h is included arm64: Use BTI C directly and unconditionally arm64: Unconditionally override SYM_FUNC macros arm64: Add macro version of the BTI instruction arm64: ftrace: add missing BTIs arm64: kexec: use __pa_symbol(empty_zero_page) arm64: update PAC description for kernel * for-next/sve: : SVE code clean-ups and refactoring in prepararation of Scalable Matrix Extensions arm64/sve: Minor clarification of ABI documentation arm64/sve: Generalise vector length configuration prctl() for SME arm64/sve: Make sysctl interface for SVE reusable by SME * for-next/kselftest: : arm64 kselftest additions kselftest/arm64: Add pidbench for floating point syscall cases kselftest/arm64: Add a test program to exercise the syscall ABI kselftest/arm64: Allow signal tests to trigger from a function kselftest/arm64: Parameterise ptrace vector length information * for-next/kcsan: : Enable KCSAN for arm64 arm64: Enable KCSAN
12 parents 3da4390 + daa149d + 685e256 + d2d1d26 + 2c54b42 + 07b742a + 1175011 + 053f58b + dd73d18 + aed34d9 + 2c94ebe + dd03762 commit 945409a

Some content is hidden

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

66 files changed

+1432
-620
lines changed

Documentation/arm64/cpu-feature-registers.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,23 @@ infrastructure:
275275
| SVEVer | [3-0] | y |
276276
+------------------------------+---------+---------+
277277

278+
8) ID_AA64MMFR1_EL1 - Memory model feature register 1
279+
280+
+------------------------------+---------+---------+
281+
| Name | bits | visible |
282+
+------------------------------+---------+---------+
283+
| AFP | [47-44] | y |
284+
+------------------------------+---------+---------+
285+
286+
9) ID_AA64ISAR2_EL1 - Instruction set attribute register 2
287+
288+
+------------------------------+---------+---------+
289+
| Name | bits | visible |
290+
+------------------------------+---------+---------+
291+
| RPRES | [7-4] | y |
292+
+------------------------------+---------+---------+
293+
294+
278295
Appendix I: Example
279296
-------------------
280297

Documentation/arm64/elf_hwcaps.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,14 @@ HWCAP2_ECV
251251

252252
Functionality implied by ID_AA64MMFR0_EL1.ECV == 0b0001.
253253

254+
HWCAP2_AFP
255+
256+
Functionality implied by ID_AA64MFR1_EL1.AFP == 0b0001.
257+
258+
HWCAP2_RPRES
259+
260+
Functionality implied by ID_AA64ISAR2_EL1.RPRES == 0b0001.
261+
254262
4. Unused AT_HWCAP bits
255263
-----------------------
256264

Documentation/arm64/pointer-authentication.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,10 @@ The number of bits that the PAC occupies in a pointer is 55 minus the
5353
virtual address size configured by the kernel. For example, with a
5454
virtual address size of 48, the PAC is 7 bits wide.
5555

56-
Recent versions of GCC can compile code with APIAKey-based return
57-
address protection when passed the -msign-return-address option. This
58-
uses instructions in the HINT space (unless -march=armv8.3-a or higher
59-
is also passed), and such code can run on systems without the pointer
60-
authentication extension.
56+
When ARM64_PTR_AUTH_KERNEL is selected, the kernel will be compiled
57+
with HINT space pointer authentication instructions protecting
58+
function returns. Kernels built with this option will work on hardware
59+
with or without pointer authentication support.
6160

6261
In addition to exec(), keys can also be reinitialized to random values
6362
using the PR_PAC_RESET_KEYS prctl. A bitmask of PR_PAC_APIAKEY,

Documentation/arm64/sve.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ prctl(PR_SVE_GET_VL)
255255
vector length change (which would only normally be the case between a
256256
fork() or vfork() and the corresponding execve() in typical use).
257257

258-
To extract the vector length from the result, and it with
258+
To extract the vector length from the result, bitwise and it with
259259
PR_SVE_VL_LEN_MASK.
260260

261261
Return value: a nonnegative value on success, or a negative value on error:

Documentation/arm64/tagged-address-abi.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ how the user addresses are used by the kernel:
4949

5050
- ``brk()``, ``mmap()`` and the ``new_address`` argument to
5151
``mremap()`` as these have the potential to alias with existing
52-
user addresses.
52+
user addresses.
5353

5454
NOTE: This behaviour changed in v5.6 and so some earlier kernels may
5555
incorrectly accept valid tagged pointers for the ``brk()``,

Documentation/memory-barriers.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,6 +1950,14 @@ There are some more advanced barrier functions:
19501950
For load from persistent memory, existing read memory barriers are sufficient
19511951
to ensure read ordering.
19521952

1953+
(*) io_stop_wc();
1954+
1955+
For memory accesses with write-combining attributes (e.g. those returned
1956+
by ioremap_wc(), the CPU may wait for prior accesses to be merged with
1957+
subsequent ones. io_stop_wc() can be used to prevent the merging of
1958+
write-combining memory accesses before this macro with those after it when
1959+
such wait has performance implications.
1960+
19531961
===============================
19541962
IMPLICIT KERNEL MEMORY BARRIERS
19551963
===============================

arch/arm64/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ config ARM64
150150
select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
151151
select HAVE_ARCH_KASAN_SW_TAGS if HAVE_ARCH_KASAN
152152
select HAVE_ARCH_KASAN_HW_TAGS if (HAVE_ARCH_KASAN && ARM64_MTE)
153+
# Some instrumentation may be unsound, hence EXPERT
154+
select HAVE_ARCH_KCSAN if EXPERT
153155
select HAVE_ARCH_KFENCE
154156
select HAVE_ARCH_KGDB
155157
select HAVE_ARCH_MMAP_RND_BITS
@@ -1545,6 +1547,12 @@ endmenu
15451547

15461548
menu "ARMv8.2 architectural features"
15471549

1550+
config AS_HAS_ARMV8_2
1551+
def_bool $(cc-option,-Wa$(comma)-march=armv8.2-a)
1552+
1553+
config AS_HAS_SHA3
1554+
def_bool $(as-instr,.arch armv8.2-a+sha3)
1555+
15481556
config ARM64_PMEM
15491557
bool "Enable support for persistent memory"
15501558
select ARCH_HAS_PMEM_API

arch/arm64/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ stack_protector_prepare: prepare0
5858
include/generated/asm-offsets.h))
5959
endif
6060

61+
ifeq ($(CONFIG_AS_HAS_ARMV8_2), y)
62+
# make sure to pass the newest target architecture to -march.
63+
asm-arch := armv8.2-a
64+
endif
65+
6166
# Ensure that if the compiler supports branch protection we default it
6267
# off, this will be overridden if we are using branch protection.
6368
branch-prot-flags-y += $(call cc-option,-mbranch-protection=none)

arch/arm64/crypto/aes-modes.S

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,15 +363,15 @@ ST5( mov v4.16b, vctr.16b )
363363
adr x16, 1f
364364
sub x16, x16, x12, lsl #3
365365
br x16
366-
hint 34 // bti c
366+
bti c
367367
mov v0.d[0], vctr.d[0]
368-
hint 34 // bti c
368+
bti c
369369
mov v1.d[0], vctr.d[0]
370-
hint 34 // bti c
370+
bti c
371371
mov v2.d[0], vctr.d[0]
372-
hint 34 // bti c
372+
bti c
373373
mov v3.d[0], vctr.d[0]
374-
ST5( hint 34 )
374+
ST5( bti c )
375375
ST5( mov v4.d[0], vctr.d[0] )
376376
1: b 2f
377377
.previous

arch/arm64/include/asm/assembler.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,16 @@ alternative_endif
790790
.Lnoyield_\@:
791791
.endm
792792

793+
/*
794+
* Branch Target Identifier (BTI)
795+
*/
796+
.macro bti, targets
797+
.equ .L__bti_targets_c, 34
798+
.equ .L__bti_targets_j, 36
799+
.equ .L__bti_targets_jc,38
800+
hint #.L__bti_targets_\targets
801+
.endm
802+
793803
/*
794804
* This macro emits a program property note section identifying
795805
* architecture features which require special handling, mainly for

0 commit comments

Comments
 (0)