xref: /linux/arch/microblaze/include/asm/entry.h (revision ead5d1f4d877e92c051e1a1ade623d0d30e71619)
1*4726dd60SMichal Simek /* SPDX-License-Identifier: GPL-2.0 */
24115ac83SMichal Simek /*
34115ac83SMichal Simek  * Definitions used by low-level trap handlers
44115ac83SMichal Simek  *
5ca54502bSMichal Simek  * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
6ca54502bSMichal Simek  * Copyright (C) 2007-2009 PetaLogix
74115ac83SMichal Simek  * Copyright (C) 2007 John Williams <john.williams@petalogix.com>
84115ac83SMichal Simek  */
94115ac83SMichal Simek 
104115ac83SMichal Simek #ifndef _ASM_MICROBLAZE_ENTRY_H
114115ac83SMichal Simek #define _ASM_MICROBLAZE_ENTRY_H
124115ac83SMichal Simek 
134115ac83SMichal Simek #include <asm/percpu.h>
144115ac83SMichal Simek #include <asm/ptrace.h>
15dd035246SChen Gang #include <linux/linkage.h>
164115ac83SMichal Simek 
174115ac83SMichal Simek /*
184115ac83SMichal Simek  * These are per-cpu variables required in entry.S, among other
194115ac83SMichal Simek  * places
204115ac83SMichal Simek  */
214115ac83SMichal Simek 
22dd17c8f7SRusty Russell #define PER_CPU(var) var
234115ac83SMichal Simek 
244115ac83SMichal Simek # ifndef __ASSEMBLY__
254115ac83SMichal Simek DECLARE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */
264115ac83SMichal Simek DECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */
274115ac83SMichal Simek DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */
284115ac83SMichal Simek DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
294115ac83SMichal Simek DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
304378bb69SMichal Simek 
314378bb69SMichal Simek extern asmlinkage void do_notify_resume(struct pt_regs *regs, int in_syscall);
324115ac83SMichal Simek # endif /* __ASSEMBLY__ */
334115ac83SMichal Simek 
344115ac83SMichal Simek #endif /* _ASM_MICROBLAZE_ENTRY_H */
35