Skip to content

Commit 9b776dd

Browse files
benhor01rafaeljw
authored andcommitted
ACPI: PPTT: Remove duplicate structure, acpi_pptt_cache_v1_full
acpi_pptt_cache_v1_full was initially added as a stop gap until the equivalent structure imported from ACPICA, acpi_pptt_v1 in actbl2.h, contained all the fields of the Cache Type Structure. Since commit 091c4af ("ACPICA: ACPI 6.4: PPTT: include all fields in subtable type1"), acpi_pptt_v1 contains all these fields making acpi_pptt_cache_v1_full redundant. Remove acpi_pptt_cache_v1_full. No functional change intended. Signed-off-by: Ben Horgan <ben.horgan@arm.com> Reviewed-by: Jeremy Linton <jeremy.linton@arm.com> Reviewed-by: Sudeep Holla <sudeep.holla@kernel.org> [ rjw: Subject and changelog edits ] Link: https://patch.msgid.link/20260324113300.1002569-1-ben.horgan@arm.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent c369299 commit 9b776dd

1 file changed

Lines changed: 6 additions & 25 deletions

File tree

drivers/acpi/pptt.c

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,6 @@
2121
#include <linux/cacheinfo.h>
2222
#include <acpi/processor.h>
2323

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-
4324
static struct acpi_subtable_header *fetch_pptt_subtable(struct acpi_table_header *table_hdr,
4425
u32 pptt_ref)
4526
{
@@ -75,16 +56,16 @@ static struct acpi_pptt_cache *fetch_pptt_cache(struct acpi_table_header *table_
7556
return (struct acpi_pptt_cache *)fetch_pptt_subtable(table_hdr, pptt_ref);
7657
}
7758

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)
7960
{
80-
if (cache->header.length < sizeof(struct acpi_pptt_cache_v1_full))
61+
if (cache->header.length < sizeof(struct acpi_pptt_cache_v1))
8162
return NULL;
8263

8364
/* No use for v1 if the only additional field is invalid */
8465
if (!(cache->flags & ACPI_PPTT_CACHE_ID_VALID))
8566
return NULL;
8667

87-
return (struct acpi_pptt_cache_v1_full *)cache;
68+
return (struct acpi_pptt_cache_v1 *)cache;
8869
}
8970

9071
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,
397378
struct acpi_pptt_cache *found_cache,
398379
struct acpi_pptt_processor *cpu_node)
399380
{
400-
struct acpi_pptt_cache_v1_full *found_cache_v1;
381+
struct acpi_pptt_cache_v1 *found_cache_v1;
401382

402383
this_leaf->fw_token = cpu_node;
403384
if (found_cache->flags & ACPI_PPTT_SIZE_PROPERTY_VALID)
@@ -979,7 +960,7 @@ int find_acpi_cache_level_from_id(u32 cache_id)
979960

980961
empty = true;
981962
for (int i = 0; i < ARRAY_SIZE(cache_type); i++) {
982-
struct acpi_pptt_cache_v1_full *cache_v1;
963+
struct acpi_pptt_cache_v1 *cache_v1;
983964

984965
cache = acpi_find_cache_node(table, acpi_cpu_id, cache_type[i],
985966
level, &cpu_node);
@@ -1043,7 +1024,7 @@ int acpi_pptt_get_cpumask_from_cache_id(u32 cache_id, cpumask_t *cpus)
10431024

10441025
empty = true;
10451026
for (int i = 0; i < ARRAY_SIZE(cache_type); i++) {
1046-
struct acpi_pptt_cache_v1_full *cache_v1;
1027+
struct acpi_pptt_cache_v1 *cache_v1;
10471028

10481029
cache = acpi_find_cache_node(table, acpi_cpu_id, cache_type[i],
10491030
level, &cpu_node);

0 commit comments

Comments
 (0)