Posted by Phil Endecott on imxcommunity.org.
Signed-off-by: Leon Woestenberg <leon@sidebranch.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
--- /dev/null
+commit 4ac884455c992c7250eae2cdbd6ad1fbbe5d1dc0
+Author: Phil Endecott <git@chezphil.org>
+Date: Mon Oct 31 20:23:38 2011 +0000
+
+ Add accept4 syscall
+
+diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h
+index dd2bf53..d02cfb6 100644
+--- a/arch/arm/include/asm/unistd.h
++++ b/arch/arm/include/asm/unistd.h
+@@ -392,6 +392,7 @@
+ #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363)
+ #define __NR_perf_event_open (__NR_SYSCALL_BASE+364)
+ #define __NR_recvmmsg (__NR_SYSCALL_BASE+365)
++#define __NR_accept4 (__NR_SYSCALL_BASE+366)
+
+ /*
+ * The following SWIs are ARM private.
+diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
+index 37ae301..afeb71f 100644
+--- a/arch/arm/kernel/calls.S
++++ b/arch/arm/kernel/calls.S
+@@ -375,6 +375,7 @@
+ CALL(sys_rt_tgsigqueueinfo)
+ CALL(sys_perf_event_open)
+ /* 365 */ CALL(sys_recvmmsg)
++ CALL(sys_accept4)
+ #ifndef syscalls_counted
+ .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
+ #define syscalls_counted
--- /dev/null
+commit 0ffabfea6c190d28e25587c95e282eb777b3feb2
+Author: Phil Endecott <git@chezphil.org>
+Date: Mon Oct 31 21:21:41 2011 +0000
+
+ Return ERESTARTSYS from IPU_GET_EVENT
+
+Index: git/drivers/mxc/ipu/ipu_device.c
+===================================================================
+--- git.orig/drivers/mxc/ipu/ipu_device.c 2012-01-24 15:34:37.000000000 +0100
++++ git/drivers/mxc/ipu/ipu_device.c 2012-01-31 16:21:19.599303457 +0100
+@@ -411,8 +411,10 @@
+
+ r = get_events(&info);
+ if (r == -1) {
+- wait_event_interruptible_timeout(waitq,
+- (pending_events != 0), 2 * HZ);
++ if (wait_event_interruptible_timeout(waitq,
++ (pending_events != 0), 2 * HZ)) < 0) {
++ return -ERESTARTSYS;
++ }
+ r = get_events(&info);
+ }
+ ret = -1;
--- /dev/null
+commit 7237ebd59bf1cd8bcc9508ec4bc5674dc7cc6c58
+Author: Phil Endecott <git@chezphil.org>
+Date: Tue Nov 1 18:16:56 2011 +0000
+
+ Sanitise ipu interrupt return value, and loop waiting for interrupt
+
+diff --git a/drivers/mxc/ipu3/ipu_device.c b/drivers/mxc/ipu3/ipu_device.c
+index 1955f09..d66b8f8 100644
+--- a/drivers/mxc/ipu3/ipu_device.c
++++ b/drivers/mxc/ipu3/ipu_device.c
+@@ -311,7 +311,7 @@ static int mxc_ipu_ioctl(struct inode *inode, struct file *file,
+ structure and pass the pointer in arg */
+ {
+ ipu_event_info info;
+- int r = -1;
++ int r;
+
+ if (copy_from_user
+ (&info, (ipu_event_info *) arg,
+@@ -319,7 +319,7 @@ static int mxc_ipu_ioctl(struct inode *inode, struct file *file,
+ return -EFAULT;
+
+ r = get_events(&info);
+- if (r == -1) {
++ while (r == -1) {
+ if ((file->f_flags & O_NONBLOCK) &&
+ (irq_info[info.irq].irq_pending == 0))
+ return -EAGAIN;
+@@ -328,13 +328,15 @@ static int mxc_ipu_ioctl(struct inode *inode, struct file *file,
+ return -ERESTARTSYS;
+ }
+ r = get_events(&info);
++ if (r == -1) {
++ /* Shouldn't happen? */
++ printk(KERN_ERR "no events after waiting\n");
++ }
+ }
+- ret = -1;
+- if (r == 0) {
+- if (!copy_to_user((ipu_event_info *) arg,
+- &info, sizeof(ipu_event_info)))
+- ret = 0;
+- }
++ if (copy_to_user((ipu_event_info *) arg,
++ &info, sizeof(ipu_event_info)))
++ return -EFAULT;
++ ret = 0;
+ }
+ break;
+ case IPU_ALOC_MEM:
DESCRIPTION = "Linux kernel for imx platforms"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
-PR = "r11"
+PR = "r12"
inherit kernel
COMPATIBLE_MACHINE = "(imx53qsb|imx53ard|imx51evk)"
file://1147-ENGR00170244-2-ARM-AHCI-Enable-PDDQ-mode-when-no-d.patch \
file://no-unaligned-access.patch \
file://0001-mx53_loco-add-USR-led-support.patch \
+ file://001_Add_accept4_syscall.patch \
+ file://002_Return_ERESTARTSYS_from_IPU_GET_EVENT.patch \
+ file://003_Sanitise_ipu_interrupt_return_value.patch \
file://defconfig \
"