diff options
author | royger <royger@FreeBSD.org> | 2015-11-05 14:33:46 +0000 |
---|---|---|
committer | royger <royger@FreeBSD.org> | 2015-11-05 14:33:46 +0000 |
commit | 1e8c98e50165316b7a83c12342caaf64d0364a25 (patch) | |
tree | c3ec11c4671476a88a8719ef5f24e7898dfb4ef0 /sys/xen | |
parent | 9614edb1e1641235b9e6a493e7b56a5c07bc0165 (diff) | |
download | FreeBSD-src-1e8c98e50165316b7a83c12342caaf64d0364a25.zip FreeBSD-src-1e8c98e50165316b7a83c12342caaf64d0364a25.tar.gz |
xen/intr: fix the event channel enabled per-cpu mask
Fix two issues with the current event channel code, first ENABLED_SETSIZE is
not correctly defined and then using a BITSET to store the per-cpu masks is
not portable to other arches, since on arm32 the event channel arrays shared
with the hypervisor are of type uint64_t and not long. Partially restore the
previous code but switch the bit operations to use the recently introduced
xen_{set/clear/test}_bit versions.
Reviewed by: Julien Grall <julien.grall@citrix.com>
Sponsored by: Citrix Systems R&D
Differential Revision: https://reviews.freebsd.org/D4080
Diffstat (limited to 'sys/xen')
-rw-r--r-- | sys/xen/xen-os.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/xen/xen-os.h b/sys/xen/xen-os.h index eec8244..0aa3bb50 100644 --- a/sys/xen/xen-os.h +++ b/sys/xen/xen-os.h @@ -112,6 +112,12 @@ xen_set_bit(int bit, volatile long *addr) atomic_set_long(&addr[bit / NBPL], 1UL << (bit % NBPL)); } +static inline void +xen_clear_bit(int bit, volatile long *addr) +{ + atomic_clear_long(&addr[bit / NBPL], 1UL << (bit % NBPL)); +} + #undef NPBL /* |