X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-ia64%2Fsystem.h;h=26e250bfb91211580635ac4665734389d46cd45b;hb=535e49f48e2fc95a6de8efb366ca8af35d424642;hp=595112bca3ccc8f39448dedcf9e195c6ac1f94d4;hpb=4c5cdb1e1f2a502069f57a60b5c6b97b8106c73c;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 595112bca3c..26e250bfb91 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h @@ -146,23 +146,23 @@ do { \ # define local_irq_save(x) \ do { \ - unsigned long psr; \ + unsigned long __psr; \ \ - __local_irq_save(psr); \ - if (psr & IA64_PSR_I) \ + __local_irq_save(__psr); \ + if (__psr & IA64_PSR_I) \ __save_ip(); \ - (x) = psr; \ + (x) = __psr; \ } while (0) -# define local_irq_disable() do { unsigned long x; local_irq_save(x); } while (0) +# define local_irq_disable() do { unsigned long __x; local_irq_save(__x); } while (0) # define local_irq_restore(x) \ do { \ - unsigned long old_psr, psr = (x); \ + unsigned long __old_psr, __psr = (x); \ \ - local_save_flags(old_psr); \ - __local_irq_restore(psr); \ - if ((old_psr & IA64_PSR_I) && !(psr & IA64_PSR_I)) \ + local_save_flags(__old_psr); \ + __local_irq_restore(__psr); \ + if ((__old_psr & IA64_PSR_I) && !(__psr & IA64_PSR_I)) \ __save_ip(); \ } while (0) @@ -210,6 +210,13 @@ struct task_struct; extern void ia64_save_extra (struct task_struct *task); extern void ia64_load_extra (struct task_struct *task); +#ifdef CONFIG_VIRT_CPU_ACCOUNTING +extern void ia64_account_on_switch (struct task_struct *prev, struct task_struct *next); +# define IA64_ACCOUNT_ON_SWITCH(p,n) ia64_account_on_switch(p,n) +#else +# define IA64_ACCOUNT_ON_SWITCH(p,n) +#endif + #ifdef CONFIG_PERFMON DECLARE_PER_CPU(unsigned long, pfm_syst_info); # define PERFMON_IS_SYSWIDE() (__get_cpu_var(pfm_syst_info) & 0x1) @@ -222,6 +229,7 @@ extern void ia64_load_extra (struct task_struct *task); || IS_IA32_PROCESS(task_pt_regs(t)) || PERFMON_IS_SYSWIDE()) #define __switch_to(prev,next,last) do { \ + IA64_ACCOUNT_ON_SWITCH(prev, next); \ if (IA64_HAS_EXTRA_STATE(prev)) \ ia64_save_extra(prev); \ if (IA64_HAS_EXTRA_STATE(next)) \ @@ -266,6 +274,10 @@ void cpu_idle_wait(void); void default_idle(void); +#ifdef CONFIG_VIRT_CPU_ACCOUNTING +extern void account_system_vtime(struct task_struct *); +#endif + #endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */