aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cacheinfo.h
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/cacheinfo.h
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/cacheinfo.h')
-rw-r--r--include/linux/cacheinfo.h25
1 files changed, 20 insertions, 5 deletions
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