summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ. Avila <elavila@google.com>2020-08-17 16:42:58 +0000
committerJ. Avila <elavila@google.com>2020-08-18 18:16:56 +0000
commit656b1f8a88ef3dd214d88c04dccadb7b96cbc71d (patch)
treecb8dd8c4302c71f78e53aa1e407b909d174be55e
parent49899a71a14e65cde44707e7d7749b1b02b78714 (diff)
downloadtrusty-656b1f8a88ef3dd214d88c04dccadb7b96cbc71d.tar.gz
GKI: ANDROID: trusty: Port to mainline
Make various changes to port this driver to mainline: * Add missing includes * Replace certain deprecated #defines with the newer variants Signed-off-by: J. Avila <elavila@google.com> Change-Id: Ifdaeda9406ccdc1db6d91b9ccc2d93ffe0baf2ad
-rw-r--r--drivers/trusty/trusty-smc-arm.S2
-rw-r--r--drivers/trusty/trusty-smc-arm64.S2
-rw-r--r--drivers/trusty/trusty-virtio.c8
3 files changed, 7 insertions, 5 deletions
diff --git a/drivers/trusty/trusty-smc-arm.S b/drivers/trusty/trusty-smc-arm.S
index 0145a36..56ed774 100644
--- a/drivers/trusty/trusty-smc-arm.S
+++ b/drivers/trusty/trusty-smc-arm.S
@@ -7,7 +7,7 @@
.arch_extension sec
-ENTRY(trusty_smc8)
+SYM_FUNC_START(trusty_smc8)
/* Save stack location where r3-r7 smc arguments are stored */
mov r12, sp
diff --git a/drivers/trusty/trusty-smc-arm64.S b/drivers/trusty/trusty-smc-arm64.S
index 90a60dd..59caf89 100644
--- a/drivers/trusty/trusty-smc-arm64.S
+++ b/drivers/trusty/trusty-smc-arm64.S
@@ -15,7 +15,7 @@ ldp \ra, \rb, [sp], #16
lr .req x30
-ENTRY(trusty_smc8)
+SYM_FUNC_START(trusty_smc8)
/*
* Save x8 (return value ptr) and lr. The SMC calling convention says el3
* does not need to preserve x8. The normal ABI does not require either x8
diff --git a/drivers/trusty/trusty-virtio.c b/drivers/trusty/trusty-virtio.c
index 8617c21..ed566ab 100644
--- a/drivers/trusty/trusty-virtio.c
+++ b/drivers/trusty/trusty-virtio.c
@@ -15,6 +15,7 @@
#include <linux/device.h>
#include <linux/err.h>
#include <linux/kernel.h>
+#include <linux/slab.h>
#include <linux/dma-mapping.h>
#include <linux/module.h>
@@ -224,7 +225,8 @@ static void trusty_virtio_reset(struct virtio_device *vdev)
static u64 trusty_virtio_get_features(struct virtio_device *vdev)
{
struct trusty_vdev *tvdev = vdev_to_tvdev(vdev);
- return tvdev->vdev_descr->dfeatures | (1ULL << VIRTIO_F_IOMMU_PLATFORM);
+ return tvdev->vdev_descr->dfeatures |
+ (1ULL << VIRTIO_F_ACCESS_PLATFORM);
}
static int trusty_virtio_finalize_features(struct virtio_device *vdev)
@@ -233,10 +235,10 @@ static int trusty_virtio_finalize_features(struct virtio_device *vdev)
u64 features = vdev->features;
/*
- * We set VIRTIO_F_IOMMU_PLATFORM to enable the dma mapping hooks. The
+ * We set VIRTIO_F_ACCESS_PLATFORM to enable the dma mapping hooks. The
* other side does not need to know.
*/
- features &= ~(1ULL << VIRTIO_F_IOMMU_PLATFORM);
+ features &= ~(1ULL << VIRTIO_F_ACCESS_PLATFORM);
/* Make sure we don't have any features > 32 bits! */
BUG_ON((u32)vdev->features != features);