Skip to content

Commit e6ea465

Browse files
mrutland-armctmarinas
authored andcommitted
firmware: arm_sdei: use common SMCCC_CONDUIT_*
Now that we have common definitions for SMCCC conduits, move the SDEI code over to them, and remove the SDEI-specific definitions. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <[email protected]> Acked-by: Lorenzo Pieralisi <[email protected]> Acked-by: James Morse <[email protected]> Acked-by: Will Deacon <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent a5520ea commit e6ea465

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

arch/arm64/kernel/sdei.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Copyright (C) 2017 Arm Ltd.
33
#define pr_fmt(fmt) "sdei: " fmt
44

5+
#include <linux/arm-smccc.h>
56
#include <linux/arm_sdei.h>
67
#include <linux/hardirq.h>
78
#include <linux/irqflags.h>
@@ -161,7 +162,7 @@ unsigned long sdei_arch_get_entry_point(int conduit)
161162
return 0;
162163
}
163164

164-
sdei_exit_mode = (conduit == CONDUIT_HVC) ? SDEI_EXIT_HVC : SDEI_EXIT_SMC;
165+
sdei_exit_mode = (conduit == SMCCC_CONDUIT_HVC) ? SDEI_EXIT_HVC : SDEI_EXIT_SMC;
165166

166167
#ifdef CONFIG_UNMAP_KERNEL_AT_EL0
167168
if (arm64_kernel_unmapped_at_el0()) {

drivers/firmware/arm_sdei.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -967,29 +967,29 @@ static int sdei_get_conduit(struct platform_device *pdev)
967967
if (np) {
968968
if (of_property_read_string(np, "method", &method)) {
969969
pr_warn("missing \"method\" property\n");
970-
return CONDUIT_INVALID;
970+
return SMCCC_CONDUIT_NONE;
971971
}
972972

973973
if (!strcmp("hvc", method)) {
974974
sdei_firmware_call = &sdei_smccc_hvc;
975-
return CONDUIT_HVC;
975+
return SMCCC_CONDUIT_HVC;
976976
} else if (!strcmp("smc", method)) {
977977
sdei_firmware_call = &sdei_smccc_smc;
978-
return CONDUIT_SMC;
978+
return SMCCC_CONDUIT_SMC;
979979
}
980980

981981
pr_warn("invalid \"method\" property: %s\n", method);
982982
} else if (IS_ENABLED(CONFIG_ACPI) && !acpi_disabled) {
983983
if (acpi_psci_use_hvc()) {
984984
sdei_firmware_call = &sdei_smccc_hvc;
985-
return CONDUIT_HVC;
985+
return SMCCC_CONDUIT_HVC;
986986
} else {
987987
sdei_firmware_call = &sdei_smccc_smc;
988-
return CONDUIT_SMC;
988+
return SMCCC_CONDUIT_SMC;
989989
}
990990
}
991991

992-
return CONDUIT_INVALID;
992+
return SMCCC_CONDUIT_NONE;
993993
}
994994

995995
static int sdei_probe(struct platform_device *pdev)

include/linux/arm_sdei.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55

66
#include <uapi/linux/arm_sdei.h>
77

8-
enum sdei_conduit_types {
9-
CONDUIT_INVALID = 0,
10-
CONDUIT_SMC,
11-
CONDUIT_HVC,
12-
};
13-
148
#include <acpi/ghes.h>
159

1610
#ifdef CONFIG_ARM_SDE_INTERFACE

0 commit comments

Comments
 (0)