Skip to content

Commit 342403b

Browse files
committed
Merge branches 'for-next/acpi', 'for-next/bpf', 'for-next/cpufeature', 'for-next/docs', 'for-next/kconfig', 'for-next/misc', 'for-next/perf', 'for-next/ptr-auth', 'for-next/sdei', 'for-next/smccc' and 'for-next/vdso' into for-next/core
ACPI and IORT updates (Lorenzo Pieralisi) * for-next/acpi: ACPI/IORT: Remove the unused __get_pci_rid() ACPI/IORT: Fix PMCG node single ID mapping handling ACPI: IORT: Add comments for not calling acpi_put_table() ACPI: GTDT: Put GTDT table after parsing ACPI: IORT: Add extra message "applying workaround" for off-by-1 issue ACPI/IORT: work around num_ids ambiguity Revert "ACPI/IORT: Fix 'Number of IDs' handling in iort_id_map()" ACPI/IORT: take _DMA methods into account for named components BPF JIT optimisations for immediate value generation (Luke Nelson) * for-next/bpf: bpf, arm64: Optimize ADD,SUB,JMP BPF_K using arm64 add/sub immediates bpf, arm64: Optimize AND,OR,XOR,JSET BPF_K using arm64 logical immediates arm64: insn: Fix two bugs in encoding 32-bit logical immediates Addition of new CPU ID register fields and removal of some benign sanity checks (Anshuman Khandual and others) * for-next/cpufeature: (27 commits) KVM: arm64: Check advertised Stage-2 page size capability arm64/cpufeature: Add get_arm64_ftr_reg_nowarn() arm64/cpuinfo: Add ID_MMFR4_EL1 into the cpuinfo_arm64 context arm64/cpufeature: Add remaining feature bits in ID_AA64PFR1 register arm64/cpufeature: Add remaining feature bits in ID_AA64PFR0 register arm64/cpufeature: Add remaining feature bits in ID_AA64ISAR0 register arm64/cpufeature: Add remaining feature bits in ID_MMFR4 register arm64/cpufeature: Add remaining feature bits in ID_PFR0 register arm64/cpufeature: Introduce ID_MMFR5 CPU register arm64/cpufeature: Introduce ID_DFR1 CPU register arm64/cpufeature: Introduce ID_PFR2 CPU register arm64/cpufeature: Make doublelock a signed feature in ID_AA64DFR0 arm64/cpufeature: Drop TraceFilt feature exposure from ID_DFR0 register arm64/cpufeature: Add explicit ftr_id_isar0[] for ID_ISAR0 register arm64/cpufeature: Drop open encodings while extracting parange arm64/cpufeature: Validate hypervisor capabilities during CPU hotplug arm64: cpufeature: Group indexed system register definitions by name arm64: cpufeature: Extend comment to describe absence of field info arm64: drop duplicate definitions of ID_AA64MMFR0_TGRAN constants arm64: cpufeature: Add an overview comment for the cpufeature framework ... Minor documentation tweaks for silicon errata and booting requirements (Rob Herring and Will Deacon) * for-next/docs: arm64: silicon-errata.rst: Sort the Cortex-A55 entries arm64: docs: Mandate that the I-cache doesn't hold stale kernel text Minor Kconfig cleanups (Geert Uytterhoeven) * for-next/kconfig: arm64: cpufeature: Add "or" to mitigations for multiple errata arm64: Sort vendor-specific errata Miscellaneous updates (Ard Biesheuvel and others) * for-next/misc: arm64: mm: Add asid_gen_match() helper arm64: stacktrace: Factor out some common code into on_stack() arm64: Call debug_traps_init() from trap_init() to help early kgdb arm64: cacheflush: Fix KGDB trap detection arm64/cpuinfo: Move device_initcall() near cpuinfo_regs_init() arm64: kexec_file: print appropriate variable arm: mm: use __pfn_to_section() to get mem_section arm64: Reorder the macro arguments in the copy routines efi/libstub/arm64: align PE/COFF sections to segment alignment KVM: arm64: Drop PTE_S2_MEMATTR_MASK arm64/kernel: Fix range on invalidating dcache for boot page tables arm64: set TEXT_OFFSET to 0x0 in preparation for removing it entirely arm64: lib: Consistently enable crc32 extension arm64/mm: Use phys_to_page() to access pgtable memory arm64: smp: Make cpus_stuck_in_kernel static arm64: entry: remove unneeded semicolon in el1_sync_handler() arm64/kernel: vmlinux.lds: drop redundant discard/keep macros arm64: drop GZFLAGS definition and export arm64: kexec_file: Avoid temp buffer for RNG seed arm64: rename stext to primary_entry Perf PMU driver updates (Tang Bin and others) * for-next/perf: pmu/smmuv3: Clear IRQ affinity hint on device removal drivers/perf: hisi: Permit modular builds of HiSilicon uncore drivers drivers/perf: hisi: Fix typo in events attribute array drivers/perf: arm_spe_pmu: Avoid duplicate printouts drivers/perf: arm_dsu_pmu: Avoid duplicate printouts Pointer authentication updates and support for vmcoreinfo (Amit Daniel Kachhap and Mark Rutland) * for-next/ptr-auth: Documentation/vmcoreinfo: Add documentation for 'KERNELPACMASK' arm64/crash_core: Export KERNELPACMASK in vmcoreinfo arm64: simplify ptrauth initialization arm64: remove ptrauth_keys_install_kernel sync arg SDEI cleanup and non-critical fixes (James Morse and others) * for-next/sdei: firmware: arm_sdei: Document the motivation behind these set_fs() calls firmware: arm_sdei: remove unused interfaces firmware: arm_sdei: Put the SDEI table after using it firmware: arm_sdei: Drop check for /firmware/ node and always register driver SMCCC updates and refactoring (Sudeep Holla) * for-next/smccc: firmware: smccc: Fix missing prototype warning for arm_smccc_version_init firmware: smccc: Add function to fetch SMCCC version firmware: smccc: Refactor SMCCC specific bits into separate file firmware: smccc: Drop smccc_version enum and use ARM_SMCCC_VERSION_1_x instead firmware: smccc: Add the definition for SMCCCv1.2 version/error codes firmware: smccc: Update link to latest SMCCC specification firmware: smccc: Add HAVE_ARM_SMCCC_DISCOVERY to identify SMCCC v1.1 and above vDSO cleanup and non-critical fixes (Mark Rutland and Vincenzo Frascino) * for-next/vdso: arm64: vdso: Add --eh-frame-hdr to ldflags arm64: vdso: use consistent 'map' nomenclature arm64: vdso: use consistent 'abi' nomenclature arm64: vdso: simplify arch_vdso_type ifdeffery arm64: vdso: remove aarch32_vdso_pages[] arm64: vdso: Add '-Bsymbolic' to ldflags
11 parents 09cda9a + fd868f1 + b130a8f + 184dbc1 + 357dd8a + 4fc9225 + 10f6cd2 + c0fc00e + 472de63 + 269fd61 + 7e9f5e6 commit 342403b

Some content is hidden

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

74 files changed

+1075
-600
lines changed

Documentation/admin-guide/kdump/vmcoreinfo.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,12 @@ KERNELOFFSET
393393
The kernel randomization offset. Used to compute the page offset. If
394394
KASLR is disabled, this value is zero.
395395

396+
KERNELPACMASK
397+
-------------
398+
399+
The mask to extract the Pointer Authentication Code from a kernel virtual
400+
address.
401+
396402
arm
397403
===
398404

Documentation/arm64/booting.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ Before jumping into the kernel, the following conditions must be met:
173173
- Caches, MMUs
174174

175175
The MMU must be off.
176-
Instruction cache may be on or off.
176+
The instruction cache may be on or off, and must not hold any stale
177+
entries corresponding to the loaded kernel image.
177178
The address range corresponding to the loaded kernel image must be
178179
cleaned to the PoC. In the presence of a system cache or other
179180
coherent masters with caches enabled, this will typically require

Documentation/arm64/silicon-errata.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ stable kernels.
6464
+----------------+-----------------+-----------------+-----------------------------+
6565
| ARM | Cortex-A53 | #843419 | ARM64_ERRATUM_843419 |
6666
+----------------+-----------------+-----------------+-----------------------------+
67+
| ARM | Cortex-A55 | #1024718 | ARM64_ERRATUM_1024718 |
68+
+----------------+-----------------+-----------------+-----------------------------+
69+
| ARM | Cortex-A55 | #1530923 | ARM64_ERRATUM_1530923 |
70+
+----------------+-----------------+-----------------+-----------------------------+
6771
| ARM | Cortex-A57 | #832075 | ARM64_ERRATUM_832075 |
6872
+----------------+-----------------+-----------------+-----------------------------+
6973
| ARM | Cortex-A57 | #852523 | N/A |
@@ -78,8 +82,6 @@ stable kernels.
7882
+----------------+-----------------+-----------------+-----------------------------+
7983
| ARM | Cortex-A73 | #858921 | ARM64_ERRATUM_858921 |
8084
+----------------+-----------------+-----------------+-----------------------------+
81-
| ARM | Cortex-A55 | #1024718 | ARM64_ERRATUM_1024718 |
82-
+----------------+-----------------+-----------------+-----------------------------+
8385
| ARM | Cortex-A76 | #1188873,1418040| ARM64_ERRATUM_1418040 |
8486
+----------------+-----------------+-----------------+-----------------------------+
8587
| ARM | Cortex-A76 | #1165522 | ARM64_ERRATUM_1165522 |
@@ -88,8 +90,6 @@ stable kernels.
8890
+----------------+-----------------+-----------------+-----------------------------+
8991
| ARM | Cortex-A76 | #1463225 | ARM64_ERRATUM_1463225 |
9092
+----------------+-----------------+-----------------+-----------------------------+
91-
| ARM | Cortex-A55 | #1530923 | ARM64_ERRATUM_1530923 |
92-
+----------------+-----------------+-----------------+-----------------------------+
9393
| ARM | Neoverse-N1 | #1188873,1418040| ARM64_ERRATUM_1418040 |
9494
+----------------+-----------------+-----------------+-----------------------------+
9595
| ARM | Neoverse-N1 | #1349291 | N/A |

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15474,6 +15474,15 @@ M: Nicolas Pitre <[email protected]>
1547415474
S: Odd Fixes
1547515475
F: drivers/net/ethernet/smsc/smc91x.*
1547615476

15477+
SECURE MONITOR CALL(SMC) CALLING CONVENTION (SMCCC)
15478+
M: Mark Rutland <[email protected]>
15479+
M: Lorenzo Pieralisi <[email protected]>
15480+
M: Sudeep Holla <[email protected]>
15481+
15482+
S: Maintained
15483+
F: drivers/firmware/smccc/
15484+
F: include/linux/arm-smccc.h
15485+
1547715486
SMIA AND SMIA++ IMAGE SENSOR DRIVER
1547815487
M: Sakari Ailus <[email protected]>
1547915488

arch/arm64/Kconfig

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,9 @@ config ARM64_ERRATUM_1530923
553553

554554
If unsure, say Y.
555555

556+
config ARM64_WORKAROUND_REPEAT_TLBI
557+
bool
558+
556559
config ARM64_ERRATUM_1286807
557560
bool "Cortex-A76: Modification of the translation table for a virtual address might lead to read-after-read ordering violation"
558561
default y
@@ -694,6 +697,35 @@ config CAVIUM_TX2_ERRATUM_219
694697

695698
If unsure, say Y.
696699

700+
config FUJITSU_ERRATUM_010001
701+
bool "Fujitsu-A64FX erratum E#010001: Undefined fault may occur wrongly"
702+
default y
703+
help
704+
This option adds a workaround for Fujitsu-A64FX erratum E#010001.
705+
On some variants of the Fujitsu-A64FX cores ver(1.0, 1.1), memory
706+
accesses may cause undefined fault (Data abort, DFSC=0b111111).
707+
This fault occurs under a specific hardware condition when a
708+
load/store instruction performs an address translation using:
709+
case-1 TTBR0_EL1 with TCR_EL1.NFD0 == 1.
710+
case-2 TTBR0_EL2 with TCR_EL2.NFD0 == 1.
711+
case-3 TTBR1_EL1 with TCR_EL1.NFD1 == 1.
712+
case-4 TTBR1_EL2 with TCR_EL2.NFD1 == 1.
713+
714+
The workaround is to ensure these bits are clear in TCR_ELx.
715+
The workaround only affects the Fujitsu-A64FX.
716+
717+
If unsure, say Y.
718+
719+
config HISILICON_ERRATUM_161600802
720+
bool "Hip07 161600802: Erroneous redistributor VLPI base"
721+
default y
722+
help
723+
The HiSilicon Hip07 SoC uses the wrong redistributor base
724+
when issued ITS commands such as VMOVP and VMAPP, and requires
725+
a 128kB offset to be applied to the target address in this commands.
726+
727+
If unsure, say Y.
728+
697729
config QCOM_FALKOR_ERRATUM_1003
698730
bool "Falkor E1003: Incorrect translation due to ASID change"
699731
default y
@@ -705,9 +737,6 @@ config QCOM_FALKOR_ERRATUM_1003
705737
is unchanged. Work around the erratum by invalidating the walk cache
706738
entries for the trampoline before entering the kernel proper.
707739

708-
config ARM64_WORKAROUND_REPEAT_TLBI
709-
bool
710-
711740
config QCOM_FALKOR_ERRATUM_1009
712741
bool "Falkor E1009: Prematurely complete a DSB after a TLBI"
713742
default y
@@ -729,25 +758,6 @@ config QCOM_QDF2400_ERRATUM_0065
729758

730759
If unsure, say Y.
731760

732-
config SOCIONEXT_SYNQUACER_PREITS
733-
bool "Socionext Synquacer: Workaround for GICv3 pre-ITS"
734-
default y
735-
help
736-
Socionext Synquacer SoCs implement a separate h/w block to generate
737-
MSI doorbell writes with non-zero values for the device ID.
738-
739-
If unsure, say Y.
740-
741-
config HISILICON_ERRATUM_161600802
742-
bool "Hip07 161600802: Erroneous redistributor VLPI base"
743-
default y
744-
help
745-
The HiSilicon Hip07 SoC uses the wrong redistributor base
746-
when issued ITS commands such as VMOVP and VMAPP, and requires
747-
a 128kB offset to be applied to the target address in this commands.
748-
749-
If unsure, say Y.
750-
751761
config QCOM_FALKOR_ERRATUM_E1041
752762
bool "Falkor E1041: Speculative instruction fetches might cause errant memory access"
753763
default y
@@ -758,22 +768,12 @@ config QCOM_FALKOR_ERRATUM_E1041
758768

759769
If unsure, say Y.
760770

761-
config FUJITSU_ERRATUM_010001
762-
bool "Fujitsu-A64FX erratum E#010001: Undefined fault may occur wrongly"
771+
config SOCIONEXT_SYNQUACER_PREITS
772+
bool "Socionext Synquacer: Workaround for GICv3 pre-ITS"
763773
default y
764774
help
765-
This option adds a workaround for Fujitsu-A64FX erratum E#010001.
766-
On some variants of the Fujitsu-A64FX cores ver(1.0, 1.1), memory
767-
accesses may cause undefined fault (Data abort, DFSC=0b111111).
768-
This fault occurs under a specific hardware condition when a
769-
load/store instruction performs an address translation using:
770-
case-1 TTBR0_EL1 with TCR_EL1.NFD0 == 1.
771-
case-2 TTBR0_EL2 with TCR_EL2.NFD0 == 1.
772-
case-3 TTBR1_EL1 with TCR_EL1.NFD1 == 1.
773-
case-4 TTBR1_EL2 with TCR_EL2.NFD1 == 1.
774-
775-
The workaround is to ensure these bits are clear in TCR_ELx.
776-
The workaround only affects the Fujitsu-A64FX.
775+
Socionext Synquacer SoCs implement a separate h/w block to generate
776+
MSI doorbell writes with non-zero values for the device ID.
777777

778778
If unsure, say Y.
779779

arch/arm64/Makefile

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

1313
LDFLAGS_vmlinux :=--no-undefined -X
1414
CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
15-
GZFLAGS :=-9
1615

1716
ifeq ($(CONFIG_RELOCATABLE), y)
1817
# Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour
@@ -118,7 +117,7 @@ TEXT_OFFSET := $(shell awk "BEGIN {srand(); printf \"0x%06x\n\", \
118117
int(2 * 1024 * 1024 / (2 ^ $(CONFIG_ARM64_PAGE_SHIFT)) * \
119118
rand()) * (2 ^ $(CONFIG_ARM64_PAGE_SHIFT))}")
120119
else
121-
TEXT_OFFSET := 0x00080000
120+
TEXT_OFFSET := 0x0
122121
endif
123122

124123
ifeq ($(CONFIG_KASAN_SW_TAGS), y)
@@ -131,7 +130,7 @@ KBUILD_CFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
131130
KBUILD_CPPFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
132131
KBUILD_AFLAGS += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
133132

134-
export TEXT_OFFSET GZFLAGS
133+
export TEXT_OFFSET
135134

136135
core-y += arch/arm64/
137136
libs-y := arch/arm64/lib/ $(libs-y)

arch/arm64/include/asm/asm_pointer_auth.h

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,58 @@ alternative_if ARM64_HAS_GENERIC_AUTH
3939
alternative_else_nop_endif
4040
.endm
4141

42-
.macro ptrauth_keys_install_kernel tsk, sync, tmp1, tmp2, tmp3
43-
alternative_if ARM64_HAS_ADDRESS_AUTH
42+
.macro __ptrauth_keys_install_kernel_nosync tsk, tmp1, tmp2, tmp3
4443
mov \tmp1, #THREAD_KEYS_KERNEL
4544
add \tmp1, \tsk, \tmp1
4645
ldp \tmp2, \tmp3, [\tmp1, #PTRAUTH_KERNEL_KEY_APIA]
4746
msr_s SYS_APIAKEYLO_EL1, \tmp2
4847
msr_s SYS_APIAKEYHI_EL1, \tmp3
49-
.if \sync == 1
48+
.endm
49+
50+
.macro ptrauth_keys_install_kernel_nosync tsk, tmp1, tmp2, tmp3
51+
alternative_if ARM64_HAS_ADDRESS_AUTH
52+
__ptrauth_keys_install_kernel_nosync \tsk, \tmp1, \tmp2, \tmp3
53+
alternative_else_nop_endif
54+
.endm
55+
56+
.macro ptrauth_keys_install_kernel tsk, tmp1, tmp2, tmp3
57+
alternative_if ARM64_HAS_ADDRESS_AUTH
58+
__ptrauth_keys_install_kernel_nosync \tsk, \tmp1, \tmp2, \tmp3
5059
isb
51-
.endif
5260
alternative_else_nop_endif
5361
.endm
5462

63+
.macro __ptrauth_keys_init_cpu tsk, tmp1, tmp2, tmp3
64+
mrs \tmp1, id_aa64isar1_el1
65+
ubfx \tmp1, \tmp1, #ID_AA64ISAR1_APA_SHIFT, #8
66+
cbz \tmp1, .Lno_addr_auth\@
67+
mov_q \tmp1, (SCTLR_ELx_ENIA | SCTLR_ELx_ENIB | \
68+
SCTLR_ELx_ENDA | SCTLR_ELx_ENDB)
69+
mrs \tmp2, sctlr_el1
70+
orr \tmp2, \tmp2, \tmp1
71+
msr sctlr_el1, \tmp2
72+
__ptrauth_keys_install_kernel_nosync \tsk, \tmp1, \tmp2, \tmp3
73+
isb
74+
.Lno_addr_auth\@:
75+
.endm
76+
77+
.macro ptrauth_keys_init_cpu tsk, tmp1, tmp2, tmp3
78+
alternative_if_not ARM64_HAS_ADDRESS_AUTH
79+
b .Lno_addr_auth\@
80+
alternative_else_nop_endif
81+
__ptrauth_keys_init_cpu \tsk, \tmp1, \tmp2, \tmp3
82+
.Lno_addr_auth\@:
83+
.endm
84+
5585
#else /* CONFIG_ARM64_PTR_AUTH */
5686

5787
.macro ptrauth_keys_install_user tsk, tmp1, tmp2, tmp3
5888
.endm
5989

60-
.macro ptrauth_keys_install_kernel tsk, sync, tmp1, tmp2, tmp3
90+
.macro ptrauth_keys_install_kernel_nosync tsk, tmp1, tmp2, tmp3
91+
.endm
92+
93+
.macro ptrauth_keys_install_kernel tsk, tmp1, tmp2, tmp3
6194
.endm
6295

6396
#endif /* CONFIG_ARM64_PTR_AUTH */

arch/arm64/include/asm/cacheflush.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static inline void flush_icache_range(unsigned long start, unsigned long end)
7979
* IPI all online CPUs so that they undergo a context synchronization
8080
* event and are forced to refetch the new instructions.
8181
*/
82-
#ifdef CONFIG_KGDB
82+
8383
/*
8484
* KGDB performs cache maintenance with interrupts disabled, so we
8585
* will deadlock trying to IPI the secondary CPUs. In theory, we can
@@ -89,9 +89,9 @@ static inline void flush_icache_range(unsigned long start, unsigned long end)
8989
* the patching operation, so we don't need extra IPIs here anyway.
9090
* In which case, add a KGDB-specific bodge and return early.
9191
*/
92-
if (kgdb_connected && irqs_disabled())
92+
if (in_dbg_master())
9393
return;
94-
#endif
94+
9595
kick_all_cpus_sync();
9696
}
9797

arch/arm64/include/asm/compiler.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#ifndef __ASM_COMPILER_H
33
#define __ASM_COMPILER_H
44

5-
#if defined(CONFIG_ARM64_PTR_AUTH)
6-
75
/*
86
* The EL0/EL1 pointer bits used by a pointer authentication code.
97
* This is dependent on TBI0/TBI1 being enabled, or bits 63:56 would also apply.
@@ -19,6 +17,4 @@
1917
#define __builtin_return_address(val) \
2018
(void *)(ptrauth_clear_pac((unsigned long)__builtin_return_address(val)))
2119

22-
#endif /* CONFIG_ARM64_PTR_AUTH */
23-
2420
#endif /* __ASM_COMPILER_H */

arch/arm64/include/asm/cpu.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ struct cpuinfo_arm64 {
3333
u64 reg_id_aa64zfr0;
3434

3535
u32 reg_id_dfr0;
36+
u32 reg_id_dfr1;
3637
u32 reg_id_isar0;
3738
u32 reg_id_isar1;
3839
u32 reg_id_isar2;
@@ -44,8 +45,11 @@ struct cpuinfo_arm64 {
4445
u32 reg_id_mmfr1;
4546
u32 reg_id_mmfr2;
4647
u32 reg_id_mmfr3;
48+
u32 reg_id_mmfr4;
49+
u32 reg_id_mmfr5;
4750
u32 reg_id_pfr0;
4851
u32 reg_id_pfr1;
52+
u32 reg_id_pfr2;
4953

5054
u32 reg_mvfr0;
5155
u32 reg_mvfr1;

0 commit comments

Comments
 (0)