aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.19/950-0274-char-vc_mem-Fix-up-compat-ioctls-for-64bit-kernel.patch
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-08 21:58:55 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-14 14:10:51 +0100
commit7d7aa2fd924c27829ec25f825481554dd81bce97 (patch)
tree658b87b89331670266163e522ea5fb52535633cb /target/linux/brcm2708/patches-4.19/950-0274-char-vc_mem-Fix-up-compat-ioctls-for-64bit-kernel.patch
parente7bfda2c243e66a75ff966ba04c28b1590b5d24c (diff)
downloadupstream-7d7aa2fd924c27829ec25f825481554dd81bce97.tar.gz
upstream-7d7aa2fd924c27829ec25f825481554dd81bce97.tar.bz2
upstream-7d7aa2fd924c27829ec25f825481554dd81bce97.zip
brcm2708: rename target to bcm27xx
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>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0274-char-vc_mem-Fix-up-compat-ioctls-for-64bit-kernel.patch')
-rw-r--r--target/linux/brcm2708/patches-4.19/950-0274-char-vc_mem-Fix-up-compat-ioctls-for-64bit-kernel.patch111
1 files changed, 0 insertions, 111 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0274-char-vc_mem-Fix-up-compat-ioctls-for-64bit-kernel.patch b/target/linux/brcm2708/patches-4.19/950-0274-char-vc_mem-Fix-up-compat-ioctls-for-64bit-kernel.patch
deleted file mode 100644
index b0beb6d5c8..0000000000
--- a/target/linux/brcm2708/patches-4.19/950-0274-char-vc_mem-Fix-up-compat-ioctls-for-64bit-kernel.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 966ff2b4c758eb8c8c04f26422cd183e6aa8eda5 Mon Sep 17 00:00:00 2001
-From: Dave Stevenson <dave.stevenson@raspberrypi.org>
-Date: Wed, 23 Jan 2019 18:25:50 +0000
-Subject: [PATCH] char: vc_mem: Fix up compat ioctls for 64bit kernel
-
-compat_ioctl wasn't defined, so 32bit user/64bit kernel
-always failed.
-VC_MEM_IOC_MEM_PHYS_ADDR was defined with parameter size
-unsigned long, so the ioctl cmd changes between sizes.
-
-Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
----
- drivers/char/broadcom/vc_mem.c | 40 +++++++++++++++++++++++++++++----
- include/linux/broadcom/vc_mem.h | 4 ++++
- 2 files changed, 40 insertions(+), 4 deletions(-)
-
---- a/drivers/char/broadcom/vc_mem.c
-+++ b/drivers/char/broadcom/vc_mem.c
-@@ -148,7 +148,7 @@ vc_mem_ioctl(struct file *file, unsigned
- (void) cmd;
- (void) arg;
-
-- pr_debug("%s: called file = 0x%p\n", __func__, file);
-+ pr_debug("%s: called file = 0x%p, cmd %08x\n", __func__, file, cmd);
-
- switch (cmd) {
- case VC_MEM_IOC_MEM_PHYS_ADDR:
-@@ -167,7 +167,7 @@ vc_mem_ioctl(struct file *file, unsigned
- // Get the videocore memory size first
- vc_mem_get_size();
-
-- pr_debug("%s: VC_MEM_IOC_MEM_SIZE=%u\n", __func__,
-+ pr_debug("%s: VC_MEM_IOC_MEM_SIZE=%x\n", __func__,
- mm_vc_mem_size);
-
- if (copy_to_user((void *) arg, &mm_vc_mem_size,
-@@ -181,7 +181,7 @@ vc_mem_ioctl(struct file *file, unsigned
- // Get the videocore memory base
- vc_mem_get_base();
-
-- pr_debug("%s: VC_MEM_IOC_MEM_BASE=%u\n", __func__,
-+ pr_debug("%s: VC_MEM_IOC_MEM_BASE=%x\n", __func__,
- mm_vc_mem_base);
-
- if (copy_to_user((void *) arg, &mm_vc_mem_base,
-@@ -195,7 +195,7 @@ vc_mem_ioctl(struct file *file, unsigned
- // Get the videocore memory base
- vc_mem_get_base();
-
-- pr_debug("%s: VC_MEM_IOC_MEM_LOAD=%u\n", __func__,
-+ pr_debug("%s: VC_MEM_IOC_MEM_LOAD=%x\n", __func__,
- mm_vc_mem_base);
-
- if (copy_to_user((void *) arg, &mm_vc_mem_base,
-@@ -214,6 +214,35 @@ vc_mem_ioctl(struct file *file, unsigned
- return rc;
- }
-
-+#ifdef CONFIG_COMPAT
-+static long
-+vc_mem_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
-+{
-+ int rc = 0;
-+
-+ switch (cmd) {
-+ case VC_MEM_IOC_MEM_PHYS_ADDR32:
-+ pr_debug("%s: VC_MEM_IOC_MEM_PHYS_ADDR32=0x%p\n",
-+ __func__, (void *)mm_vc_mem_phys_addr);
-+
-+ /* This isn't correct, but will cover us for now as
-+ * VideoCore is 32bit only.
-+ */
-+ if (copy_to_user((void *)arg, &mm_vc_mem_phys_addr,
-+ sizeof(compat_ulong_t)))
-+ rc = -EFAULT;
-+
-+ break;
-+
-+ default:
-+ rc = vc_mem_ioctl(file, cmd, arg);
-+ break;
-+ }
-+
-+ return rc;
-+}
-+#endif
-+
- /****************************************************************************
- *
- * vc_mem_mmap
-@@ -259,6 +288,9 @@ static const struct file_operations vc_m
- .open = vc_mem_open,
- .release = vc_mem_release,
- .unlocked_ioctl = vc_mem_ioctl,
-+#ifdef CONFIG_COMPAT
-+ .compat_ioctl = vc_mem_compat_ioctl,
-+#endif
- .mmap = vc_mem_mmap,
- };
-
---- a/include/linux/broadcom/vc_mem.h
-+++ b/include/linux/broadcom/vc_mem.h
-@@ -32,4 +32,8 @@ extern unsigned int mm_vc_mem_size;
- extern int vc_mem_get_current_size( void );
- #endif
-
-+#ifdef CONFIG_COMPAT
-+#define VC_MEM_IOC_MEM_PHYS_ADDR32 _IOR(VC_MEM_IOC_MAGIC, 0, compat_ulong_t)
-+#endif
-+
- #endif /* _VC_MEM_H */