aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-08 14:10:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-08 14:10:58 -0400
commit410feb75de245664d66bc05ab2e2412751d10acf (patch)
tree73deae83ab33a7c0668eb00eb2e1d347b20782c9 /include/linux
parent2996148a9d4169f19a57827003c75605ce3b152b (diff)
parent0fe42512b2f03f9e5a20b9f55ef1013a68b4cd48 (diff)
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 updates from Catalin Marinas: "Apart from the core arm64 and perf changes, the Spectre v4 mitigation touches the arm KVM code and the ACPI PPTT support touches drivers/ (acpi and cacheinfo). I should have the maintainers' acks in place. Summary: - Spectre v4 mitigation (Speculative Store Bypass Disable) support for arm64 using SMC firmware call to set a hardware chicken bit - ACPI PPTT (Processor Properties Topology Table) parsing support and enable the feature for arm64 - Report signal frame size to user via auxv (AT_MINSIGSTKSZ). The primary motivation is Scalable Vector Extensions which requires more space on the signal frame than the currently defined MINSIGSTKSZ - ARM perf patches: allow building arm-cci as module, demote dev_warn() to dev_dbg() in arm-ccn event_init(), miscellaneous cleanups - cmpwait() WFE optimisation to avoid some spurious wakeups - L1_CACHE_BYTES reverted back to 64 (for performance reasons that have to do with some network allocations) while keeping ARCH_DMA_MINALIGN to 128. cache_line_size() returns the actual hardware Cache Writeback Granule - Turn LSE atomics on by default in Kconfig - Kernel fault reporting tidying - Some #include and miscellaneous cleanups" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (53 commits) arm64: Fix syscall restarting around signal suppressed by tracer arm64: topology: Avoid checking numa mask for scheduler MC selection ACPI / PPTT: fix build when CONFIG_ACPI_PPTT is not enabled arm64: cpu_errata: include required headers arm64: KVM: Move VCPU_WORKAROUND_2_FLAG macros to the top of the file arm64: signal: Report signal frame size to userspace via auxv arm64/sve: Thin out initialisation sanity-checks for sve_max_vl arm64: KVM: Add ARCH_WORKAROUND_2 discovery through ARCH_FEATURES_FUNC_ID arm64: KVM: Handle guest's ARCH_WORKAROUND_2 requests arm64: KVM: Add ARCH_WORKAROUND_2 support for guests arm64: KVM: Add HYP per-cpu accessors arm64: ssbd: Add prctl interface for per-thread mitigation arm64: ssbd: Introduce thread flag to control userspace mitigation arm64: ssbd: Restore mitigation status on CPU resume arm64: ssbd: Skip apply_ssbd if not using dynamic mitigation arm64: ssbd: Add global mitigation state accessor arm64: Add 'ssbd' command-line option arm64: Add ARCH_WORKAROUND_2 probing arm64: Add per-cpu infrastructure to call ARCH_WORKAROUND_2 arm64: Call ARCH_WORKAROUND_2 on transitions between EL0 and EL1 ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h19
-rw-r--r--include/linux/arm-smccc.h10
-rw-r--r--include/linux/cacheinfo.h25
-rw-r--r--include/linux/perf/arm_pmu.h2
4 files changed, 50 insertions, 6 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 8758a2a9e6c1..4b35a66383f9 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -1299,4 +1299,23 @@ static inline int lpit_read_residency_count_address(u64 *address)
1299} 1299}
1300#endif 1300#endif
1301 1301
1302#ifdef CONFIG_ACPI_PPTT
1303int find_acpi_cpu_topology(unsigned int cpu, int level);
1304int find_acpi_cpu_topology_package(unsigned int cpu);
1305int find_acpi_cpu_cache_topology(unsigned int cpu, int level);
1306#else
1307static inline int find_acpi_cpu_topology(unsigned int cpu, int level)
1308{
1309 return -EINVAL;
1310}
1311static inline int find_acpi_cpu_topology_package(unsigned int cpu)
1312{
1313 return -EINVAL;
1314}
1315static inline int find_acpi_cpu_cache_topology(unsigned int cpu, int level)
1316{
1317 return -EINVAL;
1318}
1319#endif
1320
1302#endif /*_LINUX_ACPI_H*/ 1321#endif /*_LINUX_ACPI_H*/
diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h
index a031897fca76..ca1d2cc2cdfa 100644
--- a/include/linux/arm-smccc.h
+++ b/include/linux/arm-smccc.h
@@ -80,6 +80,11 @@
80 ARM_SMCCC_SMC_32, \ 80 ARM_SMCCC_SMC_32, \
81 0, 0x8000) 81 0, 0x8000)
82 82
83#define ARM_SMCCC_ARCH_WORKAROUND_2 \
84 ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \
85 ARM_SMCCC_SMC_32, \
86 0, 0x7fff)
87
83#ifndef __ASSEMBLY__ 88#ifndef __ASSEMBLY__
84 89
85#include <linux/linkage.h> 90#include <linux/linkage.h>
@@ -291,5 +296,10 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
291 */ 296 */
292#define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__) 297#define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
293 298
299/* Return codes defined in ARM DEN 0070A */
300#define SMCCC_RET_SUCCESS 0
301#define SMCCC_RET_NOT_SUPPORTED -1
302#define SMCCC_RET_NOT_REQUIRED -2
303
294#endif /*__ASSEMBLY__*/ 304#endif /*__ASSEMBLY__*/
295#endif /*__LINUX_ARM_SMCCC_H*/ 305#endif /*__LINUX_ARM_SMCCC_H*/
diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h
index 3d9805297cda..70e19bc6cc9f 100644
--- a/include/linux/cacheinfo.h
+++ b/include/linux/cacheinfo.h
@@ -34,9 +34,8 @@ enum cache_type {
34 * @shared_cpu_map: logical cpumask representing all the cpus sharing 34 * @shared_cpu_map: logical cpumask representing all the cpus sharing
35 * this cache node 35 * this cache node
36 * @attributes: bitfield representing various cache attributes 36 * @attributes: bitfield representing various cache attributes
37 * @of_node: if devicetree is used, this represents either the cpu node in 37 * @fw_token: Unique value used to determine if different cacheinfo
38 * case there's no explicit cache node or the cache node itself in the 38 * structures represent a single hardware cache instance.
39 * device tree
40 * @disable_sysfs: indicates whether this node is visible to the user via 39 * @disable_sysfs: indicates whether this node is visible to the user via
41 * sysfs or not 40 * sysfs or not
42 * @priv: pointer to any private data structure specific to particular 41 * @priv: pointer to any private data structure specific to particular
@@ -65,8 +64,7 @@ struct cacheinfo {
65#define CACHE_ALLOCATE_POLICY_MASK \ 64#define CACHE_ALLOCATE_POLICY_MASK \
66 (CACHE_READ_ALLOCATE | CACHE_WRITE_ALLOCATE) 65 (CACHE_READ_ALLOCATE | CACHE_WRITE_ALLOCATE)
67#define CACHE_ID BIT(4) 66#define CACHE_ID BIT(4)
68 67 void *fw_token;
69 struct device_node *of_node;
70 bool disable_sysfs; 68 bool disable_sysfs;
71 void *priv; 69 void *priv;
72}; 70};
@@ -99,6 +97,23 @@ int func(unsigned int cpu) \
99struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu); 97struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu);
100int init_cache_level(unsigned int cpu); 98int init_cache_level(unsigned int cpu);
101int populate_cache_leaves(unsigned int cpu); 99int populate_cache_leaves(unsigned int cpu);
100int cache_setup_acpi(unsigned int cpu);
101#ifndef CONFIG_ACPI_PPTT
102/*
103 * acpi_find_last_cache_level is only called on ACPI enabled
104 * platforms using the PPTT for topology. This means that if
105 * the platform supports other firmware configuration methods
106 * we need to stub out the call when ACPI is disabled.
107 * ACPI enabled platforms not using PPTT won't be making calls
108 * to this function so we need not worry about them.
109 */
110static inline int acpi_find_last_cache_level(unsigned int cpu)
111{
112 return 0;
113}
114#else
115int acpi_find_last_cache_level(unsigned int cpu);
116#endif
102 117
103const struct attribute_group *cache_get_priv_group(struct cacheinfo *this_leaf); 118const struct attribute_group *cache_get_priv_group(struct cacheinfo *this_leaf);
104 119
diff --git a/include/linux/perf/arm_pmu.h b/include/linux/perf/arm_pmu.h
index 40036a57d072..ad5444491975 100644
--- a/include/linux/perf/arm_pmu.h
+++ b/include/linux/perf/arm_pmu.h
@@ -78,7 +78,7 @@ struct arm_pmu {
78 struct pmu pmu; 78 struct pmu pmu;
79 cpumask_t supported_cpus; 79 cpumask_t supported_cpus;
80 char *name; 80 char *name;
81 irqreturn_t (*handle_irq)(int irq_num, void *dev); 81 irqreturn_t (*handle_irq)(struct arm_pmu *pmu);
82 void (*enable)(struct perf_event *event); 82 void (*enable)(struct perf_event *event);
83 void (*disable)(struct perf_event *event); 83 void (*disable)(struct perf_event *event);
84 int (*get_event_idx)(struct pmu_hw_events *hw_events, 84 int (*get_event_idx)(struct pmu_hw_events *hw_events,