Commit e6ea4651 authored by Mark Rutland's avatar Mark Rutland Committed by Catalin Marinas

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: default avatarMark Rutland <mark.rutland@arm.com>
Acked-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: default avatarJames Morse <james.morse@arm.com>
Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent a5520eac
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// Copyright (C) 2017 Arm Ltd. // Copyright (C) 2017 Arm Ltd.
#define pr_fmt(fmt) "sdei: " fmt #define pr_fmt(fmt) "sdei: " fmt
#include <linux/arm-smccc.h>
#include <linux/arm_sdei.h> #include <linux/arm_sdei.h>
#include <linux/hardirq.h> #include <linux/hardirq.h>
#include <linux/irqflags.h> #include <linux/irqflags.h>
...@@ -161,7 +162,7 @@ unsigned long sdei_arch_get_entry_point(int conduit) ...@@ -161,7 +162,7 @@ unsigned long sdei_arch_get_entry_point(int conduit)
return 0; return 0;
} }
sdei_exit_mode = (conduit == CONDUIT_HVC) ? SDEI_EXIT_HVC : SDEI_EXIT_SMC; sdei_exit_mode = (conduit == SMCCC_CONDUIT_HVC) ? SDEI_EXIT_HVC : SDEI_EXIT_SMC;
#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 #ifdef CONFIG_UNMAP_KERNEL_AT_EL0
if (arm64_kernel_unmapped_at_el0()) { if (arm64_kernel_unmapped_at_el0()) {
......
...@@ -967,29 +967,29 @@ static int sdei_get_conduit(struct platform_device *pdev) ...@@ -967,29 +967,29 @@ static int sdei_get_conduit(struct platform_device *pdev)
if (np) { if (np) {
if (of_property_read_string(np, "method", &method)) { if (of_property_read_string(np, "method", &method)) {
pr_warn("missing \"method\" property\n"); pr_warn("missing \"method\" property\n");
return CONDUIT_INVALID; return SMCCC_CONDUIT_NONE;
} }
if (!strcmp("hvc", method)) { if (!strcmp("hvc", method)) {
sdei_firmware_call = &sdei_smccc_hvc; sdei_firmware_call = &sdei_smccc_hvc;
return CONDUIT_HVC; return SMCCC_CONDUIT_HVC;
} else if (!strcmp("smc", method)) { } else if (!strcmp("smc", method)) {
sdei_firmware_call = &sdei_smccc_smc; sdei_firmware_call = &sdei_smccc_smc;
return CONDUIT_SMC; return SMCCC_CONDUIT_SMC;
} }
pr_warn("invalid \"method\" property: %s\n", method); pr_warn("invalid \"method\" property: %s\n", method);
} else if (IS_ENABLED(CONFIG_ACPI) && !acpi_disabled) { } else if (IS_ENABLED(CONFIG_ACPI) && !acpi_disabled) {
if (acpi_psci_use_hvc()) { if (acpi_psci_use_hvc()) {
sdei_firmware_call = &sdei_smccc_hvc; sdei_firmware_call = &sdei_smccc_hvc;
return CONDUIT_HVC; return SMCCC_CONDUIT_HVC;
} else { } else {
sdei_firmware_call = &sdei_smccc_smc; sdei_firmware_call = &sdei_smccc_smc;
return CONDUIT_SMC; return SMCCC_CONDUIT_SMC;
} }
} }
return CONDUIT_INVALID; return SMCCC_CONDUIT_NONE;
} }
static int sdei_probe(struct platform_device *pdev) static int sdei_probe(struct platform_device *pdev)
......
...@@ -5,12 +5,6 @@ ...@@ -5,12 +5,6 @@
#include <uapi/linux/arm_sdei.h> #include <uapi/linux/arm_sdei.h>
enum sdei_conduit_types {
CONDUIT_INVALID = 0,
CONDUIT_SMC,
CONDUIT_HVC,
};
#include <acpi/ghes.h> #include <acpi/ghes.h>
#ifdef CONFIG_ARM_SDE_INTERFACE #ifdef CONFIG_ARM_SDE_INTERFACE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment