diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2018-08-20 18:05:17 +0200 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2018-08-20 18:05:17 +0200 |
| commit | 415d2b3392d7a80903e0f97f051201aa02bf20e9 (patch) | |
| tree | 47492d2386a0e7f00ef645313cb44ae4960b7e7e /include/linux/cacheinfo.h | |
| parent | 4f65245f2d178b9cba48350620d76faa4a098841 (diff) | |
| parent | b8e759b8f6dab1c473c30ac12709095d0b81078e (diff) | |
| download | cachepc-linux-415d2b3392d7a80903e0f97f051201aa02bf20e9.tar.gz cachepc-linux-415d2b3392d7a80903e0f97f051201aa02bf20e9.zip | |
Merge branch 'for-4.19/cougar' into for-linus
New device support for hid-cougar
Diffstat (limited to 'include/linux/cacheinfo.h')
| -rw-r--r-- | include/linux/cacheinfo.h | 25 |
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 { * @shared_cpu_map: logical cpumask representing all the cpus sharing * this cache node * @attributes: bitfield representing various cache attributes - * @of_node: if devicetree is used, this represents either the cpu node in - * case there's no explicit cache node or the cache node itself in the - * device tree + * @fw_token: Unique value used to determine if different cacheinfo + * structures represent a single hardware cache instance. * @disable_sysfs: indicates whether this node is visible to the user via * sysfs or not * @priv: pointer to any private data structure specific to particular @@ -65,8 +64,7 @@ struct cacheinfo { #define CACHE_ALLOCATE_POLICY_MASK \ (CACHE_READ_ALLOCATE | CACHE_WRITE_ALLOCATE) #define CACHE_ID BIT(4) - - struct device_node *of_node; + void *fw_token; bool disable_sysfs; void *priv; }; @@ -99,6 +97,23 @@ int func(unsigned int cpu) \ struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu); int init_cache_level(unsigned int cpu); int populate_cache_leaves(unsigned int cpu); +int cache_setup_acpi(unsigned int cpu); +#ifndef CONFIG_ACPI_PPTT +/* + * acpi_find_last_cache_level is only called on ACPI enabled + * platforms using the PPTT for topology. This means that if + * the platform supports other firmware configuration methods + * we need to stub out the call when ACPI is disabled. + * ACPI enabled platforms not using PPTT won't be making calls + * to this function so we need not worry about them. + */ +static inline int acpi_find_last_cache_level(unsigned int cpu) +{ + return 0; +} +#else +int acpi_find_last_cache_level(unsigned int cpu); +#endif const struct attribute_group *cache_get_priv_group(struct cacheinfo *this_leaf); |
