Go to the documentation of this file.
11 #ifndef _ASM_IA64_SWITCH_TO_H
12 #define _ASM_IA64_SWITCH_TO_H
35 # define PERFMON_IS_SYSWIDE() (__get_cpu_var(pfm_syst_info) & 0x1)
37 # define PERFMON_IS_SYSWIDE() (0)
40 #define IA64_HAS_EXTRA_STATE(t) \
41 ((t)->thread.flags & (IA64_THREAD_DBG_VALID|IA64_THREAD_PM_VALID) \
42 || PERFMON_IS_SYSWIDE())
44 #define __switch_to(prev,next,last) do { \
45 if (IA64_HAS_EXTRA_STATE(prev)) \
46 ia64_save_extra(prev); \
47 if (IA64_HAS_EXTRA_STATE(next)) \
48 ia64_load_extra(next); \
49 ia64_psr(task_pt_regs(next))->dfh = !ia64_is_local_fpu_owner(next); \
50 (last) = ia64_switch_to((next)); \
60 # define switch_to(prev,next,last) do { \
61 if (ia64_psr(task_pt_regs(prev))->mfh && ia64_is_local_fpu_owner(prev)) { \
62 ia64_psr(task_pt_regs(prev))->mfh = 0; \
63 (prev)->thread.flags |= IA64_THREAD_FPH_VALID; \
64 __ia64_save_fpu((prev)->thread.fph); \
66 __switch_to(prev, next, last); \
68 if (unlikely((current->thread.flags & IA64_THREAD_MIGRATION) && \
69 (task_cpu(current) != \
70 task_thread_info(current)->last_cpu))) { \
71 platform_migrate(current); \
72 task_thread_info(current)->last_cpu = task_cpu(current); \
76 # define switch_to(prev,next,last) __switch_to(prev, next, last)