summaryrefslogtreecommitdiff
path: root/sound/xen/xen_snd_front.c
diff options
context:
space:
mode:
authorOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>2018-05-14 09:27:40 +0300
committerTakashi Iwai <tiwai@suse.de>2018-05-16 12:59:50 +0200
commitd6e0fbb82e73a01e4cb3631b8b3dd7aae09ab14c (patch)
tree3b25bbd880692a6db4b44a0e2ab9c0a249939828 /sound/xen/xen_snd_front.c
parent788ef64a2caee38cc4b8890abd3d7e54dfa3bcc9 (diff)
ALSA: xen-front: Implement handling of shared buffers
Implement shared buffer handling according to the para-virtualized sound device protocol at xen/interface/io/sndif.h: - manage buffer memory - handle granted references - handle page directories [ Fixed missing linux/kernel.h inclusion -- tiwai ] Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/xen/xen_snd_front.c')
-rw-r--r--sound/xen/xen_snd_front.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/xen/xen_snd_front.c b/sound/xen/xen_snd_front.c
index 277214d4fd0a..cdf66ea516c4 100644
--- a/sound/xen/xen_snd_front.c
+++ b/sound/xen/xen_snd_front.c
@@ -11,6 +11,7 @@
#include <linux/delay.h>
#include <linux/module.h>
+#include <xen/page.h>
#include <xen/platform_pci.h>
#include <xen/xen.h>
#include <xen/xenbus.h>
@@ -191,6 +192,13 @@ static int __init xen_drv_init(void)
if (!xen_has_pv_devices())
return -ENODEV;
+ /* At the moment we only support case with XEN_PAGE_SIZE == PAGE_SIZE */
+ if (XEN_PAGE_SIZE != PAGE_SIZE) {
+ pr_err(XENSND_DRIVER_NAME ": different kernel and Xen page sizes are not supported: XEN_PAGE_SIZE (%lu) != PAGE_SIZE (%lu)\n",
+ XEN_PAGE_SIZE, PAGE_SIZE);
+ return -ENODEV;
+ }
+
pr_info("Initialising Xen " XENSND_DRIVER_NAME " frontend driver\n");
return xenbus_register_frontend(&xen_driver);
}