Skip to content

Commit 9bd2e7c

Browse files
committed
Merge branch 'for-next/acpi' into for-next/core
* for-next/acpi: firmware: SDEI: Allow sdei initialization without ACPI_APEI_GHES
2 parents 0af2f6b + 59529bb commit 9bd2e7c

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

drivers/acpi/apei/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ config ACPI_APEI_GHES
2323
select ACPI_HED
2424
select IRQ_WORK
2525
select GENERIC_ALLOCATOR
26+
select ARM_SDE_INTERFACE if ARM64
2627
help
2728
Generic Hardware Error Source provides a way to report
2829
platform hardware errors (such as that from chipset). It

drivers/acpi/apei/ghes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ void __init acpi_ghes_init(void)
17151715
{
17161716
int rc;
17171717

1718-
sdei_init();
1718+
acpi_sdei_init();
17191719

17201720
if (acpi_disabled)
17211721
return;

drivers/firmware/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ config ARM_SCPI_PROTOCOL
3131
config ARM_SDE_INTERFACE
3232
bool "ARM Software Delegated Exception Interface (SDEI)"
3333
depends on ARM64
34-
depends on ACPI_APEI_GHES
3534
help
3635
The Software Delegated Exception Interface (SDEI) is an ARM
3736
standard for registering callbacks from the platform firmware

drivers/firmware/arm_sdei.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,13 +1062,12 @@ static bool __init sdei_present_acpi(void)
10621062
return true;
10631063
}
10641064

1065-
void __init sdei_init(void)
1065+
void __init acpi_sdei_init(void)
10661066
{
10671067
struct platform_device *pdev;
10681068
int ret;
10691069

1070-
ret = platform_driver_register(&sdei_driver);
1071-
if (ret || !sdei_present_acpi())
1070+
if (!sdei_present_acpi())
10721071
return;
10731072

10741073
pdev = platform_device_register_simple(sdei_driver.driver.name,
@@ -1081,6 +1080,12 @@ void __init sdei_init(void)
10811080
}
10821081
}
10831082

1083+
static int __init sdei_init(void)
1084+
{
1085+
return platform_driver_register(&sdei_driver);
1086+
}
1087+
arch_initcall(sdei_init);
1088+
10841089
int sdei_event_handler(struct pt_regs *regs,
10851090
struct sdei_registered_event *arg)
10861091
{

include/linux/arm_sdei.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ int sdei_unregister_ghes(struct ghes *ghes);
4646
/* For use by arch code when CPU hotplug notifiers are not appropriate. */
4747
int sdei_mask_local_cpu(void);
4848
int sdei_unmask_local_cpu(void);
49-
void __init sdei_init(void);
49+
void __init acpi_sdei_init(void);
5050
void sdei_handler_abort(void);
5151
#else
5252
static inline int sdei_mask_local_cpu(void) { return 0; }
5353
static inline int sdei_unmask_local_cpu(void) { return 0; }
54-
static inline void sdei_init(void) { }
54+
static inline void acpi_sdei_init(void) { }
5555
static inline void sdei_handler_abort(void) { }
5656
#endif /* CONFIG_ARM_SDE_INTERFACE */
5757

0 commit comments

Comments
 (0)