diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/acpi.h | 19 | ||||
| -rw-r--r-- | include/linux/arm-smccc.h | 10 | ||||
| -rw-r--r-- | include/linux/cacheinfo.h | 25 | ||||
| -rw-r--r-- | include/linux/perf/arm_pmu.h | 2 |
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 | ||
| 1303 | int find_acpi_cpu_topology(unsigned int cpu, int level); | ||
| 1304 | int find_acpi_cpu_topology_package(unsigned int cpu); | ||
| 1305 | int find_acpi_cpu_cache_topology(unsigned int cpu, int level); | ||
| 1306 | #else | ||
| 1307 | static inline int find_acpi_cpu_topology(unsigned int cpu, int level) | ||
| 1308 | { | ||
| 1309 | return -EINVAL; | ||
| 1310 | } | ||
| 1311 | static inline int find_acpi_cpu_topology_package(unsigned int cpu) | ||
| 1312 | { | ||
| 1313 | return -EINVAL; | ||
| 1314 | } | ||
| 1315 | static 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) \ | |||
| 99 | struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu); | 97 | struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu); |
| 100 | int init_cache_level(unsigned int cpu); | 98 | int init_cache_level(unsigned int cpu); |
| 101 | int populate_cache_leaves(unsigned int cpu); | 99 | int populate_cache_leaves(unsigned int cpu); |
| 100 | int 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 | */ | ||
| 110 | static inline int acpi_find_last_cache_level(unsigned int cpu) | ||
| 111 | { | ||
| 112 | return 0; | ||
| 113 | } | ||
| 114 | #else | ||
| 115 | int acpi_find_last_cache_level(unsigned int cpu); | ||
| 116 | #endif | ||
| 102 | 117 | ||
| 103 | const struct attribute_group *cache_get_priv_group(struct cacheinfo *this_leaf); | 118 | const 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, |
