move msi-related functionality to generic isrm
[lunaix-os.git] / lunaix-os / arch / x86 / exceptions / isrm.c
index dea130ccd546db6a13e54a9c19b5914c262ae536..a3c223d6833b3b52fd9d03c8b34d3e493574c5f4 100644 (file)
@@ -1,6 +1,6 @@
 #include <lunaix/spike.h>
 #include <lunaix/owloysius.h>
-#include <asm-generic/isrm.h>
+#include <asm/x86_isrm.h>
 
 #include "asm/x86.h"
 #include "asm/soc/ioapic.h"
@@ -165,6 +165,24 @@ isrm_notify_eos(cpu_t id)
     isrm_notify_eoi(id, LUNAIX_SCHED);
 }
 
+msi_vector_t
+isrm_msialloc(isr_cb handler)
+{
+    unsigned int iv = isrm_ivexalloc(handler);
+
+    return (msi_vector_t){ 
+        .msi_addr  = 0xfee00000,
+        .msi_data  = iv,
+        .mapped_iv = iv
+    };
+}
+
+int
+isrm_bind_dtnode(struct dt_intr_node* node)
+{
+    fail("not supported");
+}
+
 
 static void
 __intc_init()