diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2008-05-19 13:13:31 (GMT) |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-05-27 21:39:07 (GMT) |
commit | 72cb4256c7574e1c2c1350fa92eecd7cef9e4772 (patch) | |
tree | 56d2872fafa5965816d339f3cea9ff06e288c1d1 /include/asm-ia64/system.h | |
parent | 0e1a77ccdbc4ca59ccaf84168a0c3c1df4fadfc0 (diff) | |
download | linux-fsl-qoriq-72cb4256c7574e1c2c1350fa92eecd7cef9e4772.tar.xz |
[IA64] pvops: preparation: introduce ia64_get_psr_i() to make kernel paravirtualization friendly.
__local_irq_save() and local_save_flags() are used to mask interruptions.
They read all psr bits that requres whole bit emulation.
On the other hand, reading only psr.i, the single bit, can be virtualized
cheaply.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64/system.h')
-rw-r--r-- | include/asm-ia64/system.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 0db8c98..927a381 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h @@ -123,10 +123,16 @@ extern struct ia64_boot_param { * write a floating-point register right before reading the PSR * and that writes to PSR.mfl */ +#ifdef CONFIG_PARAVIRT +#define __local_save_flags() ia64_get_psr_i() +#else +#define __local_save_flags() ia64_getreg(_IA64_REG_PSR) +#endif + #define __local_irq_save(x) \ do { \ ia64_stop(); \ - (x) = ia64_getreg(_IA64_REG_PSR); \ + (x) = __local_save_flags(); \ ia64_stop(); \ ia64_rsm(IA64_PSR_I); \ } while (0) @@ -174,7 +180,7 @@ do { \ #endif /* !CONFIG_IA64_DEBUG_IRQ */ #define local_irq_enable() ({ ia64_stop(); ia64_ssm(IA64_PSR_I); ia64_srlz_d(); }) -#define local_save_flags(flags) ({ ia64_stop(); (flags) = ia64_getreg(_IA64_REG_PSR); }) +#define local_save_flags(flags) ({ ia64_stop(); (flags) = __local_save_flags(); }) #define irqs_disabled() \ ({ \ |