aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/current.h
blob: 82cd4a9ca99a92faca63cf01e41ebc75f6a35c38 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef _ASM_POWERPC_CURRENT_H
#define _ASM_POWERPC_CURRENT_H

/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 */

struct task_struct;

#ifdef __powerpc64__
#include <asm/paca.h>

#define current		(get_paca()->__current)

#else

/*
 * We keep `current' in r2 for speed.
 */
register struct task_struct *current asm ("r2");

#endif

#endif /* _ASM_POWERPC_CURRENT_H */