summaryrefslogtreecommitdiffstats
path: root/meta-agl-jailhouse/recipes-kernel/linux/linux/0018-ivshmem-net-Improve-identification-of-resources.patch
diff options
context:
space:
mode:
authorJakub Luzny <jakub@luzny.cz>2020-07-19 17:00:08 +0200
committerJakub Luzny <jakub@luzny.cz>2020-07-24 12:46:57 +0200
commit3f6d193683449a323a3f1d689540ab697d3d7980 (patch)
tree093ad36c5bf3f031d469a635d0f2190a57c176e0 /meta-agl-jailhouse/recipes-kernel/linux/linux/0018-ivshmem-net-Improve-identification-of-resources.patch
parentc6889de97c1af6baa7ee8006aa75da170c9bd407 (diff)
Add layer to support Jailhouse hypervisorjellyfish_9.99.2jellyfish/9.99.29.99.2
Jailhouse is a partitioning hypervisor based on Linux. It is able to run bare-metal applications or (adapted) operating systems besides Linux. For this purpose, it configures CPU and device virtualization features of the hardware platform in a way that none of these domains, called "cells" here, can interfere with each other in an unacceptable way. This layer adds the Jailhouse package into AGL and also appends the BSPs to allow it to run. Currently, Raspberry Pi 4 and QEMU x86-64 targets are supported. To enable Jailhouse and include it in the image, the AGL feature agl-jailhouse must be enabled. Bug-AGL: SPEC-3507 Signed-off-by: Jakub Luzny <jakub@luzny.cz> Change-Id: I0fbc0b5d931c85d6f22b0222da8c2b106c4115e1
Diffstat (limited to 'meta-agl-jailhouse/recipes-kernel/linux/linux/0018-ivshmem-net-Improve-identification-of-resources.patch')
-rw-r--r--meta-agl-jailhouse/recipes-kernel/linux/linux/0018-ivshmem-net-Improve-identification-of-resources.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/meta-agl-jailhouse/recipes-kernel/linux/linux/0018-ivshmem-net-Improve-identification-of-resources.patch b/meta-agl-jailhouse/recipes-kernel/linux/linux/0018-ivshmem-net-Improve-identification-of-resources.patch
new file mode 100644
index 00000000..e51b94aa
--- /dev/null
+++ b/meta-agl-jailhouse/recipes-kernel/linux/linux/0018-ivshmem-net-Improve-identification-of-resources.patch
@@ -0,0 +1,59 @@
+From d60c7b69f68961c6868ca870d645ed7d4f73e751 Mon Sep 17 00:00:00 2001
+From: Jan Kiszka <jan.kiszka@siemens.com>
+Date: Wed, 21 Dec 2016 08:20:18 +0100
+Subject: [PATCH 18/32] ivshmem-net: Improve identification of resources
+
+Pass a device name consisting of driver name and PCI ID to request_irq
+and alloc_ordered_workqueue. This helps correlating resources with
+devices in case there are multiple of them.
+
+Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
+---
+ drivers/net/ivshmem-net.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/ivshmem-net.c b/drivers/net/ivshmem-net.c
+index 591d04195e57..cff6aa0be71d 100644
+--- a/drivers/net/ivshmem-net.c
++++ b/drivers/net/ivshmem-net.c
+@@ -762,6 +762,7 @@ static int ivshm_net_probe(struct pci_dev *pdev,
+ resource_size_t shmaddr;
+ resource_size_t shmlen;
+ int interrupt;
++ char *device_name;
+ void *shm;
+ u32 ivpos;
+ int err;
+@@ -814,7 +815,10 @@ static int ivshm_net_probe(struct pci_dev *pdev,
+ return -EINVAL;
+ }
+
+- dev_info(&pdev->dev, "shared memory size %pa\n", &shmlen);
++ device_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s[%s]", DRV_NAME,
++ dev_name(&pdev->dev));
++ if (!device_name)
++ return -ENOMEM;
+
+ ndev = alloc_etherdev(sizeof(*in));
+ if (!ndev)
+@@ -837,7 +841,7 @@ static int ivshm_net_probe(struct pci_dev *pdev,
+ if (err)
+ goto err_free;
+
+- in->state_wq = alloc_ordered_workqueue(DRV_NAME, 0);
++ in->state_wq = alloc_ordered_workqueue(device_name, 0);
+ if (!in->state_wq)
+ goto err_free;
+
+@@ -866,7 +870,7 @@ static int ivshm_net_probe(struct pci_dev *pdev,
+ in->using_msix = false;
+ }
+
+- err = request_irq(interrupt, ivshm_net_int, 0, DRV_NAME, ndev);
++ err = request_irq(interrupt, ivshm_net_int, 0, device_name, ndev);
+ if (err)
+ goto err_int;
+
+--
+2.11.0
+