Skip to content

Commit 4557062

Browse files
committed
Merge branches 'for-next/misc', 'for-next/vmcoreinfo', 'for-next/cpufeature', 'for-next/acpi', 'for-next/perf', 'for-next/timens', 'for-next/msi-iommu' and 'for-next/trivial' into for-next/core
* for-next/misc: : Miscellaneous fixes and cleanups arm64: use IRQ_STACK_SIZE instead of THREAD_SIZE for irq stack arm64/mm: save memory access in check_and_switch_context() fast switch path recordmcount: only record relocation of type R_AARCH64_CALL26 on arm64. arm64: Reserve HWCAP2_MTE as (1 << 18) arm64/entry: deduplicate SW PAN entry/exit routines arm64: s/AMEVTYPE/AMEVTYPER arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs arm64: stacktrace: Move export for save_stack_trace_tsk() smccc: Make constants available to assembly arm64/mm: Redefine CONT_{PTE, PMD}_SHIFT arm64/defconfig: Enable CONFIG_KEXEC_FILE arm64: Document sysctls for emulated deprecated instructions arm64/panic: Unify all three existing notifier blocks arm64/module: Optimize module load time by optimizing PLT counting * for-next/vmcoreinfo: : Export the virtual and physical address sizes in vmcoreinfo arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo * for-next/cpufeature: : CPU feature handling cleanups arm64/cpufeature: Validate feature bits spacing in arm64_ftr_regs[] arm64/cpufeature: Replace all open bits shift encodings with macros arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR2 register arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR1 register arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR0 register * for-next/acpi: : ACPI updates for arm64 arm64/acpi: disallow writeable AML opregion mapping for EFI code regions arm64/acpi: disallow AML memory opregions to access kernel memory * for-next/perf: : perf updates for arm64 arm64: perf: Expose some new events via sysfs tools headers UAPI: Update tools's copy of linux/perf_event.h arm64: perf: Add cap_user_time_short perf: Add perf_event_mmap_page::cap_user_time_short ABI arm64: perf: Only advertise cap_user_time for arch_timer arm64: perf: Implement correct cap_user_time time/sched_clock: Use raw_read_seqcount_latch() sched_clock: Expose struct clock_read_data arm64: perf: Correct the event index in sysfs perf/smmuv3: To simplify code for ioremap page in pmcg * for-next/timens: : Time namespace support for arm64 arm64: enable time namespace support arm64/vdso: Restrict splitting VVAR VMA arm64/vdso: Handle faults on timens page arm64/vdso: Add time namespace page arm64/vdso: Zap vvar pages when switching to a time namespace arm64/vdso: use the fault callback to map vvar pages * for-next/msi-iommu: : Make the MSI/IOMMU input/output ID translation PCI agnostic, augment the : MSI/IOMMU ACPI/OF ID mapping APIs to accept an input ID bus-specific parameter : and apply the resulting changes to the device ID space provided by the : Freescale FSL bus bus: fsl-mc: Add ACPI support for fsl-mc bus/fsl-mc: Refactor the MSI domain creation in the DPRC driver of/irq: Make of_msi_map_rid() PCI bus agnostic of/irq: make of_msi_map_get_device_domain() bus agnostic dt-bindings: arm: fsl: Add msi-map device-tree binding for fsl-mc bus of/device: Add input id to of_dma_configure() of/iommu: Make of_map_rid() PCI agnostic ACPI/IORT: Add an input ID to acpi_dma_configure() ACPI/IORT: Remove useless PCI bus walk ACPI/IORT: Make iort_msi_map_rid() PCI agnostic ACPI/IORT: Make iort_get_device_domain IRQ domain agnostic ACPI/IORT: Make iort_match_node_callback walk the ACPI namespace for NC * for-next/trivial: : Trivial fixes arm64: sigcontext.h: delete duplicated word arm64: ptrace.h: delete duplicated word arm64: pgtable-hwdef.h: delete duplicated words
8 parents 338c11e + bbdbc11 + c6c83d7 + 325f558 + 55fdc1f + 9614cc5 + 6305166 + 1a9ea25 commit 4557062

Some content is hidden

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

45 files changed

+1020
-338
lines changed

Documentation/admin-guide/kdump/vmcoreinfo.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ It exists in the sparse memory mapping model, and it is also somewhat
9393
similar to the mem_map variable, both of them are used to translate an
9494
address.
9595

96+
MAX_PHYSMEM_BITS
97+
----------------
98+
99+
Defines the maximum supported physical address space memory.
100+
96101
page
97102
----
98103

@@ -399,6 +404,17 @@ KERNELPACMASK
399404
The mask to extract the Pointer Authentication Code from a kernel virtual
400405
address.
401406

407+
TCR_EL1.T1SZ
408+
------------
409+
410+
Indicates the size offset of the memory region addressed by TTBR1_EL1.
411+
The region size is 2^(64-T1SZ) bytes.
412+
413+
TTBR1_EL1 is the table base address register specified by ARMv8-A
414+
architecture which is used to lookup the page-tables for the Virtual
415+
addresses in the higher VA range (refer to ARMv8 ARM document for
416+
more details).
417+
402418
arm
403419
===
404420

Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ Documentation/devicetree/bindings/iommu/iommu.txt.
2828
For arm-smmu binding, see:
2929
Documentation/devicetree/bindings/iommu/arm,smmu.yaml.
3030

31+
The MSI writes are accompanied by sideband data which is derived from the ICID.
32+
The msi-map property is used to associate the devices with both the ITS
33+
controller and the sideband data which accompanies the writes.
34+
35+
For generic MSI bindings, see
36+
Documentation/devicetree/bindings/interrupt-controller/msi.txt.
37+
38+
For GICv3 and GIC ITS bindings, see:
39+
Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml.
40+
3141
Required properties:
3242

3343
- compatible
@@ -49,11 +59,6 @@ Required properties:
4959
region may not be present in some scenarios, such
5060
as in the device tree presented to a virtual machine.
5161

52-
- msi-parent
53-
Value type: <phandle>
54-
Definition: Must be present and point to the MSI controller node
55-
handling message interrupts for the MC.
56-
5762
- ranges
5863
Value type: <prop-encoded-array>
5964
Definition: A standard property. Defines the mapping between the child
@@ -119,6 +124,28 @@ Optional properties:
119124
associated with the listed IOMMU, with the iommu-specifier
120125
(i - icid-base + iommu-base).
121126

127+
- msi-map: Maps an ICID to a GIC ITS and associated msi-specifier
128+
data.
129+
130+
The property is an arbitrary number of tuples of
131+
(icid-base,gic-its,msi-base,length).
132+
133+
Any ICID in the interval [icid-base, icid-base + length) is
134+
associated with the listed GIC ITS, with the msi-specifier
135+
(i - icid-base + msi-base).
136+
137+
Deprecated properties:
138+
139+
- msi-parent
140+
Value type: <phandle>
141+
Definition: Describes the MSI controller node handling message
142+
interrupts for the MC. When there is no translation
143+
between the ICID and deviceID this property can be used
144+
to describe the MSI controller used by the devices on the
145+
mc-bus.
146+
The use of this property for mc-bus is deprecated. Please
147+
use msi-map.
148+
122149
Example:
123150

124151
smmu: iommu@5000000 {
@@ -128,13 +155,24 @@ Example:
128155
...
129156
};
130157

158+
gic: interrupt-controller@6000000 {
159+
compatible = "arm,gic-v3";
160+
...
161+
}
162+
its: gic-its@6020000 {
163+
compatible = "arm,gic-v3-its";
164+
msi-controller;
165+
...
166+
};
167+
131168
fsl_mc: fsl-mc@80c000000 {
132169
compatible = "fsl,qoriq-mc";
133170
reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */
134171
<0x00000000 0x08340000 0 0x40000>; /* MC control reg */
135-
msi-parent = <&its>;
136172
/* define map for ICIDs 23-64 */
137173
iommu-map = <23 &smmu 23 41>;
174+
/* define msi map for ICIDs 23-64 */
175+
msi-map = <23 &its 23 41>;
138176
#address-cells = <3>;
139177
#size-cells = <1>;
140178

arch/arm64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ config ARM64
118118
select GENERIC_STRNLEN_USER
119119
select GENERIC_TIME_VSYSCALL
120120
select GENERIC_GETTIMEOFDAY
121+
select GENERIC_VDSO_TIME_NS
121122
select HANDLE_DOMAIN_IRQ
122123
select HARDIRQS_SW_RESEND
123124
select HAVE_PCI

arch/arm64/include/asm/acpi.h

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,7 @@
4747
pgprot_t __acpi_get_mem_attribute(phys_addr_t addr);
4848

4949
/* ACPI table mapping after acpi_permanent_mmap is set */
50-
static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
51-
acpi_size size)
52-
{
53-
/* For normal memory we already have a cacheable mapping. */
54-
if (memblock_is_map_memory(phys))
55-
return (void __iomem *)__phys_to_virt(phys);
56-
57-
/*
58-
* We should still honor the memory's attribute here because
59-
* crash dump kernel possibly excludes some ACPI (reclaim)
60-
* regions from memblock list.
61-
*/
62-
return __ioremap(phys, size, __acpi_get_mem_attribute(phys));
63-
}
50+
void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size);
6451
#define acpi_os_ioremap acpi_os_ioremap
6552

6653
typedef u64 phys_cpuid_t;

arch/arm64/include/asm/perf_event.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,40 @@
7272
#define ARMV8_PMUV3_PERFCTR_LL_CACHE_RD 0x36
7373
#define ARMV8_PMUV3_PERFCTR_LL_CACHE_MISS_RD 0x37
7474
#define ARMV8_PMUV3_PERFCTR_REMOTE_ACCESS_RD 0x38
75+
#define ARMV8_PMUV3_PERFCTR_L1D_CACHE_LMISS_RD 0x39
76+
#define ARMV8_PMUV3_PERFCTR_OP_RETIRED 0x3A
77+
#define ARMV8_PMUV3_PERFCTR_OP_SPEC 0x3B
78+
#define ARMV8_PMUV3_PERFCTR_STALL 0x3C
79+
#define ARMV8_PMUV3_PERFCTR_STALL_SLOT_BACKEND 0x3D
80+
#define ARMV8_PMUV3_PERFCTR_STALL_SLOT_FRONTEND 0x3E
81+
#define ARMV8_PMUV3_PERFCTR_STALL_SLOT 0x3F
7582

7683
/* Statistical profiling extension microarchitectural events */
7784
#define ARMV8_SPE_PERFCTR_SAMPLE_POP 0x4000
7885
#define ARMV8_SPE_PERFCTR_SAMPLE_FEED 0x4001
7986
#define ARMV8_SPE_PERFCTR_SAMPLE_FILTRATE 0x4002
8087
#define ARMV8_SPE_PERFCTR_SAMPLE_COLLISION 0x4003
8188

89+
/* AMUv1 architecture events */
90+
#define ARMV8_AMU_PERFCTR_CNT_CYCLES 0x4004
91+
#define ARMV8_AMU_PERFCTR_STALL_BACKEND_MEM 0x4005
92+
93+
/* long-latency read miss events */
94+
#define ARMV8_PMUV3_PERFCTR_L1I_CACHE_LMISS 0x4006
95+
#define ARMV8_PMUV3_PERFCTR_L2D_CACHE_LMISS_RD 0x4009
96+
#define ARMV8_PMUV3_PERFCTR_L2I_CACHE_LMISS 0x400A
97+
#define ARMV8_PMUV3_PERFCTR_L3D_CACHE_LMISS_RD 0x400B
98+
99+
/* additional latency from alignment events */
100+
#define ARMV8_PMUV3_PERFCTR_LDST_ALIGN_LAT 0x4020
101+
#define ARMV8_PMUV3_PERFCTR_LD_ALIGN_LAT 0x4021
102+
#define ARMV8_PMUV3_PERFCTR_ST_ALIGN_LAT 0x4022
103+
104+
/* Armv8.5 Memory Tagging Extension events */
105+
#define ARMV8_MTE_PERFCTR_MEM_ACCESS_CHECKED 0x4024
106+
#define ARMV8_MTE_PERFCTR_MEM_ACCESS_CHECKED_RD 0x4025
107+
#define ARMV8_MTE_PERFCTR_MEM_ACCESS_CHECKED_WR 0x4026
108+
82109
/* ARMv8 recommended implementation defined event types */
83110
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_RD 0x40
84111
#define ARMV8_IMPDEF_PERFCTR_L1D_CACHE_WR 0x41

arch/arm64/include/asm/pgtable-hwdef.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* Size mapped by an entry at level n ( 0 <= n <= 3)
3030
* We map (PAGE_SHIFT - 3) at all translation levels and PAGE_SHIFT bits
3131
* in the final page. The maximum number of translation levels supported by
32-
* the architecture is 4. Hence, starting at at level n, we have further
32+
* the architecture is 4. Hence, starting at level n, we have further
3333
* ((4 - n) - 1) levels of translation excluding the offset within the page.
3434
* So, the total number of bits mapped by an entry at level n is :
3535
*
@@ -98,7 +98,7 @@
9898
#define CONT_PMDS (1 << (CONT_PMD_SHIFT - PMD_SHIFT))
9999
#define CONT_PMD_SIZE (CONT_PMDS * PMD_SIZE)
100100
#define CONT_PMD_MASK (~(CONT_PMD_SIZE - 1))
101-
/* the the numerical offset of the PTE within a range of CONT_PTES */
101+
/* the numerical offset of the PTE within a range of CONT_PTES */
102102
#define CONT_RANGE_OFFSET(addr) (((addr)>>PAGE_SHIFT)&(CONT_PTES-1))
103103

104104
/*
@@ -216,6 +216,7 @@
216216
#define TCR_TxSZ(x) (TCR_T0SZ(x) | TCR_T1SZ(x))
217217
#define TCR_TxSZ_WIDTH 6
218218
#define TCR_T0SZ_MASK (((UL(1) << TCR_TxSZ_WIDTH) - 1) << TCR_T0SZ_OFFSET)
219+
#define TCR_T1SZ_MASK (((UL(1) << TCR_TxSZ_WIDTH) - 1) << TCR_T1SZ_OFFSET)
219220

220221
#define TCR_EPD0_SHIFT 7
221222
#define TCR_EPD0_MASK (UL(1) << TCR_EPD0_SHIFT)

arch/arm64/include/asm/ptrace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*
2828
* Some code sections either automatically switch back to PSR.I or explicitly
2929
* require to not use priority masking. If bit GIC_PRIO_PSR_I_SET is included
30-
* in the the priority mask, it indicates that PSR.I should be set and
30+
* in the priority mask, it indicates that PSR.I should be set and
3131
* interrupt disabling temporarily does not rely on IRQ priorities.
3232
*/
3333
#define GIC_PRIO_IRQON 0xe0

arch/arm64/include/asm/sysreg.h

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,9 @@
706706
#define ID_AA64ZFR0_SVEVER_SVE2 0x1
707707

708708
/* id_aa64mmfr0 */
709+
#define ID_AA64MMFR0_ECV_SHIFT 60
710+
#define ID_AA64MMFR0_FGT_SHIFT 56
711+
#define ID_AA64MMFR0_EXS_SHIFT 44
709712
#define ID_AA64MMFR0_TGRAN4_2_SHIFT 40
710713
#define ID_AA64MMFR0_TGRAN64_2_SHIFT 36
711714
#define ID_AA64MMFR0_TGRAN16_2_SHIFT 32
@@ -734,6 +737,10 @@
734737
#endif
735738

736739
/* id_aa64mmfr1 */
740+
#define ID_AA64MMFR1_ETS_SHIFT 36
741+
#define ID_AA64MMFR1_TWED_SHIFT 32
742+
#define ID_AA64MMFR1_XNX_SHIFT 28
743+
#define ID_AA64MMFR1_SPECSEI_SHIFT 24
737744
#define ID_AA64MMFR1_PAN_SHIFT 20
738745
#define ID_AA64MMFR1_LOR_SHIFT 16
739746
#define ID_AA64MMFR1_HPD_SHIFT 12
@@ -746,15 +753,23 @@
746753

747754
/* id_aa64mmfr2 */
748755
#define ID_AA64MMFR2_E0PD_SHIFT 60
756+
#define ID_AA64MMFR2_EVT_SHIFT 56
757+
#define ID_AA64MMFR2_BBM_SHIFT 52
758+
#define ID_AA64MMFR2_TTL_SHIFT 48
749759
#define ID_AA64MMFR2_FWB_SHIFT 40
760+
#define ID_AA64MMFR2_IDS_SHIFT 36
750761
#define ID_AA64MMFR2_AT_SHIFT 32
762+
#define ID_AA64MMFR2_ST_SHIFT 28
763+
#define ID_AA64MMFR2_NV_SHIFT 24
764+
#define ID_AA64MMFR2_CCIDX_SHIFT 20
751765
#define ID_AA64MMFR2_LVA_SHIFT 16
752766
#define ID_AA64MMFR2_IESB_SHIFT 12
753767
#define ID_AA64MMFR2_LSM_SHIFT 8
754768
#define ID_AA64MMFR2_UAO_SHIFT 4
755769
#define ID_AA64MMFR2_CNP_SHIFT 0
756770

757771
/* id_aa64dfr0 */
772+
#define ID_AA64DFR0_DOUBLELOCK_SHIFT 36
758773
#define ID_AA64DFR0_PMSVER_SHIFT 32
759774
#define ID_AA64DFR0_CTX_CMPS_SHIFT 28
760775
#define ID_AA64DFR0_WRPS_SHIFT 20
@@ -807,18 +822,40 @@
807822
#define ID_ISAR6_DP_SHIFT 4
808823
#define ID_ISAR6_JSCVT_SHIFT 0
809824

825+
#define ID_MMFR0_INNERSHR_SHIFT 28
826+
#define ID_MMFR0_FCSE_SHIFT 24
827+
#define ID_MMFR0_AUXREG_SHIFT 20
828+
#define ID_MMFR0_TCM_SHIFT 16
829+
#define ID_MMFR0_SHARELVL_SHIFT 12
830+
#define ID_MMFR0_OUTERSHR_SHIFT 8
831+
#define ID_MMFR0_PMSA_SHIFT 4
832+
#define ID_MMFR0_VMSA_SHIFT 0
833+
810834
#define ID_MMFR4_EVT_SHIFT 28
811835
#define ID_MMFR4_CCIDX_SHIFT 24
812836
#define ID_MMFR4_LSM_SHIFT 20
813837
#define ID_MMFR4_HPDS_SHIFT 16
814838
#define ID_MMFR4_CNP_SHIFT 12
815839
#define ID_MMFR4_XNX_SHIFT 8
840+
#define ID_MMFR4_AC2_SHIFT 4
816841
#define ID_MMFR4_SPECSEI_SHIFT 0
817842

818843
#define ID_MMFR5_ETS_SHIFT 0
819844

820845
#define ID_PFR0_DIT_SHIFT 24
821846
#define ID_PFR0_CSV2_SHIFT 16
847+
#define ID_PFR0_STATE3_SHIFT 12
848+
#define ID_PFR0_STATE2_SHIFT 8
849+
#define ID_PFR0_STATE1_SHIFT 4
850+
#define ID_PFR0_STATE0_SHIFT 0
851+
852+
#define ID_DFR0_PERFMON_SHIFT 24
853+
#define ID_DFR0_MPROFDBG_SHIFT 20
854+
#define ID_DFR0_MMAPTRC_SHIFT 16
855+
#define ID_DFR0_COPTRC_SHIFT 12
856+
#define ID_DFR0_MMAPDBG_SHIFT 8
857+
#define ID_DFR0_COPSDBG_SHIFT 4
858+
#define ID_DFR0_COPDBG_SHIFT 0
822859

823860
#define ID_PFR2_SSBS_SHIFT 4
824861
#define ID_PFR2_CSV3_SHIFT 0
@@ -861,6 +898,11 @@
861898
#define ID_AA64MMFR0_TGRAN_SUPPORTED ID_AA64MMFR0_TGRAN64_SUPPORTED
862899
#endif
863900

901+
#define MVFR2_FPMISC_SHIFT 4
902+
#define MVFR2_SIMDMISC_SHIFT 0
903+
904+
#define DCZID_DZP_SHIFT 4
905+
#define DCZID_BS_SHIFT 0
864906

865907
/*
866908
* The ZCR_ELx_LEN_* definitions intentionally include bits [8:4] which

arch/arm64/include/asm/vdso.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
*/
1313
#define VDSO_LBASE 0x0
1414

15+
#define __VVAR_PAGES 2
16+
1517
#ifndef __ASSEMBLY__
1618

1719
#include <generated/vdso-offsets.h>

arch/arm64/include/asm/vdso/compat_gettimeofday.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,18 @@ static __always_inline const struct vdso_data *__arch_get_vdso_data(void)
152152
return ret;
153153
}
154154

155+
#ifdef CONFIG_TIME_NS
156+
static __always_inline const struct vdso_data *__arch_get_timens_vdso_data(void)
157+
{
158+
const struct vdso_data *ret;
159+
160+
/* See __arch_get_vdso_data(). */
161+
asm volatile("mov %0, %1" : "=r"(ret) : "r"(_timens_data));
162+
163+
return ret;
164+
}
165+
#endif
166+
155167
#endif /* !__ASSEMBLY__ */
156168

157169
#endif /* __ASM_VDSO_GETTIMEOFDAY_H */

0 commit comments

Comments
 (0)