From 4348270137e2be2542c4dd092a75cb6655913477 Mon Sep 17 00:00:00 2001 From: Miaohe Lin Date: Sat, 27 May 2023 17:51:58 +0800 Subject: ACPI: APEI: GHES: Remove unused ghes_estatus_pool_size_request() ghes_estatus_pool_size_request() is unused now, so remove it. Signed-off-by: Miaohe Lin [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/apei/ghes.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers') diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 34ad071a64e9..a4148a7d3afe 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -152,7 +152,6 @@ struct ghes_vendor_record_entry { }; static struct gen_pool *ghes_estatus_pool; -static unsigned long ghes_estatus_pool_size_request; static struct ghes_estatus_cache __rcu *ghes_estatus_caches[GHES_ESTATUS_CACHES_SIZE]; static atomic_t ghes_estatus_cache_alloced; @@ -191,7 +190,6 @@ int ghes_estatus_pool_init(unsigned int num_ghes) len = GHES_ESTATUS_CACHE_AVG_SIZE * GHES_ESTATUS_CACHE_ALLOCED_MAX; len += (num_ghes * GHES_ESOURCE_PREALLOC_MAX_SIZE); - ghes_estatus_pool_size_request = PAGE_ALIGN(len); addr = (unsigned long)vmalloc(PAGE_ALIGN(len)); if (!addr) goto err_pool_alloc; -- cgit v1.2.3 From d38f6bcea88836bfb346a6d567c452065417e2ed Mon Sep 17 00:00:00 2001 From: Miaohe Lin Date: Tue, 6 Jun 2023 20:28:19 +0800 Subject: ACPI: APEI: mark bert_disable as __initdata It's only used inside the __init section. Mark it __initdata. Signed-off-by: Miaohe Lin Signed-off-by: Rafael J. Wysocki --- drivers/acpi/apei/bert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/acpi/apei/bert.c b/drivers/acpi/apei/bert.c index 7514e38d5640..5427e49e646b 100644 --- a/drivers/acpi/apei/bert.c +++ b/drivers/acpi/apei/bert.c @@ -34,7 +34,7 @@ #define ACPI_BERT_PRINT_MAX_RECORDS 5 #define ACPI_BERT_PRINT_MAX_LEN 1024 -static int bert_disable; +static int bert_disable __initdata; /* * Print "all" the error records in the BERT table, but avoid huge spam to -- cgit v1.2.3 From b72f301c5bdce11ef32a7363bdc05edd4fc3b386 Mon Sep 17 00:00:00 2001 From: Tony W Wang-oc Date: Tue, 6 Jun 2023 17:56:41 +0800 Subject: ACPI: PAD: mark Zhaoxin CPUs NONSTOP TSC correctly Zhaoxin CPUs support NONSTOP TSC feature, so do not mark these CPUs TSC unstable when use the acpi_pad driver. Signed-off-by: Tony W Wang-oc Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_pad.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index 02f1a1b1143c..7a453c5ff303 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c @@ -66,6 +66,7 @@ static void power_saving_mwait_init(void) case X86_VENDOR_AMD: case X86_VENDOR_INTEL: case X86_VENDOR_ZHAOXIN: + case X86_VENDOR_CENTAUR: /* * AMD Fam10h TSC will tick in all * C/P/S0/S1 states when this bit is set. -- cgit v1.2.3 From 097e727b585a9031e04e5c883e02c05ee8c6c901 Mon Sep 17 00:00:00 2001 From: Sudeep Holla Date: Mon, 5 Jun 2023 11:35:36 +0100 Subject: ACPI: FFH: Drop the inclusion of linux/arm-smccc.h The inclusion of linux/arm-smccc.h in acpi_ffh is unnecessary and can be even termed wrong. It is needed in the arm64 architecture callback implementation and probably is the leftover from the missed cleanup of the initial implementation. Signed-off-by: Sudeep Holla Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpi_ffh.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers') diff --git a/drivers/acpi/acpi_ffh.c b/drivers/acpi/acpi_ffh.c index 19aff808bbb8..8d5126963dc7 100644 --- a/drivers/acpi/acpi_ffh.c +++ b/drivers/acpi/acpi_ffh.c @@ -9,8 +9,6 @@ #include #include -#include - static struct acpi_ffh_info ffh_ctx; int __weak acpi_ffh_address_space_arch_setup(void *handler_ctxt, -- cgit v1.2.3 From 9368aa1882ac7178adcd936cee5f0899dbf76dc4 Mon Sep 17 00:00:00 2001 From: Li Yang Date: Fri, 19 May 2023 15:12:49 -0500 Subject: APEI: GHES: correctly return NULL for ghes_get_devices() Since 315bada690e0 ("EDAC: Check for GHES preference in the chipset-specific EDAC drivers"), vendor specific EDAC driver will not probe correctly when CONFIG_ACPI_APEI_GHES is enabled but no GHES device is present. Make ghes_get_devices() return NULL when the GHES device list is empty to fix the problem. Fixes: 9057a3f7ac36 ("EDAC/ghes: Prepare to make ghes_edac a proper module") Signed-off-by: Li Yang Reviewed-by: Tony Luck Signed-off-by: Rafael J. Wysocki --- drivers/acpi/apei/ghes.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index a4148a7d3afe..ef59d6ea16da 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -1542,6 +1542,8 @@ struct list_head *ghes_get_devices(void) pr_warn_once("Force-loading ghes_edac on an unsupported platform. You're on your own!\n"); } + } else if (list_empty(&ghes_devs)) { + return NULL; } return &ghes_devs; -- cgit v1.2.3