diff options
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 { | |||
| 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 | ||
