Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/xen inline 2 trivial functions that are called ofte...



details:   https://anonhg.NetBSD.org/src/rev/18fd209b8132
branches:  trunk
changeset: 584494:18fd209b8132
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Tue Sep 20 20:33:53 2005 +0000

description:
inline 2 trivial functions that are called often (according to profiling
data).

diffstat:

 sys/arch/xen/i386/hypervisor_machdep.c |  17 ++---------------
 sys/arch/xen/include/hypervisor.h      |  25 +++++++++++++++++++++----
 sys/arch/xen/xen/hypervisor.c          |  14 ++------------
 3 files changed, 25 insertions(+), 31 deletions(-)

diffs (123 lines):

diff -r e737598f1d6c -r 18fd209b8132 sys/arch/xen/i386/hypervisor_machdep.c
--- a/sys/arch/xen/i386/hypervisor_machdep.c    Tue Sep 20 20:29:18 2005 +0000
+++ b/sys/arch/xen/i386/hypervisor_machdep.c    Tue Sep 20 20:33:53 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hypervisor_machdep.c,v 1.12 2005/04/30 08:37:16 yamt Exp $     */
+/*     $NetBSD: hypervisor_machdep.c,v 1.13 2005/09/20 20:33:53 bouyer Exp $   */
 
 /*
  *
@@ -59,7 +59,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.12 2005/04/30 08:37:16 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.13 2005/09/20 20:33:53 bouyer Exp $");
 
 #include <sys/cdefs.h>
 #include <sys/param.h>
@@ -74,19 +74,6 @@
 
 /* #define PORT_DEBUG -1 */
 
-/*
- * Force a proper event-channel callback from Xen after clearing the
- * callback mask. We do this in a very simple manner, by making a call
- * down into Xen. The pending flag will be checked by Xen on return.
- */
-void
-hypervisor_force_callback(void)
-{
-       // DDD printf("hypervisor_force_callback\n");
-
-       (void)HYPERVISOR_xen_version(0);
-}
-
 int stipending(void);
 int
 stipending()
diff -r e737598f1d6c -r 18fd209b8132 sys/arch/xen/include/hypervisor.h
--- a/sys/arch/xen/include/hypervisor.h Tue Sep 20 20:29:18 2005 +0000
+++ b/sys/arch/xen/include/hypervisor.h Tue Sep 20 20:33:53 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hypervisor.h,v 1.14 2005/05/11 13:53:41 yamt Exp $     */
+/*     $NetBSD: hypervisor.h,v 1.15 2005/09/20 20:33:53 bouyer Exp $   */
 
 /*
  * 
@@ -85,15 +85,12 @@
 /* hypervisor.c */
 struct intrframe;
 void do_hypervisor_callback(struct intrframe *regs);
-void hypervisor_notify_via_evtchn(unsigned int);
 void hypervisor_enable_event(unsigned int);
 
 /* hypervisor_machdep.c */
 void hypervisor_unmask_event(unsigned int);
 void hypervisor_mask_event(unsigned int);
 void hypervisor_clear_event(unsigned int);
-void hypervisor_force_callback(void)
-    __attribute__((no_instrument_function)); /* used by mcount */
 void hypervisor_enable_ipl(unsigned int);
 void hypervisor_set_ipending(u_int32_t, int, int);
 
@@ -528,4 +525,24 @@
     return ret;
 }
 
+/* 
+ * Force a proper event-channel callback from Xen after clearing the
+ * callback mask. We do this in a very simple manner, by making a call
+ * down into Xen. The pending flag will be checked by Xen on return. 
+ */
+static inline void hypervisor_force_callback(void)
+{
+       (void)HYPERVISOR_xen_version(0);
+} __attribute__((no_instrument_function)) /* used by mcount */
+
+static inline void
+hypervisor_notify_via_evtchn(unsigned int port)
+{
+       evtchn_op_t op;
+
+       op.cmd = EVTCHNOP_send;
+       op.u.send.local_port = port;
+       (void)HYPERVISOR_event_channel_op(&op);
+}
+
 #endif /* _XEN_HYPERVISOR_H_ */
diff -r e737598f1d6c -r 18fd209b8132 sys/arch/xen/xen/hypervisor.c
--- a/sys/arch/xen/xen/hypervisor.c     Tue Sep 20 20:29:18 2005 +0000
+++ b/sys/arch/xen/xen/hypervisor.c     Tue Sep 20 20:33:53 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.c,v 1.16 2005/08/21 22:20:28 bouyer Exp $ */
+/* $NetBSD: hypervisor.c,v 1.17 2005/09/20 20:33:53 bouyer Exp $ */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -63,7 +63,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.16 2005/08/21 22:20:28 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.17 2005/09/20 20:33:53 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -293,16 +293,6 @@
        return (UNCONF);
 }
 
-void
-hypervisor_notify_via_evtchn(unsigned int port)
-{
-       evtchn_op_t op;
-
-       op.cmd = EVTCHNOP_send;
-       op.u.send.local_port = port;
-       (void)HYPERVISOR_event_channel_op(&op);
-}
-
 #ifdef DOM0OPS
 
 #define DIR_MODE       (S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)



Home | Main Index | Thread Index | Old Index