mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 17:48:58 +00:00
7d7aa2fd92
This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Despite, since subtargets range from bcm2708 to bcm2711, it seems appropriate to use bcm27xx instead of bcm2708 (again, as already done for BOARDNAME). This also renames the packages brcm2708-userland and brcm2708-gpu-fw. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
59 lines
1.6 KiB
Diff
59 lines
1.6 KiB
Diff
From 70194b474d22974cd46356e5b3d3b0582abd02da Mon Sep 17 00:00:00 2001
|
|
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
|
Date: Thu, 24 Jan 2019 13:56:30 +0000
|
|
Subject: [PATCH] char: vcio: Add compat ioctl handling
|
|
|
|
There was no compat ioctl handler, so 32 bit userspace on a
|
|
64 bit kernel failed as IOCTL_MBOX_PROPERTY used the size
|
|
of char*.
|
|
|
|
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
|
|
---
|
|
drivers/char/broadcom/vcio.c | 22 +++++++++++++++++++++-
|
|
1 file changed, 21 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/char/broadcom/vcio.c
|
|
+++ b/drivers/char/broadcom/vcio.c
|
|
@@ -24,6 +24,9 @@
|
|
|
|
#define VCIO_IOC_MAGIC 100
|
|
#define IOCTL_MBOX_PROPERTY _IOWR(VCIO_IOC_MAGIC, 0, char *)
|
|
+#ifdef CONFIG_COMPAT
|
|
+#define IOCTL_MBOX_PROPERTY32 _IOWR(VCIO_IOC_MAGIC, 0, compat_uptr_t)
|
|
+#endif
|
|
|
|
static struct {
|
|
dev_t devt;
|
|
@@ -87,13 +90,30 @@ static long vcio_device_ioctl(struct fil
|
|
case IOCTL_MBOX_PROPERTY:
|
|
return vcio_user_property_list((void *)ioctl_param);
|
|
default:
|
|
- pr_err("unknown ioctl: %d\n", ioctl_num);
|
|
+ pr_err("unknown ioctl: %x\n", ioctl_num);
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
+#ifdef CONFIG_COMPAT
|
|
+static long vcio_device_compat_ioctl(struct file *file, unsigned int ioctl_num,
|
|
+ unsigned long ioctl_param)
|
|
+{
|
|
+ switch (ioctl_num) {
|
|
+ case IOCTL_MBOX_PROPERTY32:
|
|
+ return vcio_user_property_list(compat_ptr(ioctl_param));
|
|
+ default:
|
|
+ pr_err("unknown ioctl: %x\n", ioctl_num);
|
|
+ return -EINVAL;
|
|
+ }
|
|
+}
|
|
+#endif
|
|
+
|
|
const struct file_operations vcio_fops = {
|
|
.unlocked_ioctl = vcio_device_ioctl,
|
|
+#ifdef CONFIG_COMPAT
|
|
+ .compat_ioctl = vcio_device_compat_ioctl,
|
|
+#endif
|
|
.open = vcio_device_open,
|
|
.release = vcio_device_release,
|
|
};
|