Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

nexus: Implement bus_config_intr bus method

  • Loading branch information...
commit bef055ab4c066b25ff7d1f1aa8e9261ebdb9e316 1 parent d1ae732
Sepherosa Ziehau authored
12 sys/platform/pc32/i386/nexus.c
@@ -48,6 +48,7 @@
48 48 #include <sys/module.h>
49 49 #include <sys/rman.h>
50 50 #include <sys/interrupt.h>
  51 +#include <sys/machintr.h>
51 52
52 53 #include <machine/vmparam.h>
53 54 #include <vm/vm.h>
@@ -92,6 +93,8 @@ static int nexus_deactivate_resource(device_t, device_t, int, int,
92 93 struct resource *);
93 94 static int nexus_release_resource(device_t, device_t, int, int,
94 95 struct resource *);
  96 +static int nexus_config_intr(device_t, device_t, int, enum intr_trigger,
  97 + enum intr_polarity);
95 98 static int nexus_setup_intr(device_t, device_t, struct resource *, int flags,
96 99 void (*)(void *), void *,
97 100 void **, lwkt_serialize_t);
@@ -124,6 +127,7 @@ static device_method_t nexus_methods[] = {
124 127 DEVMETHOD(bus_release_resource, nexus_release_resource),
125 128 DEVMETHOD(bus_activate_resource, nexus_activate_resource),
126 129 DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource),
  130 + DEVMETHOD(bus_config_intr, nexus_config_intr),
127 131 DEVMETHOD(bus_setup_intr, nexus_setup_intr),
128 132 DEVMETHOD(bus_teardown_intr, nexus_teardown_intr),
129 133 DEVMETHOD(bus_set_resource, nexus_set_resource),
@@ -471,6 +475,14 @@ nexus_release_resource(device_t bus, device_t child, int type, int rid,
471 475 return (rman_release_resource(r));
472 476 }
473 477
  478 +static int
  479 +nexus_config_intr(device_t bus, device_t chile, int irq,
  480 + enum intr_trigger trig, enum intr_polarity pola)
  481 +{
  482 + machintr_intr_config(irq, trig, pola);
  483 + return 0;
  484 +}
  485 +
474 486 /*
475 487 * Currently this uses the really grody interface from kern/kern_intr.c
476 488 * (which really doesn't belong in kern/anything.c). Eventually, all of
12 sys/platform/pc64/x86_64/nexus.c
@@ -49,6 +49,7 @@
49 49 #include <sys/module.h>
50 50 #include <sys/rman.h>
51 51 #include <sys/interrupt.h>
  52 +#include <sys/machintr.h>
52 53
53 54 #include <machine/vmparam.h>
54 55 #include <vm/vm.h>
@@ -88,6 +89,8 @@ static int nexus_deactivate_resource(device_t, device_t, int, int,
88 89 struct resource *);
89 90 static int nexus_release_resource(device_t, device_t, int, int,
90 91 struct resource *);
  92 +static int nexus_config_intr(device_t, device_t, int, enum intr_trigger,
  93 + enum intr_polarity);
91 94 static int nexus_setup_intr(device_t, device_t, struct resource *, int flags,
92 95 void (*)(void *), void *,
93 96 void **, lwkt_serialize_t);
@@ -120,6 +123,7 @@ static device_method_t nexus_methods[] = {
120 123 DEVMETHOD(bus_release_resource, nexus_release_resource),
121 124 DEVMETHOD(bus_activate_resource, nexus_activate_resource),
122 125 DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource),
  126 + DEVMETHOD(bus_config_intr, nexus_config_intr),
123 127 DEVMETHOD(bus_setup_intr, nexus_setup_intr),
124 128 DEVMETHOD(bus_teardown_intr, nexus_teardown_intr),
125 129 DEVMETHOD(bus_set_resource, nexus_set_resource),
@@ -467,6 +471,14 @@ nexus_release_resource(device_t bus, device_t child, int type, int rid,
467 471 return (rman_release_resource(r));
468 472 }
469 473
  474 +static int
  475 +nexus_config_intr(device_t bus, device_t chile, int irq,
  476 + enum intr_trigger trig, enum intr_polarity pola)
  477 +{
  478 + machintr_intr_config(irq, trig, pola);
  479 + return 0;
  480 +}
  481 +
470 482 /*
471 483 * Currently this uses the really grody interface from kern/kern_intr.c
472 484 * (which really doesn't belong in kern/anything.c). Eventually, all of

0 comments on commit bef055a

Please sign in to comment.
Something went wrong with that request. Please try again.