|
21 | 21 | #include <linux/cacheinfo.h> |
22 | 22 | #include <acpi/processor.h> |
23 | 23 |
|
24 | | -/* |
25 | | - * The acpi_pptt_cache_v1 in actbl2.h, which is imported from acpica, |
26 | | - * only contains the cache_id field rather than all the fields of the |
27 | | - * Cache Type Structure. Use this alternative structure until it is |
28 | | - * resolved in acpica. |
29 | | - */ |
30 | | -struct acpi_pptt_cache_v1_full { |
31 | | - struct acpi_subtable_header header; |
32 | | - u16 reserved; |
33 | | - u32 flags; |
34 | | - u32 next_level_of_cache; |
35 | | - u32 size; |
36 | | - u32 number_of_sets; |
37 | | - u8 associativity; |
38 | | - u8 attributes; |
39 | | - u16 line_size; |
40 | | - u32 cache_id; |
41 | | -} __packed; |
42 | | - |
43 | 24 | static struct acpi_subtable_header *fetch_pptt_subtable(struct acpi_table_header *table_hdr, |
44 | 25 | u32 pptt_ref) |
45 | 26 | { |
@@ -75,16 +56,16 @@ static struct acpi_pptt_cache *fetch_pptt_cache(struct acpi_table_header *table_ |
75 | 56 | return (struct acpi_pptt_cache *)fetch_pptt_subtable(table_hdr, pptt_ref); |
76 | 57 | } |
77 | 58 |
|
78 | | -static struct acpi_pptt_cache_v1_full *upgrade_pptt_cache(struct acpi_pptt_cache *cache) |
| 59 | +static struct acpi_pptt_cache_v1 *upgrade_pptt_cache(struct acpi_pptt_cache *cache) |
79 | 60 | { |
80 | | - if (cache->header.length < sizeof(struct acpi_pptt_cache_v1_full)) |
| 61 | + if (cache->header.length < sizeof(struct acpi_pptt_cache_v1)) |
81 | 62 | return NULL; |
82 | 63 |
|
83 | 64 | /* No use for v1 if the only additional field is invalid */ |
84 | 65 | if (!(cache->flags & ACPI_PPTT_CACHE_ID_VALID)) |
85 | 66 | return NULL; |
86 | 67 |
|
87 | | - return (struct acpi_pptt_cache_v1_full *)cache; |
| 68 | + return (struct acpi_pptt_cache_v1 *)cache; |
88 | 69 | } |
89 | 70 |
|
90 | 71 | static struct acpi_subtable_header *acpi_get_pptt_resource(struct acpi_table_header *table_hdr, |
@@ -397,7 +378,7 @@ static void update_cache_properties(struct cacheinfo *this_leaf, |
397 | 378 | struct acpi_pptt_cache *found_cache, |
398 | 379 | struct acpi_pptt_processor *cpu_node) |
399 | 380 | { |
400 | | - struct acpi_pptt_cache_v1_full *found_cache_v1; |
| 381 | + struct acpi_pptt_cache_v1 *found_cache_v1; |
401 | 382 |
|
402 | 383 | this_leaf->fw_token = cpu_node; |
403 | 384 | if (found_cache->flags & ACPI_PPTT_SIZE_PROPERTY_VALID) |
@@ -1000,7 +981,7 @@ int find_acpi_cache_level_from_id(u32 cache_id) |
1000 | 981 |
|
1001 | 982 | empty = true; |
1002 | 983 | for (int i = 0; i < ARRAY_SIZE(cache_type); i++) { |
1003 | | - struct acpi_pptt_cache_v1_full *cache_v1; |
| 984 | + struct acpi_pptt_cache_v1 *cache_v1; |
1004 | 985 |
|
1005 | 986 | cache = acpi_find_cache_node(table, acpi_cpu_id, cache_type[i], |
1006 | 987 | level, &cpu_node); |
@@ -1067,7 +1048,7 @@ int acpi_pptt_get_cpumask_from_cache_id(u32 cache_id, cpumask_t *cpus) |
1067 | 1048 |
|
1068 | 1049 | empty = true; |
1069 | 1050 | for (int i = 0; i < ARRAY_SIZE(cache_type); i++) { |
1070 | | - struct acpi_pptt_cache_v1_full *cache_v1; |
| 1051 | + struct acpi_pptt_cache_v1 *cache_v1; |
1071 | 1052 |
|
1072 | 1053 | cache = acpi_find_cache_node(table, acpi_cpu_id, cache_type[i], |
1073 | 1054 | level, &cpu_node); |
|
0 commit comments