Skip to content

Commit 356a1ad

Browse files
committed
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 updates from Will Deacon: - Support for including MTE tags in ELF coredumps - Instruction encoder updates, including fixes to 64-bit immediate generation and support for the LSE atomic instructions - Improvements to kselftests for MTE and fpsimd - Symbol aliasing and linker script cleanups - Reduce instruction cache maintenance performed for user mappings created using contiguous PTEs - Support for the new "asymmetric" MTE mode, where stores are checked asynchronously but loads are checked synchronously - Support for the latest pointer authentication algorithm ("QARMA3") - Support for the DDR PMU present in the Marvell CN10K platform - Support for the CPU PMU present in the Apple M1 platform - Use the RNDR instruction for arch_get_random_{int,long}() - Update our copy of the Arm optimised string routines for str{n}cmp() - Fix signal frame generation for CPUs which have foolishly elected to avoid building in support for the fpsimd instructions - Workaround for Marvell GICv3 erratum #38545 - Clarification to our Documentation (booting reqs. and MTE prctl()) - Miscellanous cleanups and minor fixes * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (90 commits) docs: sysfs-devices-system-cpu: document "asymm" value for mte_tcf_preferred arm64/mte: Remove asymmetric mode from the prctl() interface arm64: Add cavium_erratum_23154_cpus missing sentinel perf/marvell: Fix !CONFIG_OF build for CN10K DDR PMU driver arm64: mm: Drop 'const' from conditional arm64_dma_phys_limit definition Documentation: vmcoreinfo: Fix htmldocs warning kasan: fix a missing header include of static_keys.h drivers/perf: Add Apple icestorm/firestorm CPU PMU driver drivers/perf: arm_pmu: Handle 47 bit counters arm64: perf: Consistently make all event numbers as 16-bits arm64: perf: Expose some Armv9 common events under sysfs perf/marvell: cn10k DDR perf event core ownership perf/marvell: cn10k DDR perfmon event overflow handling perf/marvell: CN10k DDR performance monitor support dt-bindings: perf: marvell: cn10k ddr performance monitor arm64: clean up tools Makefile perf/arm-cmn: Update watchpoint format perf/arm-cmn: Hide XP PUB events for CMN-600 arm64: drop unused includes of <linux/personality.h> arm64: Do not defer reserve_crashkernel() for platforms with no DMA memory zones ...
2 parents 9d8e700 + 641d804 commit 356a1ad

124 files changed

Lines changed: 3470 additions & 891 deletions

File tree

Some content is hidden

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

Documentation/ABI/testing/sysfs-devices-system-cpu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ Description: Preferred MTE tag checking mode
662662

663663
================ ==============================================
664664
"sync" Prefer synchronous mode
665+
"asymm" Prefer asymmetric mode
665666
"async" Prefer asynchronous mode
666667
================ ==============================================
667668

Documentation/admin-guide/kdump/vmcoreinfo.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,14 @@ architecture which is used to lookup the page-tables for the Virtual
494494
addresses in the higher VA range (refer to ARMv8 ARM document for
495495
more details).
496496

497+
MODULES_VADDR|MODULES_END|VMALLOC_START|VMALLOC_END|VMEMMAP_START|VMEMMAP_END
498+
-----------------------------------------------------------------------------
499+
500+
Used to get the correct ranges:
501+
MODULES_VADDR ~ MODULES_END-1 : Kernel module space.
502+
VMALLOC_START ~ VMALLOC_END-1 : vmalloc() / ioremap() space.
503+
VMEMMAP_START ~ VMEMMAP_END-1 : vmemmap region, used for struct page array.
504+
497505
arm
498506
===
499507

Documentation/arm64/booting.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ This document is based on the ARM booting document by Russell King and
1010
is relevant to all public releases of the AArch64 Linux kernel.
1111

1212
The AArch64 exception model is made up of a number of exception levels
13-
(EL0 - EL3), with EL0 and EL1 having a secure and a non-secure
14-
counterpart. EL2 is the hypervisor level and exists only in non-secure
15-
mode. EL3 is the highest priority level and exists only in secure mode.
13+
(EL0 - EL3), with EL0, EL1 and EL2 having a secure and a non-secure
14+
counterpart. EL2 is the hypervisor level, EL3 is the highest priority
15+
level and exists only in secure mode. Both are architecturally optional.
1616

1717
For the purposes of this document, we will use the term `boot loader`
1818
simply to define all software that executes on the CPU(s) before control
@@ -167,8 +167,8 @@ Before jumping into the kernel, the following conditions must be met:
167167

168168
All forms of interrupts must be masked in PSTATE.DAIF (Debug, SError,
169169
IRQ and FIQ).
170-
The CPU must be in either EL2 (RECOMMENDED in order to have access to
171-
the virtualisation extensions) or non-secure EL1.
170+
The CPU must be in non-secure state, either in EL2 (RECOMMENDED in order
171+
to have access to the virtualisation extensions), or in EL1.
172172

173173
- Caches, MMUs
174174

Documentation/arm64/elf_hwcaps.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ HWCAP2_RPRES
259259

260260
Functionality implied by ID_AA64ISAR2_EL1.RPRES == 0b0001.
261261

262+
HWCAP2_MTE3
263+
264+
Functionality implied by ID_AA64PFR1_EL1.MTE == 0b0011, as described
265+
by Documentation/arm64/memory-tagging-extension.rst.
266+
262267
4. Unused AT_HWCAP bits
263268
-----------------------
264269

Documentation/arm64/memory-tagging-extension.rst

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ configurable behaviours:
7676
with ``.si_code = SEGV_MTEAERR`` and ``.si_addr = 0`` (the faulting
7777
address is unknown).
7878

79+
- *Asymmetric* - Reads are handled as for synchronous mode while writes
80+
are handled as for asynchronous mode.
81+
7982
The user can select the above modes, per thread, using the
8083
``prctl(PR_SET_TAGGED_ADDR_CTRL, flags, 0, 0, 0)`` system call where ``flags``
8184
contains any number of the following values in the ``PR_MTE_TCF_MASK``
@@ -91,8 +94,9 @@ mode is specified, the program will run in that mode. If multiple
9194
modes are specified, the mode is selected as described in the "Per-CPU
9295
preferred tag checking modes" section below.
9396

94-
The current tag check fault mode can be read using the
95-
``prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0)`` system call.
97+
The current tag check fault configuration can be read using the
98+
``prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0)`` system call. If
99+
multiple modes were requested then all will be reported.
96100

97101
Tag checking can also be disabled for a user thread by setting the
98102
``PSTATE.TCO`` bit with ``MSR TCO, #1``.
@@ -139,18 +143,25 @@ tag checking mode as the CPU's preferred tag checking mode.
139143

140144
The preferred tag checking mode for each CPU is controlled by
141145
``/sys/devices/system/cpu/cpu<N>/mte_tcf_preferred``, to which a
142-
privileged user may write the value ``async`` or ``sync``. The default
143-
preferred mode for each CPU is ``async``.
146+
privileged user may write the value ``async``, ``sync`` or ``asymm``. The
147+
default preferred mode for each CPU is ``async``.
144148

145149
To allow a program to potentially run in the CPU's preferred tag
146150
checking mode, the user program may set multiple tag check fault mode
147151
bits in the ``flags`` argument to the ``prctl(PR_SET_TAGGED_ADDR_CTRL,
148-
flags, 0, 0, 0)`` system call. If the CPU's preferred tag checking
149-
mode is in the task's set of provided tag checking modes (this will
150-
always be the case at present because the kernel only supports two
151-
tag checking modes, but future kernels may support more modes), that
152-
mode will be selected. Otherwise, one of the modes in the task's mode
153-
set will be selected in a currently unspecified manner.
152+
flags, 0, 0, 0)`` system call. If both synchronous and asynchronous
153+
modes are requested then asymmetric mode may also be selected by the
154+
kernel. If the CPU's preferred tag checking mode is in the task's set
155+
of provided tag checking modes, that mode will be selected. Otherwise,
156+
one of the modes in the task's mode will be selected by the kernel
157+
from the task's mode set using the preference order:
158+
159+
1. Asynchronous
160+
2. Asymmetric
161+
3. Synchronous
162+
163+
Note that there is no way for userspace to request multiple modes and
164+
also disable asymmetric mode.
154165

155166
Initial process state
156167
---------------------
@@ -213,6 +224,29 @@ address ABI control and MTE configuration of a process as per the
213224
Documentation/arm64/tagged-address-abi.rst and above. The corresponding
214225
``regset`` is 1 element of 8 bytes (``sizeof(long))``).
215226

227+
Core dump support
228+
-----------------
229+
230+
The allocation tags for user memory mapped with ``PROT_MTE`` are dumped
231+
in the core file as additional ``PT_ARM_MEMTAG_MTE`` segments. The
232+
program header for such segment is defined as:
233+
234+
:``p_type``: ``PT_ARM_MEMTAG_MTE``
235+
:``p_flags``: 0
236+
:``p_offset``: segment file offset
237+
:``p_vaddr``: segment virtual address, same as the corresponding
238+
``PT_LOAD`` segment
239+
:``p_paddr``: 0
240+
:``p_filesz``: segment size in file, calculated as ``p_mem_sz / 32``
241+
(two 4-bit tags cover 32 bytes of memory)
242+
:``p_memsz``: segment size in memory, same as the corresponding
243+
``PT_LOAD`` segment
244+
:``p_align``: 0
245+
246+
The tags are stored in the core file at ``p_offset`` as two 4-bit tags
247+
in a byte. With the tag granule of 16 bytes, a 4K page requires 128
248+
bytes in the core file.
249+
216250
Example of correct usage
217251
========================
218252

Documentation/arm64/silicon-errata.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ stable kernels.
136136
+----------------+-----------------+-----------------+-----------------------------+
137137
| Cavium | ThunderX ITS | #23144 | CAVIUM_ERRATUM_23144 |
138138
+----------------+-----------------+-----------------+-----------------------------+
139-
| Cavium | ThunderX GICv3 | #23154 | CAVIUM_ERRATUM_23154 |
139+
| Cavium | ThunderX GICv3 | #23154,38545 | CAVIUM_ERRATUM_23154 |
140140
+----------------+-----------------+-----------------+-----------------------------+
141141
| Cavium | ThunderX GICv3 | #38539 | N/A |
142142
+----------------+-----------------+-----------------+-----------------------------+

Documentation/asm-annotations.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,13 @@ denoting a range of code via ``SYM_*_START/END`` annotations.
130130
In fact, this kind of annotation corresponds to the now deprecated ``ENTRY``
131131
and ``ENDPROC`` macros.
132132

133-
* ``SYM_FUNC_START_ALIAS`` and ``SYM_FUNC_START_LOCAL_ALIAS`` serve for those
134-
who decided to have two or more names for one function. The typical use is::
133+
* ``SYM_FUNC_ALIAS``, ``SYM_FUNC_ALIAS_LOCAL``, and ``SYM_FUNC_ALIAS_WEAK`` can
134+
be used to define multiple names for a function. The typical use is::
135135

136-
SYM_FUNC_START_ALIAS(__memset)
137-
SYM_FUNC_START(memset)
136+
SYM_FUNC_START(__memset)
138137
... asm insns ...
139-
SYM_FUNC_END(memset)
140-
SYM_FUNC_END_ALIAS(__memset)
138+
SYN_FUNC_END(__memset)
139+
SYM_FUNC_ALIAS(memset, __memset)
141140

142141
In this example, one can call ``__memset`` or ``memset`` with the same
143142
result, except the debug information for the instructions is generated to

Documentation/devicetree/bindings/arm/pmu.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ properties:
2020
items:
2121
- enum:
2222
- apm,potenza-pmu
23+
- apple,firestorm-pmu
24+
- apple,icestorm-pmu
2325
- arm,armv8-pmuv3 # Only for s/w models
2426
- arm,arm1136-pmu
2527
- arm,arm1176-pmu

Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ properties:
5656
- 1: virtual HV timer
5757
- 2: physical guest timer
5858
- 3: virtual guest timer
59+
- 4: 'efficient' CPU PMU
60+
- 5: 'performance' CPU PMU
5961
6062
The 3rd cell contains the interrupt flags. This is normally
6163
IRQ_TYPE_LEVEL_HIGH (4).
@@ -68,6 +70,35 @@ properties:
6870
power-domains:
6971
maxItems: 1
7072

73+
affinities:
74+
type: object
75+
additionalProperties: false
76+
description:
77+
FIQ affinity can be expressed as a single "affinities" node,
78+
containing a set of sub-nodes, one per FIQ with a non-default
79+
affinity.
80+
patternProperties:
81+
"^.+-affinity$":
82+
type: object
83+
additionalProperties: false
84+
properties:
85+
apple,fiq-index:
86+
description:
87+
The interrupt number specified as a FIQ, and for which
88+
the affinity is not the default.
89+
$ref: /schemas/types.yaml#/definitions/uint32
90+
maximum: 5
91+
92+
cpus:
93+
$ref: /schemas/types.yaml#/definitions/phandle-array
94+
description:
95+
Should be a list of phandles to CPU nodes (as described in
96+
Documentation/devicetree/bindings/arm/cpus.yaml).
97+
98+
required:
99+
- fiq-index
100+
- cpus
101+
71102
required:
72103
- compatible
73104
- '#interrupt-cells'
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/perf/marvell-cn10k-ddr.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Marvell CN10K DDR performance monitor
8+
9+
maintainers:
10+
- Bharat Bhushan <bbhushan2@marvell.com>
11+
12+
properties:
13+
compatible:
14+
items:
15+
- enum:
16+
- marvell,cn10k-ddr-pmu
17+
18+
reg:
19+
maxItems: 1
20+
21+
required:
22+
- compatible
23+
- reg
24+
25+
additionalProperties: false
26+
27+
examples:
28+
- |
29+
bus {
30+
#address-cells = <2>;
31+
#size-cells = <2>;
32+
33+
pmu@87e1c0000000 {
34+
compatible = "marvell,cn10k-ddr-pmu";
35+
reg = <0x87e1 0xc0000000 0x0 0x10000>;
36+
};
37+
};

0 commit comments

Comments
 (0)