Compiling CURRENT with XEN config fails

Bjoern A. Zeeb bzeeb-lists at lists.zabbadoz.net
Wed Apr 1 09:08:23 PDT 2009


On Wed, 1 Apr 2009, Björn JACKE wrote:

> On 2009-03-27 at 15:03 +0100 Mister Olli sent off:
>> /usr/src/sys/xen/evtchn/evtchn.c:516: error: conflicting types for 'bind_virq_to_irqhandler'
>> /usr/src/sys/xen/xen_intr.h:61: error: previous declaration of 'bind_virq_to_irqhandler' was here
>> /usr/src/sys/xen/evtchn/evtchn.c: In function 'bind_virq_to_irqhandler':
>> /usr/src/sys/xen/evtchn/evtchn.c:523: error: 'arg' undeclared (first use in this function)
>> /usr/src/sys/xen/evtchn/evtchn.c:523: error: (Each undeclared identifier is reported only once
>> /usr/src/sys/xen/evtchn/evtchn.c:523: error: for each function it appears in.)
>> *** Error code 1
>
> the attached patch should fix this one. Can someone review that please?

I had those since last weekend but there are even more ...
Not entirely sure about the second hunk of the console.c patch though.
I gave up as the universe I built worked for what I tested.


Index: sys/dev/xen/console/console.c
===================================================================
--- sys/dev/xen/console/console.c       (revision 190619)
+++ sys/dev/xen/console/console.c       (working copy)
@@ -225,7 +225,6 @@
  xc_attach(device_t dev)
  {
         int error;
-       struct xc_softc *sc = (struct xc_softc *)device_get_softc(dev);

         if (xen_start_info->flags & SIF_INITDOMAIN) {
                 xc_consdev.cn_putc = xccnputc_dom0;
@@ -248,6 +247,7 @@
                                  "console",
                                  NULL,
                                  xencons_priv_interrupt,
+                                NULL,
                                  INTR_TYPE_TTY, NULL);

                                 KASSERT(error >= 0, ("can't register console interrupt"));
Index: sys/xen/evtchn/evtchn.c
===================================================================
--- sys/xen/evtchn/evtchn.c     (revision 190619)
+++ sys/xen/evtchn/evtchn.c     (working copy)
@@ -512,7 +512,7 @@
  int
  bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu,
      const char *devname, driver_filter_t filter, driver_intr_t handler,
-    unsigned long irqflags, unsigned int *irqp)
+    void *arg, unsigned long irqflags, unsigned int *irqp)
  {
         unsigned int irq;
         int error;
Index: sys/xen/reboot.c
===================================================================
--- sys/xen/reboot.c    (revision 190619)
+++ sys/xen/reboot.c    (working copy)
@@ -176,9 +176,9 @@
         /*
          * Bind us to CPU 0 and stop any other VCPUs.
          */
-       mtx_lock_spin(&sched_lock);
+       thread_lock(curthread);
         sched_bind(curthread, 0);
-       mtx_unlock_spin(&sched_lock);
+       thread_unlock(curthread);
         KASSERT(PCPU_GET(cpuid) == 0, ("xen_suspend: not running on cpu 0"));

         map = PCPU_GET(other_cpus) & ~stopped_cpus;


-- 
Bjoern A. Zeeb                      The greatest risk is not taking one.


More information about the freebsd-xen mailing list