Module Name:    src
Committed By:   cherry
Date:           Sun Jun 26 12:56:33 UTC 2011

Modified Files:
        src/sys/arch/xen/include [cherry-xenmp]: intr.h
        src/sys/arch/xen/xen [cherry-xenmp]: hypervisor.c

Log Message:
Unbreak uniprocessor build


To generate a diff of this commit:
cvs rdiff -u -r1.31.10.1 -r1.31.10.2 src/sys/arch/xen/include/intr.h
cvs rdiff -u -r1.55.2.1 -r1.55.2.2 src/sys/arch/xen/xen/hypervisor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/include/intr.h
diff -u src/sys/arch/xen/include/intr.h:1.31.10.1 src/sys/arch/xen/include/intr.h:1.31.10.2
--- src/sys/arch/xen/include/intr.h:1.31.10.1	Fri Jun  3 13:27:40 2011
+++ src/sys/arch/xen/include/intr.h	Sun Jun 26 12:56:32 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.31.10.1 2011/06/03 13:27:40 cherry Exp $	*/
+/*	$NetBSD: intr.h,v 1.31.10.2 2011/06/26 12:56:32 cherry Exp $	*/
 /*	NetBSD intr.h,v 1.15 2004/10/31 10:39:34 yamt Exp	*/
 
 /*-
@@ -185,9 +185,15 @@
 struct pic *intr_findpic(int);
 void intr_add_pcibus(struct pcibus_attach_args *);
 
+#ifdef MULTIPROCESSOR
 void xen_ipi_init(void);
 int xen_send_ipi(struct cpu_info *, uint32_t);
 void xen_broadcast_ipi(uint32_t);
+#else
+#define xen_ipi_init(_1) do {} while(0) /* nothing */
+#define xen_send_ipi(_i1, _i2) do {} while(0) /* nothing */
+#define xen_broadcast_ipi(_i1) do {} while(0) /* nothing */
+#endif /* MULTIPROCESSOR */
 
 #endif /* !_LOCORE */
 

Index: src/sys/arch/xen/xen/hypervisor.c
diff -u src/sys/arch/xen/xen/hypervisor.c:1.55.2.1 src/sys/arch/xen/xen/hypervisor.c:1.55.2.2
--- src/sys/arch/xen/xen/hypervisor.c:1.55.2.1	Fri Jun  3 13:27:42 2011
+++ src/sys/arch/xen/xen/hypervisor.c	Sun Jun 26 12:56:33 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.c,v 1.55.2.1 2011/06/03 13:27:42 cherry Exp $ */
+/* $NetBSD: hypervisor.c,v 1.55.2.2 2011/06/26 12:56:33 cherry Exp $ */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -53,7 +53,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.55.2.1 2011/06/03 13:27:42 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.55.2.2 2011/06/26 12:56:33 cherry Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -128,7 +128,6 @@
     hypervisor_match, hypervisor_attach, NULL, NULL);
 
 static int hypervisor_print(void *, const char *);
-static int hypervisor_vcpu_print(void *, const char *);
 
 union hypervisor_attach_cookie {
 	const char *hac_device;		/* first elem of all */
@@ -183,6 +182,15 @@
 	return 0;
 }
 
+#ifdef MULTIPROCESSOR
+static int
+hypervisor_vcpu_print(void *aux, const char *parent)
+{
+	/* Unconfigured cpus are ignored quietly. */
+	return (QUIET);
+}
+#endif /* MULTIPROCESSOR */
+
 /*
  * Attach the hypervisor.
  */
@@ -190,7 +198,6 @@
 hypervisor_attach(device_t parent, device_t self, void *aux)
 {
 	int xen_version;
-	cpuid_t vcpuid;
 
 #if NPCI >0
 #ifdef PCI_BUS_FIXUP
@@ -226,6 +233,7 @@
 	 * allocated vcpus (See: cpu.c:vcpu_match()) by iterating
 	 * through the maximum supported by NetBSD MP.
 	 */
+	cpuid_t vcpuid;
 
 	for (vcpuid = 1; vcpuid < maxcpus; vcpuid++) {
 		memset(&hac, 0, sizeof(hac));
@@ -331,13 +339,6 @@
 	return (UNCONF);
 }
 
-static int
-hypervisor_vcpu_print(void *aux, const char *parent)
-{
-	/* Unconfigured cpus are ignored quietly. */
-	return (QUIET);
-}
-
 #if defined(DOM0OPS)
 
 #define DIR_MODE	(S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)

Reply via email to