summaryrefslogtreecommitdiffstats
path: root/sys/xen
diff options
context:
space:
mode:
authorroyger <royger@FreeBSD.org>2015-11-05 14:33:46 +0000
committerroyger <royger@FreeBSD.org>2015-11-05 14:33:46 +0000
commit1e8c98e50165316b7a83c12342caaf64d0364a25 (patch)
treec3ec11c4671476a88a8719ef5f24e7898dfb4ef0 /sys/xen
parent9614edb1e1641235b9e6a493e7b56a5c07bc0165 (diff)
downloadFreeBSD-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.h6
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
/*
OpenPOWER on IntegriCloud