For clarity and ease of maintenance, it would be helpful for all the stack helpers to be in the same place. Move the SDEI stack helpers into the stacktrace code where all the other stack helpers live. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Kalesh Singh <kaleshsingh@google.com> Reviewed-by: Madhavan T. Venkataraman <madvenka@linux.microsoft.com> Reviewed-by: Mark Brown <broonie@kernel.org> Cc: Fuad Tabba <tabba@google.com> Cc: James Morse <james.morse@arm.com> Cc: Marc Zyngier <maz@kernel.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20220901130646.1316937-5-mark.rutland@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
48 lines
1.3 KiB
C
48 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
// Copyright (C) 2017 Arm Ltd.
|
|
#ifndef __ASM_SDEI_H
|
|
#define __ASM_SDEI_H
|
|
|
|
/* Values for sdei_exit_mode */
|
|
#define SDEI_EXIT_HVC 0
|
|
#define SDEI_EXIT_SMC 1
|
|
|
|
#define SDEI_STACK_SIZE IRQ_STACK_SIZE
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <linux/linkage.h>
|
|
#include <linux/preempt.h>
|
|
#include <linux/types.h>
|
|
|
|
#include <asm/virt.h>
|
|
|
|
extern unsigned long sdei_exit_mode;
|
|
|
|
/* Software Delegated Exception entry point from firmware*/
|
|
asmlinkage void __sdei_asm_handler(unsigned long event_num, unsigned long arg,
|
|
unsigned long pc, unsigned long pstate);
|
|
|
|
/* and its CONFIG_UNMAP_KERNEL_AT_EL0 trampoline */
|
|
asmlinkage void __sdei_asm_entry_trampoline(unsigned long event_num,
|
|
unsigned long arg,
|
|
unsigned long pc,
|
|
unsigned long pstate);
|
|
|
|
/*
|
|
* The above entry point does the minimum to call C code. This function does
|
|
* anything else, before calling the driver.
|
|
*/
|
|
struct sdei_registered_event;
|
|
asmlinkage unsigned long __sdei_handler(struct pt_regs *regs,
|
|
struct sdei_registered_event *arg);
|
|
|
|
unsigned long do_sdei_event(struct pt_regs *regs,
|
|
struct sdei_registered_event *arg);
|
|
|
|
unsigned long sdei_arch_get_entry_point(int conduit);
|
|
#define sdei_arch_get_entry_point(x) sdei_arch_get_entry_point(x)
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
#endif /* __ASM_SDEI_H */
|