mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 06:24:53 +08:00
6cf61e061e
The never-ending entry.S refactoring continues, putting us in a much better place wrt compiler instrumentation whilst moving more of the code into C. * for-next/entry: arm64: idle: don't instrument idle code with KCOV arm64: entry: don't instrument entry code with KCOV arm64: entry: make NMI entry/exit functions static arm64: entry: split SDEI entry arm64: entry: split bad stack entry arm64: entry: fold el1_inv() into el1h_64_sync_handler() arm64: entry: handle all vectors with C arm64: entry: template the entry asm functions arm64: entry: improve bad_mode() arm64: entry: move bad_mode() to entry-common.c arm64: entry: consolidate EL1 exception returns arm64: entry: organise entry vectors consistently arm64: entry: organise entry handlers consistently arm64: entry: convert IRQ+FIQ handlers to C arm64: entry: add a call_on_irq_stack helper arm64: entry: move NMI preempt logic to C arm64: entry: move arm64_preempt_schedule_irq to entry-common.c arm64: entry: convert SError handlers to C arm64: entry: unmask IRQ+FIQ after EL0 handling arm64: remove redundant local_daif_mask() in bad_mode()
65 lines
1.7 KiB
C
65 lines
1.7 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)
|
|
|
|
struct stack_info;
|
|
|
|
bool _on_sdei_stack(unsigned long sp, unsigned long size,
|
|
struct stack_info *info);
|
|
static inline bool on_sdei_stack(unsigned long sp, unsigned long size,
|
|
struct stack_info *info)
|
|
{
|
|
if (!IS_ENABLED(CONFIG_VMAP_STACK))
|
|
return false;
|
|
if (!IS_ENABLED(CONFIG_ARM_SDE_INTERFACE))
|
|
return false;
|
|
if (in_nmi())
|
|
return _on_sdei_stack(sp, size, info);
|
|
|
|
return false;
|
|
}
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
#endif /* __ASM_SDEI_H */
|