|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/evtchn: Cleanup for virq_is_global() infrastructure
commit 474bb2e262b54e32ddb82b226ee1c69b86361930
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Sun Jan 21 17:21:05 2018 +0000
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Jan 30 10:28:59 2018 +0000
xen/evtchn: Cleanup for virq_is_global() infrastructure
Switch it, and the arch infrastructure, to return bool. Drop the
unnecessary
rc variable, and remove a redundant assertion from send_global_virq().
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/common/event_channel.c | 20 ++++++--------------
xen/include/asm-arm/event.h | 4 ++--
xen/include/asm-x86/event.h | 4 ++--
3 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index be834c5..c620465 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -93,29 +93,22 @@ static uint8_t
get_xen_consumer(xen_event_channel_notification_t fn)
/* Get the notification function for a given Xen-bound event channel. */
#define xen_notification_fn(e) (xen_consumers[(e)->xen_consumer-1])
-static int virq_is_global(uint32_t virq)
+static bool virq_is_global(unsigned int virq)
{
- int rc;
-
- ASSERT(virq < NR_VIRQS);
-
switch ( virq )
{
case VIRQ_TIMER:
case VIRQ_DEBUG:
case VIRQ_XENOPROF:
case VIRQ_XENPMU:
- rc = 0;
- break;
+ return false;
+
case VIRQ_ARCH_0 ... VIRQ_ARCH_7:
- rc = arch_virq_is_global(virq);
- break;
- default:
- rc = 1;
- break;
+ return arch_virq_is_global(virq);
}
- return rc;
+ ASSERT(virq < NR_VIRQS);
+ return true;
}
@@ -809,7 +802,6 @@ static DEFINE_SPINLOCK(global_virq_handlers_lock);
void send_global_virq(uint32_t virq)
{
- ASSERT(virq < NR_VIRQS);
ASSERT(virq_is_global(virq));
send_guest_global_virq(global_virq_handlers[virq] ?: hardware_domain,
virq);
diff --git a/xen/include/asm-arm/event.h b/xen/include/asm-arm/event.h
index caefa50..2b20d1a 100644
--- a/xen/include/asm-arm/event.h
+++ b/xen/include/asm-arm/event.h
@@ -54,9 +54,9 @@ static inline void local_event_delivery_enable(void)
}
/* No arch specific virq definition now. Default to global. */
-static inline int arch_virq_is_global(int virq)
+static inline bool arch_virq_is_global(unsigned int virq)
{
- return 1;
+ return true;
}
#endif
diff --git a/xen/include/asm-x86/event.h b/xen/include/asm-x86/event.h
index a91599d..2f6ea54 100644
--- a/xen/include/asm-x86/event.h
+++ b/xen/include/asm-x86/event.h
@@ -42,9 +42,9 @@ static inline void local_event_delivery_enable(void)
}
/* No arch specific virq definition now. Default to global. */
-static inline int arch_virq_is_global(uint32_t virq)
+static inline bool arch_virq_is_global(unsigned int virq)
{
- return 1;
+ return true;
}
#endif
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |