Skip to content

Commit 44fc843

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: "These are the arm64 updates for 6.19. The biggest part is the Arm MPAM driver under drivers/resctrl/. There's a patch touching mm/ to handle spurious faults for huge pmd (similar to the pte version). The corresponding arm64 part allows us to avoid the TLB maintenance if a (huge) page is reused after a write fault. There's EFI refactoring to allow runtime services with preemption enabled and the rest is the usual perf/PMU updates and several cleanups/typos. Summary: Core features: - Basic Arm MPAM (Memory system resource Partitioning And Monitoring) driver under drivers/resctrl/ which makes use of the fs/rectrl/ API Perf and PMU: - Avoid cycle counter on multi-threaded CPUs - Extend CSPMU device probing and add additional filtering support for NVIDIA implementations - Add support for the PMUs on the NoC S3 interconnect - Add additional compatible strings for new Cortex and C1 CPUs - Add support for data source filtering to the SPE driver - Add support for i.MX8QM and "DB" PMU in the imx PMU driver Memory managemennt: - Avoid broadcast TLBI if page reused in write fault - Elide TLB invalidation if the old PTE was not valid - Drop redundant cpu_set_*_tcr_t0sz() macros - Propagate pgtable_alloc() errors outside of __create_pgd_mapping() - Propagate return value from __change_memory_common() ACPI and EFI: - Call EFI runtime services without disabling preemption - Remove unused ACPI function Miscellaneous: - ptrace support to disable streaming on SME-only systems - Improve sysreg generation to include a 'Prefix' descriptor - Replace __ASSEMBLY__ with __ASSEMBLER__ - Align register dumps in the kselftest zt-test - Remove some no longer used macros/functions - Various spelling corrections" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (94 commits) arm64/mm: Document why linear map split failure upon vm_reset_perms is not problematic arm64/pageattr: Propagate return value from __change_memory_common arm64/sysreg: Remove unused define ARM64_FEATURE_FIELD_BITS KVM: arm64: selftests: Consider all 7 possible levels of cache KVM: arm64: selftests: Remove ARM64_FEATURE_FIELD_BITS and its last user arm64: atomics: lse: Remove unused parameters from ATOMIC_FETCH_OP_AND macros Documentation/arm64: Fix the typo of register names ACPI: GTDT: Get rid of acpi_arch_timer_mem_init() perf: arm_spe: Add support for filtering on data source perf: Add perf_event_attr::config4 perf/imx_ddr: Add support for PMU in DB (system interconnects) perf/imx_ddr: Get and enable optional clks perf/imx_ddr: Move ida_alloc() from ddr_perf_init() to ddr_perf_probe() dt-bindings: perf: fsl-imx-ddr: Add compatible string for i.MX8QM, i.MX8QXP and i.MX8DXL arm64: remove duplicate ARCH_HAS_MEM_ENCRYPT arm64: mm: use untagged address to calculate page index MAINTAINERS: new entry for MPAM Driver arm_mpam: Add kunit tests for props_mismatch() arm_mpam: Add kunit test for bitmap reset arm_mpam: Add helper to reset saved mbwu state ...
2 parents 2547f79 + edde060 commit 44fc843

150 files changed

Lines changed: 6005 additions & 719 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/arch/arm64/booting.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,13 +391,13 @@ Before jumping into the kernel, the following conditions must be met:
391391
- SMCR_EL2.LEN must be initialised to the same value for all CPUs the
392392
kernel will execute on.
393393

394-
- HWFGRTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01.
394+
- HFGRTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01.
395395

396-
- HWFGWTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01.
396+
- HFGWTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01.
397397

398-
- HWFGRTR_EL2.nSMPRI_EL1 (bit 54) must be initialised to 0b01.
398+
- HFGRTR_EL2.nSMPRI_EL1 (bit 54) must be initialised to 0b01.
399399

400-
- HWFGWTR_EL2.nSMPRI_EL1 (bit 54) must be initialised to 0b01.
400+
- HFGWTR_EL2.nSMPRI_EL1 (bit 54) must be initialised to 0b01.
401401

402402
For CPUs with the Scalable Matrix Extension FA64 feature (FEAT_SME_FA64):
403403

Documentation/arch/arm64/sve.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,11 @@ The regset data starts with struct user_sve_header, containing:
402402
streaming mode and any SETREGSET of NT_ARM_SSVE will enter streaming mode
403403
if the target was not in streaming mode.
404404

405+
* On systems that do not support SVE it is permitted to use SETREGSET to
406+
write SVE_PT_REGS_FPSIMD formatted data via NT_ARM_SVE, in this case the
407+
vector length should be specified as 0. This allows streaming mode to be
408+
disabled on systems with SME but not SVE.
409+
405410
* If any register data is provided along with SVE_PT_VL_ONEXEC then the
406411
registers data will be interpreted with the current vector length, not
407412
the vector length configured for use on exec.

Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ properties:
1414
oneOf:
1515
- enum:
1616
- fsl,imx8-ddr-pmu
17+
- fsl,imx8dxl-db-pmu
1718
- fsl,imx8m-ddr-pmu
1819
- fsl,imx8mq-ddr-pmu
1920
- fsl,imx8mm-ddr-pmu
@@ -28,7 +29,10 @@ properties:
2829
- fsl,imx8mp-ddr-pmu
2930
- const: fsl,imx8m-ddr-pmu
3031
- items:
31-
- const: fsl,imx8dxl-ddr-pmu
32+
- enum:
33+
- fsl,imx8dxl-ddr-pmu
34+
- fsl,imx8qm-ddr-pmu
35+
- fsl,imx8qxp-ddr-pmu
3236
- const: fsl,imx8-ddr-pmu
3337
- items:
3438
- enum:
@@ -43,13 +47,36 @@ properties:
4347
interrupts:
4448
maxItems: 1
4549

50+
clocks:
51+
maxItems: 2
52+
53+
clock-names:
54+
items:
55+
- const: ipg
56+
- const: cnt
57+
4658
required:
4759
- compatible
4860
- reg
4961
- interrupts
5062

5163
additionalProperties: false
5264

65+
allOf:
66+
- if:
67+
properties:
68+
compatible:
69+
contains:
70+
const: fsl,imx8dxl-db-pmu
71+
then:
72+
required:
73+
- clocks
74+
- clock-names
75+
else:
76+
properties:
77+
clocks: false
78+
clock-names: false
79+
5380
examples:
5481
- |
5582
#include <dt-bindings/interrupt-controller/arm-gic.h>

MAINTAINERS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17470,6 +17470,16 @@ S: Maintained
1747017470
F: Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml
1747117471
F: drivers/video/backlight/mp3309c.c
1747217472

17473+
MPAM DRIVER
17474+
M: James Morse <james.morse@arm.com>
17475+
M: Ben Horgan <ben.horgan@arm.com>
17476+
R: Reinette Chatre <reinette.chatre@intel.com>
17477+
R: Fenghua Yu <fenghuay@nvidia.com>
17478+
S: Maintained
17479+
F: drivers/resctrl/mpam_*
17480+
F: drivers/resctrl/test_mpam_*
17481+
F: include/linux/arm_mpam.h
17482+
1747317483
MPS MP2869 DRIVER
1747417484
M: Wensheng Wang <wenswang@yeah.net>
1747517485
L: linux-hwmon@vger.kernel.org

arch/arm64/Kconfig

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ config ARM64
4747
select ARCH_HAS_SETUP_DMA_OPS
4848
select ARCH_HAS_SET_DIRECT_MAP
4949
select ARCH_HAS_SET_MEMORY
50-
select ARCH_HAS_MEM_ENCRYPT
5150
select ARCH_HAS_FORCE_DMA_UNENCRYPTED
5251
select ARCH_STACKWALK
5352
select ARCH_HAS_STRICT_KERNEL_RWX
@@ -2023,6 +2022,31 @@ config ARM64_TLB_RANGE
20232022
ARMv8.4-TLBI provides TLBI invalidation instruction that apply to a
20242023
range of input addresses.
20252024

2025+
config ARM64_MPAM
2026+
bool "Enable support for MPAM"
2027+
select ARM64_MPAM_DRIVER if EXPERT # does nothing yet
2028+
select ACPI_MPAM if ACPI
2029+
help
2030+
Memory System Resource Partitioning and Monitoring (MPAM) is an
2031+
optional extension to the Arm architecture that allows each
2032+
transaction issued to the memory system to be labelled with a
2033+
Partition identifier (PARTID) and Performance Monitoring Group
2034+
identifier (PMG).
2035+
2036+
Memory system components, such as the caches, can be configured with
2037+
policies to control how much of various physical resources (such as
2038+
memory bandwidth or cache memory) the transactions labelled with each
2039+
PARTID can consume. Depending on the capabilities of the hardware,
2040+
the PARTID and PMG can also be used as filtering criteria to measure
2041+
the memory system resource consumption of different parts of a
2042+
workload.
2043+
2044+
Use of this extension requires CPU support, support in the
2045+
Memory System Components (MSC), and a description from firmware
2046+
of where the MSCs are in the address space.
2047+
2048+
MPAM is exposed to user-space via the resctrl pseudo filesystem.
2049+
20262050
endmenu # "ARMv8.4 architectural features"
20272051

20282052
menu "ARMv8.5 architectural features"

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#error "cpucaps have overflown ARM64_CB_BIT"
2020
#endif
2121

22-
#ifndef __ASSEMBLY__
22+
#ifndef __ASSEMBLER__
2323

2424
#include <linux/stringify.h>
2525

@@ -207,7 +207,7 @@ alternative_endif
207207
#define _ALTERNATIVE_CFG(insn1, insn2, cap, cfg, ...) \
208208
alternative_insn insn1, insn2, cap, IS_ENABLED(cfg)
209209

210-
#endif /* __ASSEMBLY__ */
210+
#endif /* __ASSEMBLER__ */
211211

212212
/*
213213
* Usage: asm(ALTERNATIVE(oldinstr, newinstr, cpucap));
@@ -219,7 +219,7 @@ alternative_endif
219219
#define ALTERNATIVE(oldinstr, newinstr, ...) \
220220
_ALTERNATIVE_CFG(oldinstr, newinstr, __VA_ARGS__, 1)
221221

222-
#ifndef __ASSEMBLY__
222+
#ifndef __ASSEMBLER__
223223

224224
#include <linux/types.h>
225225

@@ -263,6 +263,6 @@ alternative_has_cap_unlikely(const unsigned long cpucap)
263263
return true;
264264
}
265265

266-
#endif /* __ASSEMBLY__ */
266+
#endif /* __ASSEMBLER__ */
267267

268268
#endif /* __ASM_ALTERNATIVE_MACROS_H */

arch/arm64/include/asm/alternative.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <asm/alternative-macros.h>
66

7-
#ifndef __ASSEMBLY__
7+
#ifndef __ASSEMBLER__
88

99
#include <linux/init.h>
1010
#include <linux/types.h>
@@ -37,5 +37,5 @@ static inline int apply_alternatives_module(void *start, size_t length)
3737
void alt_cb_patch_nops(struct alt_instr *alt, __le32 *origptr,
3838
__le32 *updptr, int nr_inst);
3939

40-
#endif /* __ASSEMBLY__ */
40+
#endif /* __ASSEMBLER__ */
4141
#endif /* __ASM_ALTERNATIVE_H */

arch/arm64/include/asm/arch_gicv3.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include <asm/sysreg.h>
1111

12-
#ifndef __ASSEMBLY__
12+
#ifndef __ASSEMBLER__
1313

1414
#include <linux/irqchip/arm-gic-common.h>
1515
#include <linux/stringify.h>
@@ -188,5 +188,5 @@ static inline bool gic_has_relaxed_pmr_sync(void)
188188
return cpus_have_cap(ARM64_HAS_GIC_PRIO_RELAXED_SYNC);
189189
}
190190

191-
#endif /* __ASSEMBLY__ */
191+
#endif /* __ASSEMBLER__ */
192192
#endif /* __ASM_ARCH_GICV3_H */

arch/arm64/include/asm/asm-extable.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/* Data fields for EX_TYPE_UACCESS_CPY */
2828
#define EX_DATA_UACCESS_WRITE BIT(0)
2929

30-
#ifdef __ASSEMBLY__
30+
#ifdef __ASSEMBLER__
3131

3232
#define __ASM_EXTABLE_RAW(insn, fixup, type, data) \
3333
.pushsection __ex_table, "a"; \
@@ -77,7 +77,7 @@
7777
__ASM_EXTABLE_RAW(\insn, \fixup, EX_TYPE_UACCESS_CPY, \uaccess_is_write)
7878
.endm
7979

80-
#else /* __ASSEMBLY__ */
80+
#else /* __ASSEMBLER__ */
8181

8282
#include <linux/stringify.h>
8383

@@ -132,6 +132,6 @@
132132
EX_DATA_REG(ADDR, addr) \
133133
")")
134134

135-
#endif /* __ASSEMBLY__ */
135+
#endif /* __ASSEMBLER__ */
136136

137137
#endif /* __ASM_ASM_EXTABLE_H */

arch/arm64/include/asm/assembler.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Copyright (C) 1996-2000 Russell King
66
* Copyright (C) 2012 ARM Ltd.
77
*/
8-
#ifndef __ASSEMBLY__
8+
#ifndef __ASSEMBLER__
99
#error "Only include this from assembly code"
1010
#endif
1111

@@ -325,14 +325,14 @@ alternative_cb_end
325325
* tcr_set_t0sz - update TCR.T0SZ so that we can load the ID map
326326
*/
327327
.macro tcr_set_t0sz, valreg, t0sz
328-
bfi \valreg, \t0sz, #TCR_T0SZ_OFFSET, #TCR_TxSZ_WIDTH
328+
bfi \valreg, \t0sz, #TCR_EL1_T0SZ_SHIFT, #TCR_EL1_T0SZ_WIDTH
329329
.endm
330330

331331
/*
332332
* tcr_set_t1sz - update TCR.T1SZ
333333
*/
334334
.macro tcr_set_t1sz, valreg, t1sz
335-
bfi \valreg, \t1sz, #TCR_T1SZ_OFFSET, #TCR_TxSZ_WIDTH
335+
bfi \valreg, \t1sz, #TCR_EL1_T1SZ_SHIFT, #TCR_EL1_T1SZ_WIDTH
336336
.endm
337337

338338
/*
@@ -371,7 +371,7 @@ alternative_endif
371371
* [start, end) with dcache line size explicitly provided.
372372
*
373373
* op: operation passed to dc instruction
374-
* domain: domain used in dsb instruciton
374+
* domain: domain used in dsb instruction
375375
* start: starting virtual address of the region
376376
* end: end virtual address of the region
377377
* linesz: dcache line size
@@ -412,7 +412,7 @@ alternative_endif
412412
* [start, end)
413413
*
414414
* op: operation passed to dc instruction
415-
* domain: domain used in dsb instruciton
415+
* domain: domain used in dsb instruction
416416
* start: starting virtual address of the region
417417
* end: end virtual address of the region
418418
* fixup: optional label to branch to on user fault
@@ -589,7 +589,7 @@ alternative_endif
589589
.macro offset_ttbr1, ttbr, tmp
590590
#if defined(CONFIG_ARM64_VA_BITS_52) && !defined(CONFIG_ARM64_LPA2)
591591
mrs \tmp, tcr_el1
592-
and \tmp, \tmp, #TCR_T1SZ_MASK
592+
and \tmp, \tmp, #TCR_EL1_T1SZ_MASK
593593
cmp \tmp, #TCR_T1SZ(VA_BITS_MIN)
594594
orr \tmp, \ttbr, #TTBR1_BADDR_4852_OFFSET
595595
csel \ttbr, \tmp, \ttbr, eq

0 commit comments

Comments
 (0)