aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/include/asm/current.h
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-02-11 09:22:57 -0500
committerVineet Gupta <vgupta@synopsys.com>2013-02-15 12:45:58 -0500
commit080c37473eb671a037b3e9a315303851f0675be5 (patch)
treeb407d85217f9c979eed57f2adb31bc3fb06a9c09 /arch/arc/include/asm/current.h
parent8872e9e513eba636c8d4266fe667660f73cd66e6 (diff)
ARC: [optim] Cache "current" in Register r25
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include/asm/current.h')
-rw-r--r--arch/arc/include/asm/current.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arc/include/asm/current.h b/arch/arc/include/asm/current.h
new file mode 100644
index 000000000000..87b918585c4a
--- /dev/null
+++ b/arch/arc/include/asm/current.h
@@ -0,0 +1,32 @@
1/*
2 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * Vineetg: May 16th, 2008
9 * - Current macro is now implemented as "global register" r25
10 */
11
12#ifndef _ASM_ARC_CURRENT_H
13#define _ASM_ARC_CURRENT_H
14
15#ifdef __KERNEL__
16
17#ifndef __ASSEMBLY__
18
19#ifdef CONFIG_ARC_CURR_IN_REG
20
21register struct task_struct *curr_arc asm("r25");
22#define current (curr_arc)
23
24#else
25#include <asm-generic/current.h>
26#endif /* ! CONFIG_ARC_CURR_IN_REG */
27
28#endif /* ! __ASSEMBLY__ */
29
30#endif /* __KERNEL__ */
31
32#endif /* _ASM_ARC_CURRENT_H */