]> xenbits.xensource.com Git - osstest/rumprun.git/commitdiff
Rename bmk_isr_init -> bmk_isr_rumpkernel
authorAntti Kantee <pooka@iki.fi>
Wed, 17 Feb 2016 12:53:13 +0000 (12:53 +0000)
committerAntti Kantee <pooka@iki.fi>
Wed, 17 Feb 2016 12:53:13 +0000 (12:53 +0000)
The established handler will always call the rump kernel, so
reflect that in the name.  Also, give it a flags parameter
(always 0 for now).

platform/hw/include/hw/kernel.h
platform/hw/intr.c
platform/hw/pci/rumppci.c

index 3e487575ad1634e93f7ceaf60aef9ff42741596c..d403664826ce798cbc72be47f3fb18e4f7744cd1 100644 (file)
@@ -21,7 +21,7 @@ bmk_time_t cpu_clock_epochoffset(void);
 
 void isr(int);
 int intr_init(void);
-int bmk_isr_init(int (*)(void *), void *, int);
+int bmk_isr_rumpkernel(int (*)(void *), void *, int, int);
 
 #define BMK_MULTIBOOT_CMDLINE_SIZE 4096
 extern char multiboot_cmdline[];
index f5be29913a6101a72a31bf55ffc3ce2685c4cfe9..97a2bd8abc15dbb803bbaa582a2856d9a3611e37 100644 (file)
@@ -43,6 +43,7 @@
 struct intrhand {
        int (*ih_fun)(void *);
        void *ih_arg;
+       int ih_flags;
 
        SLIST_ENTRY(intrhand) ih_entries;
 };
@@ -131,7 +132,7 @@ doisr(void *arg)
 }
 
 int
-bmk_isr_init(int (*func)(void *), void *arg, int intr)
+bmk_isr_rumpkernel(int (*func)(void *), void *arg, int intr, int flags)
 {
        struct intrhand *ih;
        int error;
@@ -139,6 +140,9 @@ bmk_isr_init(int (*func)(void *), void *arg, int intr)
        if (intr > sizeof(isr_todo)*8 || intr > BMK_MAXINTR)
                return BMK_EGENERIC;
 
+       if (flags != 0)
+               bmk_platform_halt("bmk_isr_rumpkernel: invalid flags");
+
        ih = bmk_xmalloc_bmk(sizeof(*ih));
        if (!ih)
                return BMK_ENOMEM;
@@ -149,6 +153,7 @@ bmk_isr_init(int (*func)(void *), void *arg, int intr)
        }
        ih->ih_fun = func;
        ih->ih_arg = arg;
+       ih->ih_flags = flags;
        SLIST_INSERT_HEAD(&isr_ih[intr % BMK_INTRLEVS], ih, ih_entries);
        if ((unsigned)intr < isr_lowest)
                isr_lowest = intr;
index eb2984d129f2f8d9d5f360e25c2ef201cf7cd233..82a891b5c085779f22939541e88237744b4f56e8 100644 (file)
@@ -97,7 +97,7 @@ void *
 rumpcomp_pci_irq_establish(unsigned cookie, int (*handler)(void *), void *data)
 {
 
-       if (bmk_isr_init(handler, data, intrs[cookie]) == 0)
+       if (bmk_isr_rumpkernel(handler, data, intrs[cookie], 0) == 0)
                return &intrs[cookie];
        else
                return NULL;