From c60afe1014dc4b8d2211fb6cc9dd08ebab31d00b Mon Sep 17 00:00:00 2001 From: Riku Voipio Date: Fri, 28 Mar 2008 13:08:09 +0100 Subject: [ARM] 4878/1: Add oabi shim for fstatat64 Ccoreutils and other have started using fstatat64. Thus, we need a shim for it if we want to support modern oldabi userlands (such as Debian/arm/lenny) with EABI kernels. See http://bugs.debian.org/462677 Acked-by: Nicolas Pitre Signed-off-by: Riku Voipio Signed-off-by: Russell King --- arch/arm/kernel/calls.S | 2 +- arch/arm/kernel/sys_oabi-compat.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 283e14fff99..7e97b737656 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -336,7 +336,7 @@ CALL(sys_mknodat) /* 325 */ CALL(sys_fchownat) CALL(sys_futimesat) - CALL(sys_fstatat64) + CALL(ABI(sys_fstatat64, sys_oabi_fstatat64)) CALL(sys_unlinkat) CALL(sys_renameat) /* 330 */ CALL(sys_linkat) diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index e8b98046895..96ab5f52949 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c @@ -25,6 +25,7 @@ * sys_stat64: * sys_lstat64: * sys_fstat64: + * sys_fstatat64: * * struct stat64 has different sizes and some members are shifted * Compatibility wrappers are needed for them and provided below. @@ -169,6 +170,29 @@ asmlinkage long sys_oabi_fstat64(unsigned long fd, return error; } +asmlinkage long sys_oabi_fstatat64(int dfd, + char __user *filename, + struct oldabi_stat64 __user *statbuf, + int flag) +{ + struct kstat stat; + int error = -EINVAL; + + if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) + goto out; + + if (flag & AT_SYMLINK_NOFOLLOW) + error = vfs_lstat_fd(dfd, filename, &stat); + else + error = vfs_stat_fd(dfd, filename, &stat); + + if (!error) + error = cp_oldabi_stat64(&stat, statbuf); + +out: + return error; +} + struct oabi_flock64 { short l_type; short l_whence; -- cgit v1.2.3 From b626517751b8d78abc8465971e3120ebd686673a Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Sun, 23 Mar 2008 15:32:33 +0100 Subject: [ARM] 4873/1: Fix ITE 8152 interrupt demux This patch fixes misprints in ITE 8152 interrupt demuxing Signed-off-by: Mike Rapoport Signed-off-by: Russell King --- arch/arm/common/it8152.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c index 53826224148..5fe9588db07 100644 --- a/arch/arm/common/it8152.c +++ b/arch/arm/common/it8152.c @@ -120,6 +120,7 @@ void it8152_irq_demux(unsigned int irq, struct irq_desc *desc) time, when they all three were 0. */ bits_pd = __raw_readl(IT8152_INTC_PDCNIRR); bits_lp = __raw_readl(IT8152_INTC_LPCNIRR); + bits_ld = __raw_readl(IT8152_INTC_LDCNIRR); if (!(bits_ld | bits_lp | bits_pd)) return; } @@ -133,14 +134,14 @@ void it8152_irq_demux(unsigned int irq, struct irq_desc *desc) bits_lp &= ((1 << IT8152_LP_IRQ_COUNT) - 1); while (bits_lp) { - i = __ffs(bits_pd); + i = __ffs(bits_lp); it8152_irq(IT8152_LP_IRQ(i)); bits_lp &= ~(1 << i); } bits_ld &= ((1 << IT8152_LD_IRQ_COUNT) - 1); while (bits_ld) { - i = __ffs(bits_pd); + i = __ffs(bits_ld); it8152_irq(IT8152_LD_IRQ(i)); bits_ld &= ~(1 << i); } -- cgit v1.2.3 From 1035d60d92325bddcc4248df5a27dcd5698f5931 Mon Sep 17 00:00:00 2001 From: Gordon Farquharson Date: Wed, 26 Mar 2008 04:57:49 +0100 Subject: [ARM] 4875/1: Add MODULE_ALIAS to ixp4xx-beeper module The following patch allows ixp4xx-beeper to be loaded by udev automatically when compiled as a module with kernel versions 2.4.24 and greater. This patch is required because commit 43cc71eed1250755986da4c0f9898f9a635cb3bf adds "platform:" to the modalias string. LKG7102D7:~# udevinfo -a -p /sys/devices/platform/ixp4xx-beeper.4 looking at device '/devices/platform/ixp4xx-beeper.4': KERNEL=="ixp4xx-beeper.4" SUBSYSTEM=="platform" DRIVER=="" ATTR{modalias}=="platform:ixp4xx-beeper" udev therefore tries to modprobe platform:ixp4xx-beeper instead of ixp4xx-beeper. LKG7102D7:~# udevtest /sys/devices/platform/ixp4xx-beeper.4 ... import_uevent_var: import into environment: 'PHYSDEVBUS=platform' import_uevent_var: import into environment: 'MODALIAS=platform:ixp4xx-beeper' main: looking at device '/devices/platform/ixp4xx-beeper.4' from subsystem 'platform' wait_for_sysfs: file '/sys/devices/platform/ixp4xx-beeper.4/bus' appeared after 0 loops main: run: 'socket:/org/kernel/udev/monitor' main: run: '/sbin/modprobe --use-blacklist platform:ixp4xx-beeper' With this patch, depmod adds an alias line (see below) to modules.alias which allows modprobe to load the right module. modules.alias: alias platform:ixp4xx-beeper ixp4xx-beeper Signed-off-by: Gordon Farquharson Signed-off-by: Alessandro Zummo Signed-off-by: Russell King --- drivers/input/misc/ixp4xx-beeper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c index d2ade7443b7..798d84c44d0 100644 --- a/drivers/input/misc/ixp4xx-beeper.c +++ b/drivers/input/misc/ixp4xx-beeper.c @@ -25,6 +25,7 @@ MODULE_AUTHOR("Alessandro Zummo "); MODULE_DESCRIPTION("ixp4xx beeper driver"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:ixp4xx-beeper"); static DEFINE_SPINLOCK(beep_lock); -- cgit v1.2.3