Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

nexus: Implement bus_config_intr bus method

  • Loading branch information...
commit bef055ab4c066b25ff7d1f1aa8e9261ebdb9e316 1 parent d1ae732
Sepherosa Ziehau authored
Showing with 24 additions and 0 deletions.
  1. +12 −0 sys/platform/pc32/i386/nexus.c
  2. +12 −0 sys/platform/pc64/x86_64/nexus.c
View
12 sys/platform/pc32/i386/nexus.c
@@ -48,6 +48,7 @@
#include <sys/module.h>
#include <sys/rman.h>
#include <sys/interrupt.h>
+#include <sys/machintr.h>
#include <machine/vmparam.h>
#include <vm/vm.h>
@@ -92,6 +93,8 @@ static int nexus_deactivate_resource(device_t, device_t, int, int,
struct resource *);
static int nexus_release_resource(device_t, device_t, int, int,
struct resource *);
+static int nexus_config_intr(device_t, device_t, int, enum intr_trigger,
+ enum intr_polarity);
static int nexus_setup_intr(device_t, device_t, struct resource *, int flags,
void (*)(void *), void *,
void **, lwkt_serialize_t);
@@ -124,6 +127,7 @@ static device_method_t nexus_methods[] = {
DEVMETHOD(bus_release_resource, nexus_release_resource),
DEVMETHOD(bus_activate_resource, nexus_activate_resource),
DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource),
+ DEVMETHOD(bus_config_intr, nexus_config_intr),
DEVMETHOD(bus_setup_intr, nexus_setup_intr),
DEVMETHOD(bus_teardown_intr, nexus_teardown_intr),
DEVMETHOD(bus_set_resource, nexus_set_resource),
@@ -471,6 +475,14 @@ nexus_release_resource(device_t bus, device_t child, int type, int rid,
return (rman_release_resource(r));
}
+static int
+nexus_config_intr(device_t bus, device_t chile, int irq,
+ enum intr_trigger trig, enum intr_polarity pola)
+{
+ machintr_intr_config(irq, trig, pola);
+ return 0;
+}
+
/*
* Currently this uses the really grody interface from kern/kern_intr.c
* (which really doesn't belong in kern/anything.c). Eventually, all of
View
12 sys/platform/pc64/x86_64/nexus.c
@@ -49,6 +49,7 @@
#include <sys/module.h>
#include <sys/rman.h>
#include <sys/interrupt.h>
+#include <sys/machintr.h>
#include <machine/vmparam.h>
#include <vm/vm.h>
@@ -88,6 +89,8 @@ static int nexus_deactivate_resource(device_t, device_t, int, int,
struct resource *);
static int nexus_release_resource(device_t, device_t, int, int,
struct resource *);
+static int nexus_config_intr(device_t, device_t, int, enum intr_trigger,
+ enum intr_polarity);
static int nexus_setup_intr(device_t, device_t, struct resource *, int flags,
void (*)(void *), void *,
void **, lwkt_serialize_t);
@@ -120,6 +123,7 @@ static device_method_t nexus_methods[] = {
DEVMETHOD(bus_release_resource, nexus_release_resource),
DEVMETHOD(bus_activate_resource, nexus_activate_resource),
DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource),
+ DEVMETHOD(bus_config_intr, nexus_config_intr),
DEVMETHOD(bus_setup_intr, nexus_setup_intr),
DEVMETHOD(bus_teardown_intr, nexus_teardown_intr),
DEVMETHOD(bus_set_resource, nexus_set_resource),
@@ -467,6 +471,14 @@ nexus_release_resource(device_t bus, device_t child, int type, int rid,
return (rman_release_resource(r));
}
+static int
+nexus_config_intr(device_t bus, device_t chile, int irq,
+ enum intr_trigger trig, enum intr_polarity pola)
+{
+ machintr_intr_config(irq, trig, pola);
+ return 0;
+}
+
/*
* Currently this uses the really grody interface from kern/kern_intr.c
* (which really doesn't belong in kern/anything.c). Eventually, all of
Please sign in to comment.
Something went wrong with that request. Please try again.