Re: Compiling CURRENT with XEN config fails

From: Bjoern A. Zeeb <bzeeb-lists_at_lists.zabbadoz.net>
Date: Wed, 1 Apr 2009 15:47:18 +0000 (UTC)
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)
_at__at_ -225,7 +225,6 _at__at_
  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;
_at__at_ -248,6 +247,7 _at__at_
                                  "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)
_at__at_ -512,7 +512,7 _at__at_
  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)
_at__at_ -176,9 +176,9 _at__at_
         /*
          * 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.
Received on Wed Apr 01 2009 - 14:08:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:45 UTC