diff options
4 files changed, 107 insertions, 1 deletions
diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx/001_Add_accept4_syscall.patch b/meta-fsl-arm/recipes-kernel/linux/linux-imx/001_Add_accept4_syscall.patch new file mode 100644 index 000000000..648014523 --- /dev/null +++ b/meta-fsl-arm/recipes-kernel/linux/linux-imx/001_Add_accept4_syscall.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | commit 4ac884455c992c7250eae2cdbd6ad1fbbe5d1dc0 | ||
| 2 | Author: Phil Endecott <git@chezphil.org> | ||
| 3 | Date: Mon Oct 31 20:23:38 2011 +0000 | ||
| 4 | |||
| 5 | Add accept4 syscall | ||
| 6 | |||
| 7 | diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h | ||
| 8 | index dd2bf53..d02cfb6 100644 | ||
| 9 | --- a/arch/arm/include/asm/unistd.h | ||
| 10 | +++ b/arch/arm/include/asm/unistd.h | ||
| 11 | @@ -392,6 +392,7 @@ | ||
| 12 | #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) | ||
| 13 | #define __NR_perf_event_open (__NR_SYSCALL_BASE+364) | ||
| 14 | #define __NR_recvmmsg (__NR_SYSCALL_BASE+365) | ||
| 15 | +#define __NR_accept4 (__NR_SYSCALL_BASE+366) | ||
| 16 | |||
| 17 | /* | ||
| 18 | * The following SWIs are ARM private. | ||
| 19 | diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S | ||
| 20 | index 37ae301..afeb71f 100644 | ||
| 21 | --- a/arch/arm/kernel/calls.S | ||
| 22 | +++ b/arch/arm/kernel/calls.S | ||
| 23 | @@ -375,6 +375,7 @@ | ||
| 24 | CALL(sys_rt_tgsigqueueinfo) | ||
| 25 | CALL(sys_perf_event_open) | ||
| 26 | /* 365 */ CALL(sys_recvmmsg) | ||
| 27 | + CALL(sys_accept4) | ||
| 28 | #ifndef syscalls_counted | ||
| 29 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls | ||
| 30 | #define syscalls_counted | ||
diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx/002_Return_ERESTARTSYS_from_IPU_GET_EVENT.patch b/meta-fsl-arm/recipes-kernel/linux/linux-imx/002_Return_ERESTARTSYS_from_IPU_GET_EVENT.patch new file mode 100644 index 000000000..08cf6085e --- /dev/null +++ b/meta-fsl-arm/recipes-kernel/linux/linux-imx/002_Return_ERESTARTSYS_from_IPU_GET_EVENT.patch | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | commit 0ffabfea6c190d28e25587c95e282eb777b3feb2 | ||
| 2 | Author: Phil Endecott <git@chezphil.org> | ||
| 3 | Date: Mon Oct 31 21:21:41 2011 +0000 | ||
| 4 | |||
| 5 | Return ERESTARTSYS from IPU_GET_EVENT | ||
| 6 | |||
| 7 | Index: git/drivers/mxc/ipu/ipu_device.c | ||
| 8 | =================================================================== | ||
| 9 | --- git.orig/drivers/mxc/ipu/ipu_device.c 2012-01-24 15:34:37.000000000 +0100 | ||
| 10 | +++ git/drivers/mxc/ipu/ipu_device.c 2012-01-31 16:21:19.599303457 +0100 | ||
| 11 | @@ -411,8 +411,10 @@ | ||
| 12 | |||
| 13 | r = get_events(&info); | ||
| 14 | if (r == -1) { | ||
| 15 | - wait_event_interruptible_timeout(waitq, | ||
| 16 | - (pending_events != 0), 2 * HZ); | ||
| 17 | + if (wait_event_interruptible_timeout(waitq, | ||
| 18 | + (pending_events != 0), 2 * HZ)) < 0) { | ||
| 19 | + return -ERESTARTSYS; | ||
| 20 | + } | ||
| 21 | r = get_events(&info); | ||
| 22 | } | ||
| 23 | ret = -1; | ||
diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx/003_Sanitise_ipu_interrupt_return_value.patch b/meta-fsl-arm/recipes-kernel/linux/linux-imx/003_Sanitise_ipu_interrupt_return_value.patch new file mode 100644 index 000000000..c19995911 --- /dev/null +++ b/meta-fsl-arm/recipes-kernel/linux/linux-imx/003_Sanitise_ipu_interrupt_return_value.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | commit 7237ebd59bf1cd8bcc9508ec4bc5674dc7cc6c58 | ||
| 2 | Author: Phil Endecott <git@chezphil.org> | ||
| 3 | Date: Tue Nov 1 18:16:56 2011 +0000 | ||
| 4 | |||
| 5 | Sanitise ipu interrupt return value, and loop waiting for interrupt | ||
| 6 | |||
| 7 | diff --git a/drivers/mxc/ipu3/ipu_device.c b/drivers/mxc/ipu3/ipu_device.c | ||
| 8 | index 1955f09..d66b8f8 100644 | ||
| 9 | --- a/drivers/mxc/ipu3/ipu_device.c | ||
| 10 | +++ b/drivers/mxc/ipu3/ipu_device.c | ||
| 11 | @@ -311,7 +311,7 @@ static int mxc_ipu_ioctl(struct inode *inode, struct file *file, | ||
| 12 | structure and pass the pointer in arg */ | ||
| 13 | { | ||
| 14 | ipu_event_info info; | ||
| 15 | - int r = -1; | ||
| 16 | + int r; | ||
| 17 | |||
| 18 | if (copy_from_user | ||
| 19 | (&info, (ipu_event_info *) arg, | ||
| 20 | @@ -319,7 +319,7 @@ static int mxc_ipu_ioctl(struct inode *inode, struct file *file, | ||
| 21 | return -EFAULT; | ||
| 22 | |||
| 23 | r = get_events(&info); | ||
| 24 | - if (r == -1) { | ||
| 25 | + while (r == -1) { | ||
| 26 | if ((file->f_flags & O_NONBLOCK) && | ||
| 27 | (irq_info[info.irq].irq_pending == 0)) | ||
| 28 | return -EAGAIN; | ||
| 29 | @@ -328,13 +328,15 @@ static int mxc_ipu_ioctl(struct inode *inode, struct file *file, | ||
| 30 | return -ERESTARTSYS; | ||
| 31 | } | ||
| 32 | r = get_events(&info); | ||
| 33 | + if (r == -1) { | ||
| 34 | + /* Shouldn't happen? */ | ||
| 35 | + printk(KERN_ERR "no events after waiting\n"); | ||
| 36 | + } | ||
| 37 | } | ||
| 38 | - ret = -1; | ||
| 39 | - if (r == 0) { | ||
| 40 | - if (!copy_to_user((ipu_event_info *) arg, | ||
| 41 | - &info, sizeof(ipu_event_info))) | ||
| 42 | - ret = 0; | ||
| 43 | - } | ||
| 44 | + if (copy_to_user((ipu_event_info *) arg, | ||
| 45 | + &info, sizeof(ipu_event_info))) | ||
| 46 | + return -EFAULT; | ||
| 47 | + ret = 0; | ||
| 48 | } | ||
| 49 | break; | ||
| 50 | case IPU_ALOC_MEM: | ||
diff --git a/meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb b/meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb index a7f081211..a1c074296 100644 --- a/meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb +++ b/meta-fsl-arm/recipes-kernel/linux/linux-imx_2.6.35.3.bb | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | DESCRIPTION = "Linux kernel for imx platforms" | 4 | DESCRIPTION = "Linux kernel for imx platforms" |
| 5 | LICENSE = "GPLv2" | 5 | LICENSE = "GPLv2" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" |
| 7 | PR = "r11" | 7 | PR = "r12" |
| 8 | 8 | ||
| 9 | inherit kernel | 9 | inherit kernel |
| 10 | COMPATIBLE_MACHINE = "(imx53qsb|imx53ard|imx51evk)" | 10 | COMPATIBLE_MACHINE = "(imx53qsb|imx53ard|imx51evk)" |
| @@ -27,6 +27,9 @@ SRC_URI = "git://opensource.freescale.com/pub/scm/imx/linux-2.6-imx.git;tag=rel_ | |||
| 27 | file://1147-ENGR00170244-2-ARM-AHCI-Enable-PDDQ-mode-when-no-d.patch \ | 27 | file://1147-ENGR00170244-2-ARM-AHCI-Enable-PDDQ-mode-when-no-d.patch \ |
| 28 | file://no-unaligned-access.patch \ | 28 | file://no-unaligned-access.patch \ |
| 29 | file://0001-mx53_loco-add-USR-led-support.patch \ | 29 | file://0001-mx53_loco-add-USR-led-support.patch \ |
| 30 | file://001_Add_accept4_syscall.patch \ | ||
| 31 | file://002_Return_ERESTARTSYS_from_IPU_GET_EVENT.patch \ | ||
| 32 | file://003_Sanitise_ipu_interrupt_return_value.patch \ | ||
| 30 | file://defconfig \ | 33 | file://defconfig \ |
| 31 | " | 34 | " |
| 32 | 35 | ||
