blob: af0144b91b79c36382e986b76d956492fd4bbd25 [file] [log] [blame]
Michal Simek4115ac82009-03-27 14:25:43 +01001/*
2 * Definitions used by low-level trap handlers
3 *
Michal Simekca545022009-05-26 16:30:21 +02004 * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
5 * Copyright (C) 2007-2009 PetaLogix
Michal Simek4115ac82009-03-27 14:25:43 +01006 * Copyright (C) 2007 John Williams <john.williams@petalogix.com>
7 *
8 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file COPYING in the main directory of this
10 * archive for more details.
11 */
12
13#ifndef _ASM_MICROBLAZE_ENTRY_H
14#define _ASM_MICROBLAZE_ENTRY_H
15
16#include <asm/percpu.h>
17#include <asm/ptrace.h>
18
19/*
20 * These are per-cpu variables required in entry.S, among other
21 * places
22 */
23
Rusty Russelldd17c8f2009-10-29 22:34:15 +090024#define PER_CPU(var) var
Michal Simek4115ac82009-03-27 14:25:43 +010025
26# ifndef __ASSEMBLY__
27DECLARE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */
28DECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */
29DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */
30DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
31DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
Michal Simek4115ac82009-03-27 14:25:43 +010032# endif /* __ASSEMBLY__ */
33
Michal Simek4115ac82009-03-27 14:25:43 +010034#endif /* _ASM_MICROBLAZE_ENTRY_H */