ACPI: thinkpad-acpi: add bluetooth and WWAN rfkill support
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / asm-v850 / current.h
blob30aae5673770b2b0ec2ddb9fa662ade9bd21cf1e
1 /*
2 * include/asm-v850/current.h -- Current task
4 * Copyright (C) 2001,02 NEC Corporation
5 * Copyright (C) 2001,02 Miles Bader <miles@gnu.org>
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
11 * Written by Miles Bader <miles@gnu.org>
14 #ifndef __V850_CURRENT_H__
15 #define __V850_CURRENT_H__
17 #ifndef __ASSEMBLY__ /* <linux/thread_info.h> is not asm-safe. */
18 #include <linux/thread_info.h>
19 #endif
21 #include <asm/macrology.h>
24 /* Register used to hold the current task pointer while in the kernel.
25 Any `call clobbered' register without a special meaning should be OK,
26 but check asm/v850/kernel/entry.S to be sure. */
27 #define CURRENT_TASK_REGNUM 16
28 #define CURRENT_TASK macrology_paste (r, CURRENT_TASK_REGNUM)
31 #ifdef __ASSEMBLY__
33 /* Put a pointer to the current task structure into REG. */
34 #define GET_CURRENT_TASK(reg) \
35 GET_CURRENT_THREAD(reg); \
36 ld.w TI_TASK[reg], reg
38 #else /* !__ASSEMBLY__ */
40 /* A pointer to the current task. */
41 register struct task_struct *current \
42 __asm__ (macrology_stringify (CURRENT_TASK));
44 #endif /* __ASSEMBLY__ */
47 #endif /* _V850_CURRENT_H */