diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-08-22 09:52:18 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-08-22 09:52:18 +0100 |
commit | 96590ca76049f2679ba72e43bc0bde6e9e537978 (patch) | |
tree | 77bd60fffd99e086e569b7faa1793595c2c1a44d /xen/include/xen/spinlock.h | |
parent | 37eb6d05fe1a343ec051f5d59e88b8ee5a450ceb (diff) | |
download | xen-96590ca76049f2679ba72e43bc0bde6e9e537978.tar.gz xen-96590ca76049f2679ba72e43bc0bde6e9e537978.tar.bz2 xen-96590ca76049f2679ba72e43bc0bde6e9e537978.zip |
Implement ACPI APEI ERST feature
APEI are ACPI4.0 new features. It consists of ERST, BERT, HEST, and
EINJ. ERST is used to save fault error log to a platform persistent
storage, so that when reboot os can retrieve the error log and handle
it.
This patch is used to implement ERST feature to Xen. It consists of
3-level hierarchy: operation level, action level, and instru= ction
level. Instruction do basic io; Action done by sequential
instructions parsed from ACPI ERST table; Operation done by
sequential actions defined by ACPI spec, providing erst_write/
erst_read/ erst_clear interfaces to MCE/ NMI/ PCIe error handling
mechanism, etc.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Diffstat (limited to 'xen/include/xen/spinlock.h')
-rw-r--r-- | xen/include/xen/spinlock.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h index f6f737d756..a2d1ed99bf 100644 --- a/xen/include/xen/spinlock.h +++ b/xen/include/xen/spinlock.h @@ -181,6 +181,13 @@ int _rw_is_write_locked(rwlock_t *lock); #define spin_is_locked(l) _spin_is_locked(l) #define spin_trylock(l) _spin_trylock(l) +#define spin_trylock_irqsave(lock, flags) \ +({ \ + local_irq_save(flags); \ + spin_trylock(lock) ? \ + 1 : ({ local_irq_restore(flags); 0; }); \ +}) + /* Ensure a lock is quiescent between two critical operations. */ #define spin_barrier(l) _spin_barrier(l) #define spin_barrier_irq(l) _spin_barrier_irq(l) |