xen: Port Xen event channel driver from mini-os

Make required updates to run on u-boot. Strip functionality
not needed by U-boot.

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
This commit is contained in:
Oleksandr Andrushchenko 2020-08-06 12:42:49 +03:00 committed by Tom Rini
parent 486544161f
commit 673fd82c50
5 changed files with 242 additions and 4 deletions

View file

@ -20,6 +20,7 @@
#include <linux/bug.h>
#include <xen/hvm.h>
#include <xen/events.h>
#include <xen/interface/memory.h>
#define active_evtchns(cpu, sh, idx) \
@ -163,9 +164,7 @@ void do_hypervisor_callback(struct pt_regs *regs)
l2 &= ~(1UL << l2i);
port = (l1i * (sizeof(unsigned long) * 8)) + l2i;
/* TODO: handle new event: do_event(port, regs); */
/* Suppress -Wunused-but-set-variable */
(void)(port);
do_event(port, regs);
}
}
@ -236,5 +235,6 @@ void xen_init(void)
debug("%s\n", __func__);
map_shared_info(NULL);
init_events();
}