18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Definitions used by low-level trap handlers
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
68c2ecf20Sopenharmony_ci * Copyright (C) 2007-2009 PetaLogix
78c2ecf20Sopenharmony_ci * Copyright (C) 2007 John Williams <john.williams@petalogix.com>
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#ifndef _ASM_MICROBLAZE_ENTRY_H
118c2ecf20Sopenharmony_ci#define _ASM_MICROBLAZE_ENTRY_H
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#include <asm/percpu.h>
148c2ecf20Sopenharmony_ci#include <asm/ptrace.h>
158c2ecf20Sopenharmony_ci#include <linux/linkage.h>
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci/*
188c2ecf20Sopenharmony_ci * These are per-cpu variables required in entry.S, among other
198c2ecf20Sopenharmony_ci * places
208c2ecf20Sopenharmony_ci */
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci#define PER_CPU(var) var
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci# ifndef __ASSEMBLY__
258c2ecf20Sopenharmony_ciDECLARE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */
268c2ecf20Sopenharmony_ciDECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */
278c2ecf20Sopenharmony_ciDECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */
288c2ecf20Sopenharmony_ciDECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
298c2ecf20Sopenharmony_ciDECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ciextern asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall);
328c2ecf20Sopenharmony_ci# endif /* __ASSEMBLY__ */
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci#endif /* _ASM_MICROBLAZE_ENTRY_H */
35