summaryrefslogtreecommitdiff
path: root/include/asm-ia64/thread_info.h
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2008-04-17 10:12:27 -0700
committerTony Luck <tony.luck@intel.com>2008-04-17 10:12:27 -0700
commit14d0647c98f52e2d76113d44de6b771ec87a934f (patch)
tree4b9407b00ad0b5baf5ee6245a4157a07062680b5 /include/asm-ia64/thread_info.h
parent2a467d5f7d6bdc90c365db167a10022dd8351894 (diff)
parentb64f34cdfe5bef9dfed1304c513220b0f2862eca (diff)
Pull virt-cpu-accounting into release branch
Diffstat (limited to 'include/asm-ia64/thread_info.h')
-rw-r--r--include/asm-ia64/thread_info.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h
index 93d83cbe0c8c..6da8069a0f77 100644
--- a/include/asm-ia64/thread_info.h
+++ b/include/asm-ia64/thread_info.h
@@ -31,6 +31,12 @@ struct thread_info {
mm_segment_t addr_limit; /* user-level address space limit */
int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */
struct restart_block restart_block;
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING
+ __u64 ac_stamp;
+ __u64 ac_leave;
+ __u64 ac_stime;
+ __u64 ac_utime;
+#endif
};
#define THREAD_SIZE KERNEL_STACK_SIZE
@@ -62,9 +68,17 @@ struct thread_info {
#define task_stack_page(tsk) ((void *)(tsk))
#define __HAVE_THREAD_FUNCTIONS
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING
+#define setup_thread_stack(p, org) \
+ *task_thread_info(p) = *task_thread_info(org); \
+ task_thread_info(p)->ac_stime = 0; \
+ task_thread_info(p)->ac_utime = 0; \
+ task_thread_info(p)->task = (p);
+#else
#define setup_thread_stack(p, org) \
*task_thread_info(p) = *task_thread_info(org); \
task_thread_info(p)->task = (p);
+#endif
#define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET)
#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR