1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Definitions used by low-level trap handlers
4 *
5 * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
6 * Copyright (C) 2007-2009 PetaLogix
7 * Copyright (C) 2007 John Williams <john.williams@petalogix.com>
8 */
9
10#ifndef _ASM_MICROBLAZE_ENTRY_H
11#define _ASM_MICROBLAZE_ENTRY_H
12
13#include <asm/percpu.h>
14#include <asm/ptrace.h>
15#include <linux/linkage.h>
16
17/*
18 * These are per-cpu variables required in entry.S, among other
19 * places
20 */
21
22#define PER_CPU(var) var
23
24# ifndef __ASSEMBLY__
25DECLARE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */
26DECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */
27DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */
28DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
29DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
30
31extern asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall);
32# endif /* __ASSEMBLY__ */
33
34#endif /* _ASM_MICROBLAZE_ENTRY_H */
35