Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 2 Dec 2009 23:41:49 +0000 (15:41 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 2 Dec 2009 23:41:49 +0000 (15:41 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: Correct WM831X_MAX_ISEL_VALUE

81 files changed:
Documentation/slow-work.txt
MAINTAINERS
arch/alpha/include/asm/thread_info.h
arch/alpha/kernel/core_marvel.c
arch/alpha/kernel/core_titan.c
arch/alpha/kernel/irq.c
arch/alpha/kernel/irq_alpha.c
arch/alpha/kernel/irq_i8259.c
arch/alpha/kernel/irq_pyxis.c
arch/alpha/kernel/irq_srm.c
arch/alpha/kernel/sys_alcor.c
arch/alpha/kernel/sys_cabriolet.c
arch/alpha/kernel/sys_dp264.c
arch/alpha/kernel/sys_eb64p.c
arch/alpha/kernel/sys_eiger.c
arch/alpha/kernel/sys_jensen.c
arch/alpha/kernel/sys_marvel.c
arch/alpha/kernel/sys_mikasa.c
arch/alpha/kernel/sys_noritake.c
arch/alpha/kernel/sys_rawhide.c
arch/alpha/kernel/sys_ruffian.c
arch/alpha/kernel/sys_rx164.c
arch/alpha/kernel/sys_sable.c
arch/alpha/kernel/sys_takara.c
arch/alpha/kernel/sys_titan.c
arch/alpha/kernel/sys_wildfire.c
arch/mips/Kconfig
arch/mips/include/asm/mman.h
arch/mips/include/asm/system.h
arch/mips/kernel/syscall.c
arch/mips/rb532/devices.c
drivers/block/aoe/aoecmd.c
drivers/char/tty_port.c
drivers/gpio/langwell_gpio.c
drivers/input/serio/i8042-x86ia64io.h
drivers/md/raid1.c
drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/mmc/host/pxamci.c
drivers/regulator/wm831x-isink.c
drivers/rtc/rtc-pcf50633.c
drivers/rtc/rtc-x1205.c
drivers/serial/bcm63xx_uart.c
drivers/serial/of_serial.c
drivers/staging/hv/BlkVsc.c
drivers/staging/hv/Channel.c
drivers/staging/hv/ChannelMgmt.c
drivers/staging/hv/NetVsc.c
drivers/staging/hv/NetVsc.h
drivers/staging/hv/StorVsc.c
drivers/staging/hv/blkvsc_drv.c
drivers/staging/hv/netvsc_drv.c
drivers/staging/rtl8187se/TODO
drivers/staging/rtl8192su/TODO
drivers/staging/vt6655/TODO
drivers/staging/vt6656/TODO
drivers/usb/core/hub.c
drivers/usb/gadget/amd5536udc.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-pci.c
drivers/usb/host/ehci-q.c
drivers/usb/host/ehci-sched.c
drivers/usb/host/ehci.h
drivers/usb/musb/cppi_dma.c
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_gadget.c
drivers/usb/musb/musb_gadget_ep0.c
drivers/usb/musb/musb_host.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/option.c
drivers/video/da8xx-fb.c
drivers/watchdog/rc32434_wdt.c
fs/9p/cache.c
fs/cachefiles/rdwr.c
include/linux/slow-work.h
init/Kconfig
init/main.c
kernel/Makefile
kernel/module.c
kernel/slow-work-debugfs.c [moved from kernel/slow-work-proc.c with 97% similarity]
kernel/slow-work.c
kernel/slow-work.h

index 52bc31433723402ff6531552c9a118acf83f0da3..9dbf4470c7e16df9530591cfdc7fbf401ff23a2f 100644 (file)
@@ -279,9 +279,9 @@ The slow-work thread pool has a number of configurables:
 VIEWING EXECUTING AND QUEUED ITEMS
 ==================================
 
-If CONFIG_SLOW_WORK_PROC is enabled, a proc file is made available:
+If CONFIG_SLOW_WORK_DEBUG is enabled, a debugfs file is made available:
 
-       /proc/slow_work_rq
+       /sys/kernel/debug/slow_work/runqueue
 
 through which the list of work items being executed and the queues of items to
 be executed may be viewed.  The owner of a work item is given the chance to
index 16129e67678ad2a53e5d9d738b56a01eb36a28c7..4f96ac81089c545e9f2346bc53c2dc65ae9c9315 100644 (file)
@@ -3015,11 +3015,8 @@ S:       Maintained
 F:     fs/autofs4/
 
 KERNEL BUILD
-M:     Sam Ravnborg <sam@ravnborg.org>
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next.git
-T:     git git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes.git
 L:     linux-kbuild@vger.kernel.org
-S:     Maintained
+S:     Orphan
 F:     Documentation/kbuild/
 F:     Makefile
 F:     scripts/Makefile.*
index 815680b585ed2d15e766384b1401dd67f5e138d9..b3e888638bb7c819547cba13e5ec48724d596cd1 100644 (file)
@@ -61,21 +61,24 @@ register struct thread_info *__current_thread_info __asm__("$8");
 /*
  * Thread information flags:
  * - these are process state flags and used from assembly
- * - pending work-to-be-done flags come first to fit in and immediate operand.
+ * - pending work-to-be-done flags come first and must be assigned to be
+ *   within bits 0 to 7 to fit in and immediate operand.
+ * - ALPHA_UAC_SHIFT below must be kept consistent with the unaligned
+ *   control flags.
  *
  * TIF_SYSCALL_TRACE is known to be 0 via blbs.
  */
 #define TIF_SYSCALL_TRACE      0       /* syscall trace active */
-#define TIF_SIGPENDING         1       /* signal pending */
-#define TIF_NEED_RESCHED       2       /* rescheduling necessary */
-#define TIF_POLLING_NRFLAG     3       /* poll_idle is polling NEED_RESCHED */
-#define TIF_DIE_IF_KERNEL      4       /* dik recursion lock */
-#define TIF_UAC_NOPRINT                5       /* see sysinfo.h */
-#define TIF_UAC_NOFIX          6
-#define TIF_UAC_SIGBUS         7
-#define TIF_MEMDIE             8
-#define TIF_RESTORE_SIGMASK    9       /* restore signal mask in do_signal */
-#define TIF_NOTIFY_RESUME      10      /* callback before returning to user */
+#define TIF_NOTIFY_RESUME      1       /* callback before returning to user */
+#define TIF_SIGPENDING         2       /* signal pending */
+#define TIF_NEED_RESCHED       3       /* rescheduling necessary */
+#define TIF_POLLING_NRFLAG     8       /* poll_idle is polling NEED_RESCHED */
+#define TIF_DIE_IF_KERNEL      9       /* dik recursion lock */
+#define TIF_UAC_NOPRINT                10      /* see sysinfo.h */
+#define TIF_UAC_NOFIX          11
+#define TIF_UAC_SIGBUS         12
+#define TIF_MEMDIE             13
+#define TIF_RESTORE_SIGMASK    14      /* restore signal mask in do_signal */
 #define TIF_FREEZE             16      /* is freezing for suspend */
 
 #define _TIF_SYSCALL_TRACE     (1<<TIF_SYSCALL_TRACE)
@@ -94,7 +97,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
 #define _TIF_ALLWORK_MASK      (_TIF_WORK_MASK         \
                                 | _TIF_SYSCALL_TRACE)
 
-#define ALPHA_UAC_SHIFT                6
+#define ALPHA_UAC_SHIFT                10
 #define ALPHA_UAC_MASK         (1 << TIF_UAC_NOPRINT | 1 << TIF_UAC_NOFIX | \
                                 1 << TIF_UAC_SIGBUS)
 
index 8e059e58b0acd6eba4aace468da92dd0090e5008..53dd2f1a53aabd25f188053e2e78fb9510d45d75 100644 (file)
@@ -1103,6 +1103,8 @@ marvel_agp_info(void)
         * Allocate the info structure.
         */
        agp = kmalloc(sizeof(*agp), GFP_KERNEL);
+       if (!agp)
+               return NULL;
 
        /*
         * Fill it in.
index 76686497b1e210992fcf0ee51fd86ed800e5dd14..219bf271c0ba2e5f2d668af707df57fbbd00ccfd 100644 (file)
@@ -757,6 +757,8 @@ titan_agp_info(void)
         * Allocate the info structure.
         */
        agp = kmalloc(sizeof(*agp), GFP_KERNEL);
+       if (!agp)
+               return NULL;
 
        /*
         * Fill it in.
index cc783466142754b97475522de5fd39aaa5b85f37..c0de072b8305bab3c507b96f92da2536aab9667c 100644 (file)
@@ -92,7 +92,7 @@ show_interrupts(struct seq_file *p, void *v)
                for_each_online_cpu(j)
                        seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j));
 #endif
-               seq_printf(p, " %14s", irq_desc[irq].chip->typename);
+               seq_printf(p, " %14s", irq_desc[irq].chip->name);
                seq_printf(p, "  %c%s",
                        (action->flags & IRQF_DISABLED)?'+':' ',
                        action->name);
index 38c805dfc5445dd02ba8683d6c538d9daf4c8822..cfde865b78e05f9c02c89d174887e38ef12590b2 100644 (file)
@@ -228,7 +228,7 @@ struct irqaction timer_irqaction = {
 };
 
 static struct irq_chip rtc_irq_type = {
-       .typename       = "RTC",
+       .name           = "RTC",
        .startup        = rtc_startup,
        .shutdown       = rtc_enable_disable,
        .enable         = rtc_enable_disable,
index 50bfec9b588ffbc8ba4d08a47c532bf5f0de7299..83a9ac2808908cf49e2014bf1960e4cdb95afc95 100644 (file)
@@ -84,7 +84,7 @@ i8259a_end_irq(unsigned int irq)
 }
 
 struct irq_chip i8259a_irq_type = {
-       .typename       = "XT-PIC",
+       .name           = "XT-PIC",
        .startup        = i8259a_startup_irq,
        .shutdown       = i8259a_disable_irq,
        .enable         = i8259a_enable_irq,
index 69199a76ec4a41f6d165f66a56738a5b048340bd..989ce46a0cf3392e22d57f36fe23c8ab1752d5d6 100644 (file)
@@ -71,7 +71,7 @@ pyxis_mask_and_ack_irq(unsigned int irq)
 }
 
 static struct irq_chip pyxis_irq_type = {
-       .typename       = "PYXIS",
+       .name           = "PYXIS",
        .startup        = pyxis_startup_irq,
        .shutdown       = pyxis_disable_irq,
        .enable         = pyxis_enable_irq,
index 85229369a1f8bfa31e7e326f1e0bc42020550a75..d63e93e1e8bf885295a26e4ec154c836a96c3d64 100644 (file)
@@ -49,7 +49,7 @@ srm_end_irq(unsigned int irq)
 
 /* Handle interrupts from the SRM, assuming no additional weirdness.  */
 static struct irq_chip srm_irq_type = {
-       .typename       = "SRM",
+       .name           = "SRM",
        .startup        = srm_startup_irq,
        .shutdown       = srm_disable_irq,
        .enable         = srm_enable_irq,
index 382035ef7394666e20f7a4b9c821f2f71051e800..20a30b8b96559e888223d16e60dec6bad9347297 100644 (file)
@@ -90,7 +90,7 @@ alcor_end_irq(unsigned int irq)
 }
 
 static struct irq_chip alcor_irq_type = {
-       .typename       = "ALCOR",
+       .name           = "ALCOR",
        .startup        = alcor_startup_irq,
        .shutdown       = alcor_disable_irq,
        .enable         = alcor_enable_irq,
index ed349436732ba2ded473fc8c65776b422cb77b09..affd0f3f25df09b147c4a1e06146ff2f57e550ce 100644 (file)
@@ -72,7 +72,7 @@ cabriolet_end_irq(unsigned int irq)
 }
 
 static struct irq_chip cabriolet_irq_type = {
-       .typename       = "CABRIOLET",
+       .name           = "CABRIOLET",
        .startup        = cabriolet_startup_irq,
        .shutdown       = cabriolet_disable_irq,
        .enable         = cabriolet_enable_irq,
index 46e70ece5176ec1372e26dc09072759b26de5c43..d64e1e497e76a1edd304d4036f3f1d7a5a41c83a 100644 (file)
@@ -199,7 +199,7 @@ clipper_set_affinity(unsigned int irq, const struct cpumask *affinity)
 }
 
 static struct irq_chip dp264_irq_type = {
-       .typename       = "DP264",
+       .name           = "DP264",
        .startup        = dp264_startup_irq,
        .shutdown       = dp264_disable_irq,
        .enable         = dp264_enable_irq,
@@ -210,7 +210,7 @@ static struct irq_chip dp264_irq_type = {
 };
 
 static struct irq_chip clipper_irq_type = {
-       .typename       = "CLIPPER",
+       .name           = "CLIPPER",
        .startup        = clipper_startup_irq,
        .shutdown       = clipper_disable_irq,
        .enable         = clipper_enable_irq,
index 660c23ef661f686bfbb7c6e2fe382ad3eb8b3478..df2090ce5e7f622b4bececed8ee38cfc0e2b558b 100644 (file)
@@ -70,7 +70,7 @@ eb64p_end_irq(unsigned int irq)
 }
 
 static struct irq_chip eb64p_irq_type = {
-       .typename       = "EB64P",
+       .name           = "EB64P",
        .startup        = eb64p_startup_irq,
        .shutdown       = eb64p_disable_irq,
        .enable         = eb64p_enable_irq,
index b99ea488d8446139d4fabdaa53dbeeedf51446eb..3ca1dbcf404477deb345277541df0b93f9776957 100644 (file)
@@ -81,7 +81,7 @@ eiger_end_irq(unsigned int irq)
 }
 
 static struct irq_chip eiger_irq_type = {
-       .typename       = "EIGER",
+       .name           = "EIGER",
        .startup        = eiger_startup_irq,
        .shutdown       = eiger_disable_irq,
        .enable         = eiger_enable_irq,
index ef0b83a070accb165129291fb58b2bfa19f748e7..7a7ae36fff913d22448687188c4c56536f2b96ae 100644 (file)
@@ -119,7 +119,7 @@ jensen_local_end(unsigned int irq)
 }
 
 static struct irq_chip jensen_local_irq_type = {
-       .typename       = "LOCAL",
+       .name           = "LOCAL",
        .startup        = jensen_local_startup,
        .shutdown       = jensen_local_shutdown,
        .enable         = jensen_local_enable,
index bbfc4f20ca72a2ed9f6e0ac2c3172fc81f8c33d1..0bb3b5c4f69377c3d146237ef50786ee78b56aae 100644 (file)
@@ -170,7 +170,7 @@ marvel_irq_noop_return(unsigned int irq)
 }
 
 static struct irq_chip marvel_legacy_irq_type = {
-       .typename       = "LEGACY",
+       .name           = "LEGACY",
        .startup        = marvel_irq_noop_return,
        .shutdown       = marvel_irq_noop,
        .enable         = marvel_irq_noop,
@@ -180,7 +180,7 @@ static struct irq_chip marvel_legacy_irq_type = {
 };
 
 static struct irq_chip io7_lsi_irq_type = {
-       .typename       = "LSI",
+       .name           = "LSI",
        .startup        = io7_startup_irq,
        .shutdown       = io7_disable_irq,
        .enable         = io7_enable_irq,
@@ -190,7 +190,7 @@ static struct irq_chip io7_lsi_irq_type = {
 };
 
 static struct irq_chip io7_msi_irq_type = {
-       .typename       = "MSI",
+       .name           = "MSI",
        .startup        = io7_startup_irq,
        .shutdown       = io7_disable_irq,
        .enable         = io7_enable_irq,
index 4e366641a08ed20c4f6cba1755f2e9082216a5df..ee88651698110e335dbe644c51ce47601ea3e5f2 100644 (file)
@@ -69,7 +69,7 @@ mikasa_end_irq(unsigned int irq)
 }
 
 static struct irq_chip mikasa_irq_type = {
-       .typename       = "MIKASA",
+       .name           = "MIKASA",
        .startup        = mikasa_startup_irq,
        .shutdown       = mikasa_disable_irq,
        .enable         = mikasa_enable_irq,
index 35753a173bac3073305d8c8a18156d5e7b90840a..86503fe73a8804444d52098d51bb1cd5b787aa85 100644 (file)
@@ -74,7 +74,7 @@ noritake_end_irq(unsigned int irq)
 }
 
 static struct irq_chip noritake_irq_type = {
-       .typename       = "NORITAKE",
+       .name           = "NORITAKE",
        .startup        = noritake_startup_irq,
        .shutdown       = noritake_disable_irq,
        .enable         = noritake_enable_irq,
index f3aec7e085c8c6f0a0165a7f47af0fe076312377..26c322bf89ee195a81863c8a4b42418991c6513f 100644 (file)
@@ -136,7 +136,7 @@ rawhide_end_irq(unsigned int irq)
 }
 
 static struct irq_chip rawhide_irq_type = {
-       .typename       = "RAWHIDE",
+       .name           = "RAWHIDE",
        .startup        = rawhide_startup_irq,
        .shutdown       = rawhide_disable_irq,
        .enable         = rawhide_enable_irq,
index d9f9cfeb9931354cee9d6df304877941ef13ecea..8de1046fe91e7f635decef2e2b08aa8d003977ca 100644 (file)
@@ -66,7 +66,7 @@ ruffian_init_irq(void)
        common_init_isa_dma();
 }
 
-#define RUFFIAN_LATCH  ((PIT_TICK_RATE + HZ / 2) / HZ)
+#define RUFFIAN_LATCH  DIV_ROUND_CLOSEST(PIT_TICK_RATE, HZ)
 
 static void __init
 ruffian_init_rtc(void)
index fc9246373452896439e58c01c8c595a1771c7d63..be161129eab996b0225adc4c73bd1d33ac55e794 100644 (file)
@@ -73,7 +73,7 @@ rx164_end_irq(unsigned int irq)
 }
 
 static struct irq_chip rx164_irq_type = {
-       .typename       = "RX164",
+       .name           = "RX164",
        .startup        = rx164_startup_irq,
        .shutdown       = rx164_disable_irq,
        .enable         = rx164_enable_irq,
index 426eb6906d0192a96872aa5697d2a0fc3bcb57a8..b2abe27a23cff2ad2164f9827efb938e395ce84f 100644 (file)
@@ -502,7 +502,7 @@ sable_lynx_mask_and_ack_irq(unsigned int irq)
 }
 
 static struct irq_chip sable_lynx_irq_type = {
-       .typename       = "SABLE/LYNX",
+       .name           = "SABLE/LYNX",
        .startup        = sable_lynx_startup_irq,
        .shutdown       = sable_lynx_disable_irq,
        .enable         = sable_lynx_enable_irq,
index 830318c21661dba4f36b2443e90686a7e4689d5b..230464885b5cbe1a7683a2c76acdf1e46fbb9bac 100644 (file)
@@ -75,7 +75,7 @@ takara_end_irq(unsigned int irq)
 }
 
 static struct irq_chip takara_irq_type = {
-       .typename       = "TAKARA",
+       .name           = "TAKARA",
        .startup        = takara_startup_irq,
        .shutdown       = takara_disable_irq,
        .enable         = takara_enable_irq,
index 88978fc60f835061b35746d8623b6713606a559b..288053342c83b5e951df1e4a68eb81ba2bd3ad62 100644 (file)
@@ -195,7 +195,7 @@ init_titan_irqs(struct irq_chip * ops, int imin, int imax)
 }
 
 static struct irq_chip titan_irq_type = {
-       .typename       = "TITAN",
+       .name          = "TITAN",
        .startup        = titan_startup_irq,
        .shutdown       = titan_disable_irq,
        .enable         = titan_enable_irq,
index e91b4c3838a8d3e5f21f4e5aa01d7135014fbe14..62fd972e18efcd42156fc3734ce15a2f1edc5819 100644 (file)
@@ -158,7 +158,7 @@ wildfire_end_irq(unsigned int irq)
 }
 
 static struct irq_chip wildfire_irq_type = {
-       .typename       = "WILDFIRE",
+       .name           = "WILDFIRE",
        .startup        = wildfire_startup_irq,
        .shutdown       = wildfire_disable_irq,
        .enable         = wildfire_enable_irq,
index 1aad0d9f5074ec1e4dc676e39ed2803d3a256177..fd7620f025fab0ab25bcd9bca3e3dbf00b78161d 100644 (file)
@@ -358,7 +358,14 @@ config SGI_IP22
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_R4X00
        select SYS_HAS_CPU_R5000
-       select SYS_HAS_EARLY_PRINTK
+       #
+       # Disable EARLY_PRINTK for now since it leads to overwritten prom
+       # memory during early boot on some machines.
+       #
+       # See http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=20091119164009.GA15038%40deprecation.cyrius.com
+       # for a more details discussion
+       #
+       # select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_32BIT_KERNEL
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
@@ -410,7 +417,14 @@ config SGI_IP28
        select SGI_HAS_ZILOG
        select SWAP_IO_SPACE
        select SYS_HAS_CPU_R10000
-       select SYS_HAS_EARLY_PRINTK
+       #
+       # Disable EARLY_PRINTK for now since it leads to overwritten prom
+       # memory during early boot on some machines.
+       #
+       # See http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=20091119164009.GA15038%40deprecation.cyrius.com
+       # for a more details discussion
+       #
+       # select SYS_HAS_EARLY_PRINTK
        select SYS_SUPPORTS_64BIT_KERNEL
        select SYS_SUPPORTS_BIG_ENDIAN
       help
@@ -1439,6 +1453,7 @@ choice
 
 config PAGE_SIZE_4KB
        bool "4kB"
+       depends on !CPU_LOONGSON2
        help
         This option select the standard 4kB Linux page size.  On some
         R3000-family processors this is the only available page size.  Using
@@ -1763,7 +1778,7 @@ config SYS_SUPPORTS_SMARTMIPS
 
 config ARCH_FLATMEM_ENABLE
        def_bool y
-       depends on !NUMA
+       depends on !NUMA && !CPU_LOONGSON2
 
 config ARCH_DISCONTIGMEM_ENABLE
        bool
index a2250f390a292626e9fde6db8ab3edee41e9ea18..c892bfb3e2c1d74eca5a902194e71b46f3e87635 100644 (file)
@@ -75,6 +75,7 @@
 
 #define MADV_MERGEABLE   12            /* KSM may merge identical pages */
 #define MADV_UNMERGEABLE 13            /* KSM may not merge identical pages */
+#define MADV_HWPOISON    100           /* poison a page for testing */
 
 /* compatibility flags */
 #define MAP_FILE       0
index fcf5f98d90ccf6227906449d24b2cfb016a6e1ae..83b5509e09e8cf99a6bd966ee991ce0234806566 100644 (file)
@@ -12,6 +12,7 @@
 #ifndef _ASM_SYSTEM_H
 #define _ASM_SYSTEM_H
 
+#include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/irqflags.h>
 
@@ -193,10 +194,6 @@ extern __u64 __xchg_u64_unsupported_on_32bit_kernels(volatile __u64 * m, __u64 v
 #define __xchg_u64 __xchg_u64_unsupported_on_32bit_kernels
 #endif
 
-/* This function doesn't exist, so you'll get a linker error
-   if something tries to do an invalid xchg().  */
-extern void __xchg_called_with_bad_pointer(void);
-
 static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)
 {
        switch (size) {
@@ -205,11 +202,17 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
        case 8:
                return __xchg_u64(ptr, x);
        }
-       __xchg_called_with_bad_pointer();
+
        return x;
 }
 
-#define xchg(ptr, x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr))))
+#define xchg(ptr, x)                                                   \
+({                                                                     \
+       BUILD_BUG_ON(sizeof(*(ptr)) & ~0xc);                            \
+                                                                       \
+       ((__typeof__(*(ptr)))                                           \
+               __xchg((unsigned long)(x), (ptr), sizeof(*(ptr))));     \
+})
 
 extern void set_handler(unsigned long offset, void *addr, unsigned long len);
 extern void set_uncached_handler(unsigned long offset, void *addr, unsigned long len);
index 3fe1fcfa2e7301825427c8f44faf80efc2969ed2..fe0d7980560368056e187dcc9f852b3218a08951 100644 (file)
@@ -306,6 +306,7 @@ static inline int mips_atomic_set(struct pt_regs *regs,
 
        if (cpu_has_llsc && R10000_LLSC_WAR) {
                __asm__ __volatile__ (
+               "       .set    mips3                                   \n"
                "       li      %[err], 0                               \n"
                "1:     ll      %[old], (%[addr])                       \n"
                "       move    %[tmp], %[new]                          \n"
@@ -320,6 +321,7 @@ static inline int mips_atomic_set(struct pt_regs *regs,
                "       "STR(PTR)"      1b, 4b                          \n"
                "       "STR(PTR)"      2b, 4b                          \n"
                "       .previous                                       \n"
+               "       .set    mips0                                   \n"
                : [old] "=&r" (old),
                  [err] "=&r" (err),
                  [tmp] "=&r" (tmp)
@@ -329,6 +331,7 @@ static inline int mips_atomic_set(struct pt_regs *regs,
                : "memory");
        } else if (cpu_has_llsc) {
                __asm__ __volatile__ (
+               "       .set    mips3                                   \n"
                "       li      %[err], 0                               \n"
                "1:     ll      %[old], (%[addr])                       \n"
                "       move    %[tmp], %[new]                          \n"
@@ -347,6 +350,7 @@ static inline int mips_atomic_set(struct pt_regs *regs,
                "       "STR(PTR)"      1b, 5b                          \n"
                "       "STR(PTR)"      2b, 5b                          \n"
                "       .previous                                       \n"
+               "       .set    mips0                                   \n"
                : [old] "=&r" (old),
                  [err] "=&r" (err),
                  [tmp] "=&r" (tmp)
index 9f40e1ff9b4fe4c71b1827d83972419b2fb4dc81..041fc1afc3f4bf20e9ee7def1dd9de4310010f0b 100644 (file)
@@ -110,7 +110,6 @@ static struct korina_device korina_dev0_data = {
 static struct platform_device korina_dev0 = {
        .id = -1,
        .name = "korina",
-       .dev.driver_data = &korina_dev0_data,
        .resource = korina_dev0_res,
        .num_resources = ARRAY_SIZE(korina_dev0_res),
 };
@@ -332,6 +331,8 @@ static int __init plat_setup_devices(void)
        /* set the uart clock to the current cpu frequency */
        rb532_uart_res[0].uartclk = idt_cpu_freq;
 
+       dev_set_drvdata(&korina_dev0.dev, &korina_dev0_data);
+
        return platform_add_devices(rb532_devs, ARRAY_SIZE(rb532_devs));
 }
 
index 965ece2c7e4da6040454443395adb89240eaa475..13bb69d2abb3307d8cb95c9f21e04e0c7b2e9ae8 100644 (file)
@@ -735,6 +735,21 @@ diskstats(struct gendisk *disk, struct bio *bio, ulong duration, sector_t sector
        part_stat_unlock();
 }
 
+/*
+ * Ensure we don't create aliases in VI caches
+ */
+static inline void
+killalias(struct bio *bio)
+{
+       struct bio_vec *bv;
+       int i;
+
+       if (bio_data_dir(bio) == READ)
+               __bio_for_each_segment(bv, bio, i, 0) {
+                       flush_dcache_page(bv->bv_page);
+               }
+}
+
 void
 aoecmd_ata_rsp(struct sk_buff *skb)
 {
@@ -853,8 +868,12 @@ aoecmd_ata_rsp(struct sk_buff *skb)
 
        if (buf && --buf->nframesout == 0 && buf->resid == 0) {
                diskstats(d->gd, buf->bio, jiffies - buf->stime, buf->sector);
-               n = (buf->flags & BUFFL_FAIL) ? -EIO : 0;
-               bio_endio(buf->bio, n);
+               if (buf->flags & BUFFL_FAIL)
+                       bio_endio(buf->bio, -EIO);
+               else {
+                       killalias(buf->bio);
+                       bio_endio(buf->bio, 0);
+               }
                mempool_free(buf, d->bufpool);
        }
 
index 2e8552dc5edaef207604f2b3b51a26eff898e3ca..c63f3d33914a7def6b4e49d2f3d33a25dbf8fc0c 100644 (file)
@@ -219,8 +219,11 @@ int tty_port_block_til_ready(struct tty_port *port,
 
        /* if non-blocking mode is set we can pass directly to open unless
           the port has just hung up or is in another error state */
-       if ((filp->f_flags & O_NONBLOCK) ||
-                       (tty->flags & (1 << TTY_IO_ERROR))) {
+       if (tty->flags & (1 << TTY_IO_ERROR)) {
+               port->flags |= ASYNC_NORMAL_ACTIVE;
+               return 0;
+       }
+       if (filp->f_flags & O_NONBLOCK) {
                /* Indicate we are open */
                if (tty->termios->c_cflag & CBAUD)
                        tty_port_raise_dtr_rts(port);
index 5711ce5353c65975ec801f66a407b459cd8e664b..4baf3d7d0f8e6e4f1f7887625b7f73a62dba1a83 100644 (file)
@@ -144,13 +144,6 @@ static int lnw_irq_type(unsigned irq, unsigned type)
 
 static void lnw_irq_unmask(unsigned irq)
 {
-       struct lnw_gpio *lnw = get_irq_chip_data(irq);
-       u32 gpio = irq - lnw->irq_base;
-       u8 reg = gpio / 32;
-       void __iomem *gedr;
-
-       gedr = (void __iomem *)(&lnw->reg_base->GEDR[reg]);
-       writel(BIT(gpio % 32), gedr);
 };
 
 static void lnw_irq_mask(unsigned irq)
@@ -183,13 +176,11 @@ static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)
                gedr_v = readl(gedr);
                if (!gedr_v)
                        continue;
-               for (gpio = reg*32; gpio < reg*32+32; gpio++) {
-                       gedr_v = readl(gedr);
+               for (gpio = reg*32; gpio < reg*32+32; gpio++)
                        if (gedr_v & BIT(gpio % 32)) {
                                pr_debug("pin %d triggered\n", gpio);
                                generic_handle_irq(lnw->irq_base + gpio);
                        }
-               }
                /* clear the edge detect status bit */
                writel(gedr_v, gedr);
        }
index a537925f76511ee0d1b5cb50e5f3d18d39f62a8d..2bcf1ace27c0e5b85838008cf892de94dc82a890 100644 (file)
@@ -447,6 +447,27 @@ static struct dmi_system_id __initdata i8042_dmi_reset_table[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "N10"),
                },
        },
+       {
+               .ident = "Dell Vostro 1320",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1320"),
+               },
+       },
+       {
+               .ident = "Dell Vostro 1520",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1520"),
+               },
+       },
+       {
+               .ident = "Dell Vostro 1720",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"),
+               },
+       },
        { }
 };
 
index a053423785c92e74256e4ad8e2aadc658538aee0..e07ce2e033a95c48ba2c9a78c519640743220e2d 100644 (file)
@@ -1650,11 +1650,12 @@ static void raid1d(mddev_t *mddev)
                                               r1_bio->sector,
                                               r1_bio->sectors);
                                unfreeze_array(conf);
-                       }
+                       } else
+                               md_error(mddev,
+                                        conf->mirrors[r1_bio->read_disk].rdev);
 
                        bio = r1_bio->bios[r1_bio->read_disk];
-                       if ((disk=read_balance(conf, r1_bio)) == -1 ||
-                           disk == r1_bio->read_disk) {
+                       if ((disk=read_balance(conf, r1_bio)) == -1) {
                                printk(KERN_ALERT "raid1: %s: unrecoverable I/O"
                                       " read error for block %llu\n",
                                       bdevname(bio->bi_bdev,b),
index ddf639ed2fd8de2d59c4ddfc663bcceb46f95ee2..98082416aa52aec23e14ec242a6416f02ae443c3 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/wait.h>
 #include <linux/slab.h>
 #include <linux/poll.h>
+#include <linux/semaphore.h>
 #include <linux/module.h>
 #include <linux/list.h>
 #include <linux/freezer.h>
index b00d6731905826864abf43a762910899087a3887..9fb480bb0e0a8cca4398941ad4ad483b47dc4887 100644 (file)
@@ -760,6 +760,8 @@ static int pxamci_remove(struct platform_device *pdev)
        if (mmc) {
                struct pxamci_host *host = mmc_priv(mmc);
 
+               mmc_remove_host(mmc);
+
                if (host->pdata) {
                        gpio_cd = host->pdata->gpio_card_detect;
                        gpio_ro = host->pdata->gpio_card_ro;
@@ -779,8 +781,6 @@ static int pxamci_remove(struct platform_device *pdev)
                if (host->pdata && host->pdata->exit)
                        host->pdata->exit(&pdev->dev, mmc);
 
-               mmc_remove_host(mmc);
-
                pxamci_stop_clock(host);
                writel(TXFIFO_WR_REQ|RXFIFO_RD_REQ|CLK_IS_OFF|STOP_CMD|
                       END_CMD_RES|PRG_DONE|DATA_TRAN_DONE,
index 1d8d9879d3a1bacb6d73b0d6729ff8d18d65bd25..48857008758cc96248b38cccc24a05754bd5197d 100644 (file)
@@ -167,6 +167,8 @@ static __devinit int wm831x_isink_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
 
+       isink->wm831x = wm831x;
+
        res = platform_get_resource(pdev, IORESOURCE_IO, 0);
        if (res == NULL) {
                dev_err(&pdev->dev, "No I/O resource\n");
index 33a10c47260e8ff5d1818d53e5b59933150f7133..4c5d5d0c4cfcf13a4cbf462c7d03a8ad8531f99c 100644 (file)
@@ -292,8 +292,9 @@ static int __devinit pcf50633_rtc_probe(struct platform_device *pdev)
                                &pcf50633_rtc_ops, THIS_MODULE);
 
        if (IS_ERR(rtc->rtc_dev)) {
+               int ret =  PTR_ERR(rtc->rtc_dev);
                kfree(rtc);
-               return PTR_ERR(rtc->rtc_dev);
+               return ret;
        }
 
        pcf50633_register_irq(rtc->pcf, PCF50633_IRQ_ALARM,
index 310c10795e9a81cf0c37960a1d40fb46a743369a..6583c1a8b0702b260c70cb7f13845ea8257b0f2b 100644 (file)
@@ -195,7 +195,7 @@ static int x1205_set_datetime(struct i2c_client *client, struct rtc_time *tm,
                /* year, since the rtc epoch*/
                buf[CCR_YEAR] = bin2bcd(tm->tm_year % 100);
                buf[CCR_WDAY] = tm->tm_wday & 0x07;
-               buf[CCR_Y2K] = bin2bcd(tm->tm_year / 100);
+               buf[CCR_Y2K] = bin2bcd((tm->tm_year + 1900) / 100);
        }
 
        /* If writing alarm registers, set compare bits on registers 0-4 */
@@ -280,9 +280,9 @@ static int x1205_fix_osc(struct i2c_client *client)
        int err;
        struct rtc_time tm;
 
-       tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+       memset(&tm, 0, sizeof(tm));
 
-       err = x1205_set_datetime(client, &tm, 0, X1205_CCR_BASE, 0);
+       err = x1205_set_datetime(client, &tm, 1, X1205_CCR_BASE, 0);
        if (err < 0)
                dev_err(&client->dev, "unable to restart the oscillator\n");
 
index beddaa6e906911a2b1e5ee4281fe0c912e6fd73b..37ad0c449937c34046dcef72ec0db07af35b42ec 100644 (file)
@@ -242,7 +242,7 @@ static void bcm_uart_do_rx(struct uart_port *port)
         * higher than fifo size anyway since we're much faster than
         * serial port */
        max_count = 32;
-       tty = port->info->port.tty;
+       tty = port->state->port.tty;
        do {
                unsigned int iestat, c, cstat;
                char flag;
@@ -318,7 +318,7 @@ static void bcm_uart_do_tx(struct uart_port *port)
                return;
        }
 
-       xmit = &port->info->xmit;
+       xmit = &port->state->xmit;
        if (uart_circ_empty(xmit))
                goto txq_empty;
 
index 02406ba6da1c565e7c88d58507da66ba6d0ec8df..cdf172eda2e3792a61abc155d1c63b7c0396b92c 100644 (file)
@@ -161,6 +161,7 @@ static int of_platform_serial_remove(struct of_device *ofdev)
 static struct of_device_id __devinitdata of_platform_serial_table[] = {
        { .type = "serial", .compatible = "ns8250",   .data = (void *)PORT_8250, },
        { .type = "serial", .compatible = "ns16450",  .data = (void *)PORT_16450, },
+       { .type = "serial", .compatible = "ns16550a", .data = (void *)PORT_16550A, },
        { .type = "serial", .compatible = "ns16550",  .data = (void *)PORT_16550, },
        { .type = "serial", .compatible = "ns16750",  .data = (void *)PORT_16750, },
        { .type = "serial", .compatible = "ns16850",  .data = (void *)PORT_16850, },
index 51aa861292fc5ff0539baaaee69eee698923d72c..a48ee3a126466957290ae86d0a35e2a0e7212b75 100644 (file)
@@ -16,6 +16,7 @@
  * Place - Suite 330, Boston, MA 02111-1307 USA.
  *
  * Authors:
+ *   Haiyang Zhang <haiyangz@microsoft.com>
  *   Hank Janssen  <hjanssen@microsoft.com>
  *
  */
index d649ee169d953ae3129c0ff377dd5ee866ed968f..746370e82115ce30ea1b99973dc3016d5d9cd862 100644 (file)
@@ -611,7 +611,7 @@ void VmbusChannelClose(struct vmbus_channel *Channel)
 
        /* Stop callback and cancel the timer asap */
        Channel->OnChannelCallback = NULL;
-       del_timer(&Channel->poll_timer);
+       del_timer_sync(&Channel->poll_timer);
 
        /* Send a closing message */
        info = kmalloc(sizeof(*info) +
@@ -978,14 +978,10 @@ void VmbusChannelOnChannelEvent(struct vmbus_channel *Channel)
 {
        DumpVmbusChannel(Channel);
        ASSERT(Channel->OnChannelCallback);
-#ifdef ENABLE_POLLING
-       del_timer(&Channel->poll_timer);
-       Channel->OnChannelCallback(Channel->ChannelCallbackContext);
-       channel->poll_timer.expires(jiffies + usecs_to_jiffies(100);
-       add_timer(&channel->poll_timer);
-#else
+
        Channel->OnChannelCallback(Channel->ChannelCallbackContext);
-#endif
+
+       mod_timer(&Channel->poll_timer, jiffies + usecs_to_jiffies(100));
 }
 
 /**
@@ -997,10 +993,6 @@ void VmbusChannelOnTimer(unsigned long data)
 
        if (channel->OnChannelCallback) {
                channel->OnChannelCallback(channel->ChannelCallbackContext);
-#ifdef ENABLE_POLLING
-               channel->poll_timer.expires(jiffies + usecs_to_jiffies(100);
-               add_timer(&channel->poll_timer);
-#endif
        }
 }
 
index 3db62caedcffda0b06d9e37b1ce66f7a95ab15ae..ef38467ed4e20d51ce71033265717d1ebc3023dd 100644 (file)
@@ -119,7 +119,7 @@ static inline void ReleaseVmbusChannel(void *context)
  */
 void FreeVmbusChannel(struct vmbus_channel *Channel)
 {
-       del_timer(&Channel->poll_timer);
+       del_timer_sync(&Channel->poll_timer);
 
        /*
         * We have to release the channel's workqueue/thread in the vmbus's
index d384c0ddf06916275a666ea8b8fa8bf054b2c258..1c717f9a554ef36cc1dd43725f54989b99db5b9f 100644 (file)
@@ -15,6 +15,7 @@
  * Place - Suite 330, Boston, MA 02111-1307 USA.
  *
  * Authors:
+ *   Haiyang Zhang <haiyangz@microsoft.com>
  *   Hank Janssen  <hjanssen@microsoft.com>
  */
 #include <linux/kernel.h>
index 3e7112f7c75536bb9c0b990c39da6180aaf10d97..6e0e0349412675675f2ce0c65053ffb9bbde18d5 100644 (file)
@@ -16,6 +16,7 @@
  * Place - Suite 330, Boston, MA 02111-1307 USA.
  *
  * Authors:
+ *   Haiyang Zhang <haiyangz@microsoft.com>
  *   Hank Janssen  <hjanssen@microsoft.com>
  *
  */
index 14015c9279400436ab558e68ae6d30a5f730fa41..2f7c425896f7a6c81163ec80ba72488b5a737fe6 100644 (file)
@@ -196,7 +196,7 @@ static int StorVscChannelInit(struct hv_device *Device)
         * Now, initiate the vsc/vsp initialization protocol on the open
         * channel
         */
-       memset(request, sizeof(struct storvsc_request_extension), 0);
+       memset(request, 0, sizeof(struct storvsc_request_extension));
        request->WaitEvent = osd_WaitEventCreate();
 
        vstorPacket->Operation = VStorOperationBeginInitialization;
@@ -233,7 +233,7 @@ static int StorVscChannelInit(struct hv_device *Device)
        DPRINT_INFO(STORVSC, "QUERY_PROTOCOL_VERSION_OPERATION...");
 
        /* reuse the packet for version range supported */
-       memset(vstorPacket, sizeof(struct vstor_packet), 0);
+       memset(vstorPacket, 0, sizeof(struct vstor_packet));
        vstorPacket->Operation = VStorOperationQueryProtocolVersion;
        vstorPacket->Flags = REQUEST_COMPLETION_FLAG;
 
@@ -266,7 +266,7 @@ static int StorVscChannelInit(struct hv_device *Device)
        /* Query channel properties */
        DPRINT_INFO(STORVSC, "QUERY_PROPERTIES_OPERATION...");
 
-       memset(vstorPacket, sizeof(struct vstor_packet), 0);
+       memset(vstorPacket, 0, sizeof(struct vstor_packet));
        vstorPacket->Operation = VStorOperationQueryProperties;
        vstorPacket->Flags = REQUEST_COMPLETION_FLAG;
        vstorPacket->StorageChannelProperties.PortNumber =
@@ -305,7 +305,7 @@ static int StorVscChannelInit(struct hv_device *Device)
 
        DPRINT_INFO(STORVSC, "END_INITIALIZATION_OPERATION...");
 
-       memset(vstorPacket, sizeof(struct vstor_packet), 0);
+       memset(vstorPacket, 0, sizeof(struct vstor_packet));
        vstorPacket->Operation = VStorOperationEndInitialization;
        vstorPacket->Flags = REQUEST_COMPLETION_FLAG;
 
@@ -508,7 +508,7 @@ static int StorVscConnectToVsp(struct hv_device *Device)
        int ret;
 
        storDriver = (struct storvsc_driver_object *)Device->Driver;
-       memset(&props, sizeof(struct vmstorage_channel_properties), 0);
+       memset(&props, 0, sizeof(struct vmstorage_channel_properties));
 
        /* Open the channel */
        ret = Device->Driver->VmbusChannelInterface.Open(Device,
index 99c49261a8b4f125b9c05b8fa8cf1604ea70358b..62b282844a53eb2e29ff96e418d95d778b1fc700 100644 (file)
@@ -15,6 +15,7 @@
  * Place - Suite 330, Boston, MA 02111-1307 USA.
  *
  * Authors:
+ *   Haiyang Zhang <haiyangz@microsoft.com>
  *   Hank Janssen  <hjanssen@microsoft.com>
  */
 #include <linux/init.h>
index 3192d50f72511a897627191babeb5e7b6c97e3fd..0d7459e2d0360b8996b104e1385df56bd9fd8150 100644 (file)
@@ -15,6 +15,7 @@
  * Place - Suite 330, Boston, MA 02111-1307 USA.
  *
  * Authors:
+ *   Haiyang Zhang <haiyangz@microsoft.com>
  *   Hank Janssen  <hjanssen@microsoft.com>
  */
 #include <linux/init.h>
index c09a9160739dc087e8eeacd07ceb8fbd727dc50a..a762e79873e978fe1a62067c2409643bd16bf218 100644 (file)
@@ -11,5 +11,4 @@ TODO:
 - sparse fixes
 - integrate with drivers/net/wireless/rtl818x
 
-Please send any patches to Greg Kroah-Hartman <greg@kroah.com> and
-Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>.
+Please send any patches to Greg Kroah-Hartman <greg@kroah.com>.
index b13be9edb278597bd22531fb20d09e88853ad0f3..f11eec700030112e2f4cbfa699a5ddf7d1e57978 100644 (file)
@@ -14,5 +14,4 @@ TODO:
 - sparse fixes
 - integrate with drivers/net/wireless/rtl818x
 
-Please send any patches to Greg Kroah-Hartman <greg@kroah.com> and
-Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>.
+Please send any patches to Greg Kroah-Hartman <greg@kroah.com>.
index 8462cd17eb61777805ffa235806cf8d4cebec332..cb04aaafc46f1810e111a356c11823bb53ffcd8e 100644 (file)
@@ -16,6 +16,5 @@ TODO:
 - sparse fixes
 - integrate with drivers/net/wireless
 
-Please send any patches to Greg Kroah-Hartman <greg@kroah.com>,
-Forest Bond <forest@alittletooquiet.net> and Bartlomiej Zolnierkiewicz
-<bzolnier@gmail.com>.
+Please send any patches to Greg Kroah-Hartman <greg@kroah.com>
+and Forest Bond <forest@alittletooquiet.net>.
index 17cf50c6735e42c3a709c67b4cabb74091cddf96..a318995ba07f471032d46885e0303fdf66e94d50 100644 (file)
@@ -15,6 +15,5 @@ TODO:
 - sparse fixes
 - integrate with drivers/net/wireless
 
-Please send any patches to Greg Kroah-Hartman <greg@kroah.com>,
-Forest Bond <forest@alittletooquiet.net> and Bartlomiej Zolnierkiewicz
-<bzolnier@gmail.com>.
+Please send any patches to Greg Kroah-Hartman <greg@kroah.com>
+and Forest Bond <forest@alittletooquiet.net>.
index 5ce839137ad6a8350b4a6053f5076582ce076487..0f857e6450581159a261fc59d0403b7300fc8b24 100644 (file)
@@ -444,7 +444,7 @@ resubmit:
 static inline int
 hub_clear_tt_buffer (struct usb_device *hdev, u16 devinfo, u16 tt)
 {
-       return usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
+       return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
                               HUB_CLEAR_TT_BUFFER, USB_RT_PORT, devinfo,
                               tt, NULL, 0, 1000);
 }
index d5b65962dd36a0bf9050cd61c51140979f9ca3d2..731150d4b1d9d0e646e34ca03f7cbaa0ac85e398 100644 (file)
@@ -1213,7 +1213,12 @@ udc_queue(struct usb_ep *usbep, struct usb_request *usbreq, gfp_t gfp)
                                tmp &= AMD_UNMASK_BIT(ep->num);
                                writel(tmp, &dev->regs->ep_irqmsk);
                        }
-               }
+               } else if (ep->in) {
+                               /* enable ep irq */
+                               tmp = readl(&dev->regs->ep_irqmsk);
+                               tmp &= AMD_UNMASK_BIT(ep->num);
+                               writel(tmp, &dev->regs->ep_irqmsk);
+                       }
 
        } else if (ep->dma) {
 
@@ -2005,18 +2010,17 @@ __acquires(dev->lock)
 {
        int tmp;
 
-       /* empty queues and init hardware */
-       udc_basic_init(dev);
-       for (tmp = 0; tmp < UDC_EP_NUM; tmp++) {
-               empty_req_queue(&dev->ep[tmp]);
-       }
-
        if (dev->gadget.speed != USB_SPEED_UNKNOWN) {
                spin_unlock(&dev->lock);
                driver->disconnect(&dev->gadget);
                spin_lock(&dev->lock);
        }
-       /* init */
+
+       /* empty queues and init hardware */
+       udc_basic_init(dev);
+       for (tmp = 0; tmp < UDC_EP_NUM; tmp++)
+               empty_req_queue(&dev->ep[tmp]);
+
        udc_setup_endpoints(dev);
 }
 
@@ -2472,6 +2476,13 @@ static irqreturn_t udc_data_in_isr(struct udc *dev, int ep_ix)
                                }
                        }
 
+               } else if (!use_dma && ep->in) {
+                       /* disable interrupt */
+                       tmp = readl(
+                               &dev->regs->ep_irqmsk);
+                       tmp |= AMD_BIT(ep->num);
+                       writel(tmp,
+                               &dev->regs->ep_irqmsk);
                }
        }
        /* clear status bits */
@@ -3279,6 +3290,17 @@ static int udc_pci_probe(
                goto finished;
        }
 
+       spin_lock_init(&dev->lock);
+       /* udc csr registers base */
+       dev->csr = dev->virt_addr + UDC_CSR_ADDR;
+       /* dev registers base */
+       dev->regs = dev->virt_addr + UDC_DEVCFG_ADDR;
+       /* ep registers base */
+       dev->ep_regs = dev->virt_addr + UDC_EPREGS_ADDR;
+       /* fifo's base */
+       dev->rxfifo = (u32 __iomem *)(dev->virt_addr + UDC_RXFIFO_ADDR);
+       dev->txfifo = (u32 __iomem *)(dev->virt_addr + UDC_TXFIFO_ADDR);
+
        if (request_irq(pdev->irq, udc_irq, IRQF_SHARED, name, dev) != 0) {
                dev_dbg(&dev->pdev->dev, "request_irq(%d) fail\n", pdev->irq);
                kfree(dev);
@@ -3331,7 +3353,6 @@ static int udc_probe(struct udc *dev)
        udc_pollstall_timer.data = 0;
 
        /* device struct setup */
-       spin_lock_init(&dev->lock);
        dev->gadget.ops = &udc_ops;
 
        dev_set_name(&dev->gadget.dev, "gadget");
@@ -3340,16 +3361,6 @@ static int udc_probe(struct udc *dev)
        dev->gadget.name = name;
        dev->gadget.is_dualspeed = 1;
 
-       /* udc csr registers base */
-       dev->csr = dev->virt_addr + UDC_CSR_ADDR;
-       /* dev registers base */
-       dev->regs = dev->virt_addr + UDC_DEVCFG_ADDR;
-       /* ep registers base */
-       dev->ep_regs = dev->virt_addr + UDC_EPREGS_ADDR;
-       /* fifo's base */
-       dev->rxfifo = (u32 __iomem *)(dev->virt_addr + UDC_RXFIFO_ADDR);
-       dev->txfifo = (u32 __iomem *)(dev->virt_addr + UDC_TXFIFO_ADDR);
-
        /* init registers, interrupts, ... */
        startup_registers(dev);
 
index 9835e0713943397fde9b5200f58fa36ab7db547a..f5f5601701c9b2c38168ddc0052e5cf6818a07c5 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/timer.h>
+#include <linux/ktime.h>
 #include <linux/list.h>
 #include <linux/interrupt.h>
 #include <linux/usb.h>
@@ -676,6 +677,7 @@ static int ehci_run (struct usb_hcd *hcd)
        ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */
        msleep(5);
        up_write(&ehci_cf_port_reset_rwsem);
+       ehci->last_periodic_enable = ktime_get_real();
 
        temp = HC_VERSION(ehci_readl(ehci, &ehci->caps->hc_capbase));
        ehci_info (ehci,
index 378861b9d79a96fe926dcf86755c984646528a22..ead5f4f2aa5a43ecf189000e9b0322888675d1a0 100644 (file)
@@ -111,6 +111,10 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
        switch (pdev->vendor) {
        case PCI_VENDOR_ID_INTEL:
                ehci->need_io_watchdog = 0;
+               if (pdev->device == 0x27cc) {
+                       ehci->broken_periodic = 1;
+                       ehci_info(ehci, "using broken periodic workaround\n");
+               }
                break;
        case PCI_VENDOR_ID_TDI:
                if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) {
index 00ad9ce392ed6871c35a31b429865909874f33e5..139a2cc3f6410a3381936d3820c0cb37030ef8c6 100644 (file)
@@ -487,8 +487,20 @@ halt:
                         * we must clear the TT buffer (11.17.5).
                         */
                        if (unlikely(last_status != -EINPROGRESS &&
-                                       last_status != -EREMOTEIO))
-                               ehci_clear_tt_buffer(ehci, qh, urb, token);
+                                       last_status != -EREMOTEIO)) {
+                               /* The TT's in some hubs malfunction when they
+                                * receive this request following a STALL (they
+                                * stop sending isochronous packets).  Since a
+                                * STALL can't leave the TT buffer in a busy
+                                * state (if you believe Figures 11-48 - 11-51
+                                * in the USB 2.0 spec), we won't clear the TT
+                                * buffer in this case.  Strictly speaking this
+                                * is a violation of the spec.
+                                */
+                               if (last_status != -EPIPE)
+                                       ehci_clear_tt_buffer(ehci, qh, urb,
+                                                       token);
+                       }
                }
 
                /* if we're removing something not at the queue head,
index b25cdea93a1f7101da89b0e85f7183366e7468a6..a5535b5e3fe27860caebb3d50f228ea6d85fd1b8 100644 (file)
@@ -475,6 +475,8 @@ static int enable_periodic (struct ehci_hcd *ehci)
        /* make sure ehci_work scans these */
        ehci->next_uframe = ehci_readl(ehci, &ehci->regs->frame_index)
                % (ehci->periodic_size << 3);
+       if (unlikely(ehci->broken_periodic))
+               ehci->last_periodic_enable = ktime_get_real();
        return 0;
 }
 
@@ -486,6 +488,16 @@ static int disable_periodic (struct ehci_hcd *ehci)
        if (--ehci->periodic_sched)
                return 0;
 
+       if (unlikely(ehci->broken_periodic)) {
+               /* delay experimentally determined */
+               ktime_t safe = ktime_add_us(ehci->last_periodic_enable, 1000);
+               ktime_t now = ktime_get_real();
+               s64 delay = ktime_us_delta(safe, now);
+
+               if (unlikely(delay > 0))
+                       udelay(delay);
+       }
+
        /* did setting PSE not take effect yet?
         * takes effect only at frame boundaries...
         */
index 064e76821ff5852e557b9c9dd5de9a297e79caf2..2d85e21ff282e9199be521fe630588cf8b3e01fb 100644 (file)
@@ -118,6 +118,7 @@ struct ehci_hcd {                   /* one per controller */
        unsigned                stamp;
        unsigned                random_frame;
        unsigned long           next_statechange;
+       ktime_t                 last_periodic_enable;
        u32                     command;
 
        /* SILICON QUIRKS */
@@ -127,6 +128,7 @@ struct ehci_hcd {                   /* one per controller */
        unsigned                big_endian_desc:1;
        unsigned                has_amcc_usb23:1;
        unsigned                need_io_watchdog:1;
+       unsigned                broken_periodic:1;
 
        /* required for usb32 quirk */
        #define OHCI_CTRL_HCFS          (3 << 6)
index c3577bbbae6c76722b5d9e7699f6045c8baf6cbc..ef2332a9941dec7a39c25d52a69b4fce3943771d 100644 (file)
@@ -1442,11 +1442,6 @@ static int cppi_channel_abort(struct dma_channel *channel)
                musb_writew(regs, MUSB_TXCSR, value);
                musb_writew(regs, MUSB_TXCSR, value);
 
-               /* re-enable interrupt */
-               if (enabled)
-                       musb_writel(tibase, DAVINCI_TXCPPI_INTENAB_REG,
-                                       (1 << cppi_ch->index));
-
                /* While we scrub the TX state RAM, ensure that we clean
                 * up any interrupt that's currently asserted:
                 * 1. Write to completion Ptr value 0x1(bit 0 set)
@@ -1459,6 +1454,11 @@ static int cppi_channel_abort(struct dma_channel *channel)
                cppi_reset_tx(tx_ram, 1);
                musb_writel(&tx_ram->tx_complete, 0, 0);
 
+               /* re-enable interrupt */
+               if (enabled)
+                       musb_writel(tibase, DAVINCI_TXCPPI_INTENAB_REG,
+                                       (1 << cppi_ch->index));
+
                cppi_dump_tx(5, cppi_ch, " (done teardown)");
 
                /* REVISIT tx side _should_ clean up the same way
index 3a61ddb62bd28a45947a1e4d198fe6304c2d0d5b..547e0e3907268cc0d6f1b6b71d45d0a14e1129a8 100644 (file)
@@ -1450,7 +1450,7 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
 #endif
 
                if (hw_ep->max_packet_sz_tx) {
-                       printk(KERN_DEBUG
+                       DBG(1,
                                "%s: hw_ep %d%s, %smax %d\n",
                                musb_driver_name, i,
                                hw_ep->is_shared_fifo ? "shared" : "tx",
@@ -1459,7 +1459,7 @@ static int __init musb_core_init(u16 musb_type, struct musb *musb)
                                hw_ep->max_packet_sz_tx);
                }
                if (hw_ep->max_packet_sz_rx && !hw_ep->is_shared_fifo) {
-                       printk(KERN_DEBUG
+                       DBG(1,
                                "%s: hw_ep %d%s, %smax %d\n",
                                musb_driver_name, i,
                                "rx",
index 8b3c4e2ed7b865aab0636bf18c6d5b7d0138da0f..74073f9a43f09cafc6afed82e5a9cadd17304d62 100644 (file)
@@ -4,6 +4,7 @@
  * Copyright 2005 Mentor Graphics Corporation
  * Copyright (C) 2005-2006 by Texas Instruments
  * Copyright (C) 2006-2007 Nokia Corporation
+ * Copyright (C) 2009 MontaVista Software, Inc. <source@mvista.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -436,14 +437,6 @@ void musb_g_tx(struct musb *musb, u8 epnum)
                        csr |= MUSB_TXCSR_P_WZC_BITS;
                        csr &= ~MUSB_TXCSR_P_SENTSTALL;
                        musb_writew(epio, MUSB_TXCSR, csr);
-                       if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) {
-                               dma->status = MUSB_DMA_STATUS_CORE_ABORT;
-                               musb->dma_controller->channel_abort(dma);
-                       }
-
-                       if (request)
-                               musb_g_giveback(musb_ep, request, -EPIPE);
-
                        break;
                }
 
@@ -582,15 +575,25 @@ void musb_g_tx(struct musb *musb, u8 epnum)
  */
 static void rxstate(struct musb *musb, struct musb_request *req)
 {
-       u16                     csr = 0;
        const u8                epnum = req->epnum;
        struct usb_request      *request = &req->request;
        struct musb_ep          *musb_ep = &musb->endpoints[epnum].ep_out;
        void __iomem            *epio = musb->endpoints[epnum].regs;
        unsigned                fifo_count = 0;
        u16                     len = musb_ep->packet_sz;
+       u16                     csr = musb_readw(epio, MUSB_RXCSR);
 
-       csr = musb_readw(epio, MUSB_RXCSR);
+       /* We shouldn't get here while DMA is active, but we do... */
+       if (dma_channel_status(musb_ep->dma) == MUSB_DMA_STATUS_BUSY) {
+               DBG(4, "DMA pending...\n");
+               return;
+       }
+
+       if (csr & MUSB_RXCSR_P_SENDSTALL) {
+               DBG(5, "%s stalling, RXCSR %04x\n",
+                   musb_ep->end_point.name, csr);
+               return;
+       }
 
        if (is_cppi_enabled() && musb_ep->dma) {
                struct dma_controller   *c = musb->dma_controller;
@@ -761,19 +764,10 @@ void musb_g_rx(struct musb *musb, u8 epnum)
                        csr, dma ? " (dma)" : "", request);
 
        if (csr & MUSB_RXCSR_P_SENTSTALL) {
-               if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) {
-                       dma->status = MUSB_DMA_STATUS_CORE_ABORT;
-                       (void) musb->dma_controller->channel_abort(dma);
-                       request->actual += musb_ep->dma->actual_len;
-               }
-
                csr |= MUSB_RXCSR_P_WZC_BITS;
                csr &= ~MUSB_RXCSR_P_SENTSTALL;
                musb_writew(epio, MUSB_RXCSR, csr);
-
-               if (request)
-                       musb_g_giveback(musb_ep, request, -EPIPE);
-               goto done;
+               return;
        }
 
        if (csr & MUSB_RXCSR_P_OVERRUN) {
@@ -795,7 +789,7 @@ void musb_g_rx(struct musb *musb, u8 epnum)
                DBG((csr & MUSB_RXCSR_DMAENAB) ? 4 : 1,
                        "%s busy, csr %04x\n",
                        musb_ep->end_point.name, csr);
-               goto done;
+               return;
        }
 
        if (dma && (csr & MUSB_RXCSR_DMAENAB)) {
@@ -826,22 +820,15 @@ void musb_g_rx(struct musb *musb, u8 epnum)
                if ((request->actual < request->length)
                                && (musb_ep->dma->actual_len
                                        == musb_ep->packet_sz))
-                       goto done;
+                       return;
 #endif
                musb_g_giveback(musb_ep, request, 0);
 
                request = next_request(musb_ep);
                if (!request)
-                       goto done;
-
-               /* don't start more i/o till the stall clears */
-               musb_ep_select(mbase, epnum);
-               csr = musb_readw(epio, MUSB_RXCSR);
-               if (csr & MUSB_RXCSR_P_SENDSTALL)
-                       goto done;
+                       return;
        }
 
-
        /* analyze request if the ep is hot */
        if (request)
                rxstate(musb, to_musb_request(request));
@@ -849,8 +836,6 @@ void musb_g_rx(struct musb *musb, u8 epnum)
                DBG(3, "packet waiting for %s%s request\n",
                                musb_ep->desc ? "" : "inactive ",
                                musb_ep->end_point.name);
-
-done:
        return;
 }
 
@@ -1244,7 +1229,7 @@ int musb_gadget_set_halt(struct usb_ep *ep, int value)
        void __iomem            *mbase;
        unsigned long           flags;
        u16                     csr;
-       struct musb_request     *request = NULL;
+       struct musb_request     *request;
        int                     status = 0;
 
        if (!ep)
@@ -1260,24 +1245,29 @@ int musb_gadget_set_halt(struct usb_ep *ep, int value)
 
        musb_ep_select(mbase, epnum);
 
-       /* cannot portably stall with non-empty FIFO */
        request = to_musb_request(next_request(musb_ep));
-       if (value && musb_ep->is_in) {
-               csr = musb_readw(epio, MUSB_TXCSR);
-               if (csr & MUSB_TXCSR_FIFONOTEMPTY) {
-                       DBG(3, "%s fifo busy, cannot halt\n", ep->name);
-                       spin_unlock_irqrestore(&musb->lock, flags);
-                       return -EAGAIN;
+       if (value) {
+               if (request) {
+                       DBG(3, "request in progress, cannot halt %s\n",
+                           ep->name);
+                       status = -EAGAIN;
+                       goto done;
+               }
+               /* Cannot portably stall with non-empty FIFO */
+               if (musb_ep->is_in) {
+                       csr = musb_readw(epio, MUSB_TXCSR);
+                       if (csr & MUSB_TXCSR_FIFONOTEMPTY) {
+                               DBG(3, "FIFO busy, cannot halt %s\n", ep->name);
+                               status = -EAGAIN;
+                               goto done;
+                       }
                }
-
        }
 
        /* set/clear the stall and toggle bits */
        DBG(2, "%s: %s stall\n", ep->name, value ? "set" : "clear");
        if (musb_ep->is_in) {
                csr = musb_readw(epio, MUSB_TXCSR);
-               if (csr & MUSB_TXCSR_FIFONOTEMPTY)
-                       csr |= MUSB_TXCSR_FLUSHFIFO;
                csr |= MUSB_TXCSR_P_WZC_BITS
                        | MUSB_TXCSR_CLRDATATOG;
                if (value)
@@ -1300,14 +1290,13 @@ int musb_gadget_set_halt(struct usb_ep *ep, int value)
                musb_writew(epio, MUSB_RXCSR, csr);
        }
 
-done:
-
        /* maybe start the first request in the queue */
        if (!musb_ep->busy && !value && request) {
                DBG(3, "restarting the request\n");
                musb_ep_restart(musb, request);
        }
 
+done:
        spin_unlock_irqrestore(&musb->lock, flags);
        return status;
 }
index 7a6778675ad3a8d5a76d1f8de9477a8c48309d12..522efb31b56b5304a0f2d52b4e232749f8c6a319 100644 (file)
@@ -511,7 +511,8 @@ static void ep0_txstate(struct musb *musb)
 
        /* update the flags */
        if (fifo_count < MUSB_MAX_END0_PACKET
-                       || request->actual == request->length) {
+                       || (request->actual == request->length
+                               && !request->zero)) {
                musb->ep0_state = MUSB_EP0_STAGE_STATUSOUT;
                csr |= MUSB_CSR0_P_DATAEND;
        } else
index cf94511485f258a07d60186d43e3687fcf959a87..e3ab40a966eb4ce4f5b9a35eecdbf1ed49e48477 100644 (file)
@@ -1301,8 +1301,11 @@ void musb_host_tx(struct musb *musb, u8 epnum)
                return;
        } else  if (usb_pipeisoc(pipe) && dma) {
                if (musb_tx_dma_program(musb->dma_controller, hw_ep, qh, urb,
-                               offset, length))
+                               offset, length)) {
+                       if (is_cppi_enabled() || tusb_dma_omap())
+                               musb_h_tx_dma_start(hw_ep);
                        return;
+               }
        } else  if (tx_csr & MUSB_TXCSR_DMAENAB) {
                DBG(1, "not complete, but DMA enabled?\n");
                return;
index 9c60d6d4908a411019f61e7ce73e2a27877a9912..ebcc6d0e2e91ec48d355a020e6da86f34c727508 100644 (file)
@@ -1937,7 +1937,7 @@ static void ftdi_write_bulk_callback(struct urb *urb)
                return;
        }
        /* account for transferred data */
-       countback = urb->actual_length;
+       countback = urb->transfer_buffer_length;
        data_offset = priv->write_offset;
        if (data_offset > 0) {
                /* Subtract the control bytes */
@@ -1950,7 +1950,6 @@ static void ftdi_write_bulk_callback(struct urb *urb)
 
        if (status) {
                dbg("nonzero write bulk status received: %d", status);
-               return;
        }
 
        usb_serial_port_softint(port);
index 319aaf9725b37f99678381637fa605d29bfe3346..0577e4b611147806203ebf1e0864167cfc98d0c3 100644 (file)
@@ -336,6 +336,10 @@ static int  option_resume(struct usb_serial *serial);
 #define AIRPLUS_VENDOR_ID                      0x1011
 #define AIRPLUS_PRODUCT_MCD650                 0x3198
 
+/* 4G Systems products */
+#define FOUR_G_SYSTEMS_VENDOR_ID               0x1c9e
+#define FOUR_G_SYSTEMS_PRODUCT_W14             0x9603
+
 static struct usb_device_id option_ids[] = {
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
        { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
@@ -599,6 +603,7 @@ static struct usb_device_id option_ids[] = {
        { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S) },
        { USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) },
        { USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) },
+       { USB_DEVICE(FOUR_G_SYSTEMS_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14) },
        { } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, option_ids);
index 035d56835b75477118c0bfc430d6a4d7c1d71d62..ea1fd3f475115746a84ceef6a048fa6b09489cd3 100644 (file)
@@ -554,11 +554,11 @@ static int fb_check_var(struct fb_var_screeninfo *var,
                var->transp.length = 0;
                break;
        case 16:                /* RGB 565 */
-               var->red.offset = 0;
+               var->red.offset = 11;
                var->red.length = 5;
                var->green.offset = 5;
                var->green.length = 6;
-               var->blue.offset = 11;
+               var->blue.offset = 0;
                var->blue.length = 5;
                var->transp.offset = 0;
                var->transp.length = 0;
@@ -591,7 +591,7 @@ static int __devexit fb_remove(struct platform_device *dev)
                unregister_framebuffer(info);
                fb_dealloc_cmap(&info->cmap);
                dma_free_coherent(NULL, par->databuf_sz + PAGE_SIZE,
-                                       info->screen_base,
+                                       info->screen_base - PAGE_SIZE,
                                        info->fix.smem_start);
                free_irq(par->irq, par);
                clk_disable(par->lcdc_clk);
@@ -749,6 +749,7 @@ static int __init fb_probe(struct platform_device *device)
                                (PAGE_SIZE - par->palette_sz);
 
        /* the rest of the frame buffer is pixel data */
+       da8xx_fb_info->screen_base = par->v_palette_base + par->palette_sz;
        da8xx_fb_fix.smem_start = par->p_palette_base + par->palette_sz;
        da8xx_fb_fix.smem_len = par->databuf_sz - par->palette_sz;
        da8xx_fb_fix.line_length = (lcdc_info->width * lcd_cfg->bpp) / 8;
@@ -787,6 +788,8 @@ static int __init fb_probe(struct platform_device *device)
        da8xx_fb_info->var = da8xx_fb_var;
        da8xx_fb_info->fbops = &da8xx_fb_ops;
        da8xx_fb_info->pseudo_palette = par->pseudo_palette;
+       da8xx_fb_info->fix.visual = (da8xx_fb_info->var.bits_per_pixel <= 8) ?
+                               FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
 
        ret = fb_alloc_cmap(&da8xx_fb_info->cmap, PALETTE_SIZE, 0);
        if (ret)
@@ -825,7 +828,7 @@ err_free_irq:
 
 err_release_fb_mem:
        dma_free_coherent(NULL, par->databuf_sz + PAGE_SIZE,
-                               da8xx_fb_info->screen_base,
+                               da8xx_fb_info->screen_base - PAGE_SIZE,
                                da8xx_fb_info->fix.smem_start);
 
 err_release_fb:
index f6cccc9df022cbb55b04aa5fac43fcfd6413964c..bf12d06b587774ff1a576619427f73e9380195ae 100644 (file)
@@ -62,7 +62,7 @@ extern unsigned int idt_cpu_freq;
 static int timeout = WATCHDOG_TIMEOUT;
 module_param(timeout, int, 0);
 MODULE_PARM_DESC(timeout, "Watchdog timeout value, in seconds (default="
-               WATCHDOG_TIMEOUT ")");
+               __MODULE_STRING(WATCHDOG_TIMEOUT) ")");
 
 static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
@@ -276,7 +276,7 @@ static int __devinit rc32434_wdt_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       wdt_reg = ioremap_nocache(r->start, r->end - r->start);
+       wdt_reg = ioremap_nocache(r->start, resource_size(r));
        if (!wdt_reg) {
                printk(KERN_ERR PFX "failed to remap I/O resources\n");
                return -ENXIO;
index bcc5357a906987147269ba9c020ba6ed642a9ec9..e777961939f3e6ed0354560c3e256247f6d24f66 100644 (file)
@@ -343,7 +343,7 @@ int __v9fs_fscache_release_page(struct page *page, gfp_t gfp)
 
        BUG_ON(!vcookie->fscache);
 
-       return fscache_maybe_release_page(vnode->cache, page, gfp);
+       return fscache_maybe_release_page(vcookie->fscache, page, gfp);
 }
 
 void __v9fs_fscache_invalidate_page(struct page *page)
index 1d8332563863ce5d858971a68f4a7463c72385c2..a6c8c6fe8df9ca5d54625a07496c8b2b42dd771f 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <linux/mount.h>
 #include <linux/file.h>
+#include <linux/ima.h>
 #include "internal.h"
 
 /*
@@ -922,6 +923,7 @@ int cachefiles_write_page(struct fscache_storage *op, struct page *page)
        if (IS_ERR(file)) {
                ret = PTR_ERR(file);
        } else {
+               ima_counts_get(file);
                ret = -EIO;
                if (file->f_op->write) {
                        pos = (loff_t) page->index << PAGE_SHIFT;
index 5035a26917392ea0ae5b5f133f9442740ff0b4cb..13337bf6c3f5de19b84068ba945463c0cbc9d028 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/timer.h>
 
 struct slow_work;
-#ifdef CONFIG_SLOW_WORK_PROC
+#ifdef CONFIG_SLOW_WORK_DEBUG
 struct seq_file;
 #endif
 
@@ -42,8 +42,8 @@ struct slow_work_ops {
        /* execute a work item */
        void (*execute)(struct slow_work *work);
 
-#ifdef CONFIG_SLOW_WORK_PROC
-       /* describe a work item for /proc */
+#ifdef CONFIG_SLOW_WORK_DEBUG
+       /* describe a work item for debugfs */
        void (*desc)(struct slow_work *work, struct seq_file *m);
 #endif
 };
@@ -64,7 +64,7 @@ struct slow_work {
 #define SLOW_WORK_DELAYED      5       /* item is struct delayed_slow_work with active timer */
        const struct slow_work_ops *ops; /* operations table for this item */
        struct list_head        link;   /* link in queue */
-#ifdef CONFIG_SLOW_WORK_PROC
+#ifdef CONFIG_SLOW_WORK_DEBUG
        struct timespec         mark;   /* jiffies at which queued or exec begun */
 #endif
 };
index ab5c64801fe50ab21dc3ae7db263f5f19a99ad56..eb4b33725db114984f4a967119a59e9892b225c3 100644 (file)
@@ -606,7 +606,7 @@ config SYSFS_DEPRECATED
        bool
 
 config SYSFS_DEPRECATED_V2
-       bool "remove sysfs features which may confuse old userspace tools"
+       bool "enable deprecated sysfs features which may confuse old userspace tools"
        depends on SYSFS
        default n
        select SYSFS_DEPRECATED
@@ -1098,12 +1098,12 @@ config SLOW_WORK
 
          See Documentation/slow-work.txt.
 
-config SLOW_WORK_PROC
-       bool "Slow work debugging through /proc"
+config SLOW_WORK_DEBUG
+       bool "Slow work debugging through debugfs"
        default n
-       depends on SLOW_WORK && PROC_FS
+       depends on SLOW_WORK && DEBUG_FS
        help
-         Display the contents of the slow work run queue through /proc,
+         Display the contents of the slow work run queue through debugfs,
          including items currently executing.
 
          See Documentation/slow-work.txt.
index 5988debfc505c84c8c5f7abeb0b5fb1e2d88f1fc..4051d75dd2d64e765b5d2856eac0da7fa796ef95 100644 (file)
@@ -251,7 +251,7 @@ early_param("loglevel", loglevel);
 
 /*
  * Unknown boot options get handed to init, unless they look like
- * failed parameters
+ * unused parameters (modprobe will find them in /proc/cmdline).
  */
 static int __init unknown_bootoption(char *param, char *val)
 {
@@ -272,14 +272,9 @@ static int __init unknown_bootoption(char *param, char *val)
        if (obsolete_checksetup(param))
                return 0;
 
-       /*
-        * Preemptive maintenance for "why didn't my misspelled command
-        * line work?"
-        */
-       if (strchr(param, '.') && (!val || strchr(param, '.') < val)) {
-               printk(KERN_ERR "Unknown boot option `%s': ignoring\n", param);
+       /* Unused module parameter. */
+       if (strchr(param, '.') && (!val || strchr(param, '.') < val))
                return 0;
-       }
 
        if (panic_later)
                return 0;
index 776ffed1556d188dc5737dc8ee15a884de274474..d7c13d249b2d7176e4f534cf5835ba7b65749cbb 100644 (file)
@@ -94,7 +94,7 @@ obj-$(CONFIG_X86_DS) += trace/
 obj-$(CONFIG_RING_BUFFER) += trace/
 obj-$(CONFIG_SMP) += sched_cpupri.o
 obj-$(CONFIG_SLOW_WORK) += slow-work.o
-obj-$(CONFIG_SLOW_WORK_PROC) += slow-work-proc.o
+obj-$(CONFIG_SLOW_WORK_DEBUG) += slow-work-debugfs.o
 obj-$(CONFIG_PERF_EVENTS) += perf_event.o
 
 ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)
index 8b7d8805819d07d998467db967c777c04021ec9e..5842a71cf0527163c960cc8c41d549a5033e3443 100644 (file)
@@ -1187,7 +1187,8 @@ static void add_sect_attrs(struct module *mod, unsigned int nsect,
 
        /* Count loaded sections and allocate structures */
        for (i = 0; i < nsect; i++)
-               if (sechdrs[i].sh_flags & SHF_ALLOC)
+               if (sechdrs[i].sh_flags & SHF_ALLOC
+                   && sechdrs[i].sh_size)
                        nloaded++;
        size[0] = ALIGN(sizeof(*sect_attrs)
                        + nloaded * sizeof(sect_attrs->attrs[0]),
@@ -1207,6 +1208,8 @@ static void add_sect_attrs(struct module *mod, unsigned int nsect,
        for (i = 0; i < nsect; i++) {
                if (! (sechdrs[i].sh_flags & SHF_ALLOC))
                        continue;
+               if (!sechdrs[i].sh_size)
+                       continue;
                sattr->address = sechdrs[i].sh_addr;
                sattr->name = kstrdup(secstrings + sechdrs[i].sh_name,
                                        GFP_KERNEL);
similarity index 97%
rename from kernel/slow-work-proc.c
rename to kernel/slow-work-debugfs.c
index 3988032571f5407f7ed1260cec98b0b95092732a..e45c436452983fcb44a82925b1ac3574532cf405 100644 (file)
@@ -57,7 +57,7 @@ static void slow_work_print_mark(struct seq_file *m, struct slow_work *work)
 }
 
 /*
- * Describe a slow work item for /proc
+ * Describe a slow work item for debugfs
  */
 static int slow_work_runqueue_show(struct seq_file *m, void *v)
 {
@@ -211,7 +211,7 @@ static const struct seq_operations slow_work_runqueue_ops = {
 };
 
 /*
- * open "/proc/slow_work_rq" to list queue contents
+ * open "/sys/kernel/debug/slow_work/runqueue" to list queue contents
  */
 static int slow_work_runqueue_open(struct inode *inode, struct file *file)
 {
index da94f3c101af77985272b72861bca34db1c853aa..00889bd3c5903812ed89d722135b15330b513dbb 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/kthread.h>
 #include <linux/freezer.h>
 #include <linux/wait.h>
-#include <linux/proc_fs.h>
+#include <linux/debugfs.h>
 #include "slow-work.h"
 
 static void slow_work_cull_timeout(unsigned long);
@@ -109,12 +109,36 @@ static struct module *slow_work_unreg_module;
 static struct slow_work *slow_work_unreg_work_item;
 static DECLARE_WAIT_QUEUE_HEAD(slow_work_unreg_wq);
 static DEFINE_MUTEX(slow_work_unreg_sync_lock);
+
+static void slow_work_set_thread_processing(int id, struct slow_work *work)
+{
+       if (work)
+               slow_work_thread_processing[id] = work->owner;
+}
+static void slow_work_done_thread_processing(int id, struct slow_work *work)
+{
+       struct module *module = slow_work_thread_processing[id];
+
+       slow_work_thread_processing[id] = NULL;
+       smp_mb();
+       if (slow_work_unreg_work_item == work ||
+           slow_work_unreg_module == module)
+               wake_up_all(&slow_work_unreg_wq);
+}
+static void slow_work_clear_thread_processing(int id)
+{
+       slow_work_thread_processing[id] = NULL;
+}
+#else
+static void slow_work_set_thread_processing(int id, struct slow_work *work) {}
+static void slow_work_done_thread_processing(int id, struct slow_work *work) {}
+static void slow_work_clear_thread_processing(int id) {}
 #endif
 
 /*
  * Data for tracking currently executing items for indication through /proc
  */
-#ifdef CONFIG_SLOW_WORK_PROC
+#ifdef CONFIG_SLOW_WORK_DEBUG
 struct slow_work *slow_work_execs[SLOW_WORK_THREAD_LIMIT];
 pid_t slow_work_pids[SLOW_WORK_THREAD_LIMIT];
 DEFINE_RWLOCK(slow_work_execs_lock);
@@ -197,9 +221,6 @@ static unsigned slow_work_calc_vsmax(void)
  */
 static noinline bool slow_work_execute(int id)
 {
-#ifdef CONFIG_MODULES
-       struct module *module;
-#endif
        struct slow_work *work = NULL;
        unsigned vsmax;
        bool very_slow;
@@ -236,10 +257,7 @@ static noinline bool slow_work_execute(int id)
                very_slow = false; /* avoid the compiler warning */
        }
 
-#ifdef CONFIG_MODULES
-       if (work)
-               slow_work_thread_processing[id] = work->owner;
-#endif
+       slow_work_set_thread_processing(id, work);
        if (work) {
                slow_work_mark_time(work);
                slow_work_begin_exec(id, work);
@@ -287,15 +305,7 @@ static noinline bool slow_work_execute(int id)
 
        /* sort out the race between module unloading and put_ref() */
        slow_work_put_ref(work);
-
-#ifdef CONFIG_MODULES
-       module = slow_work_thread_processing[id];
-       slow_work_thread_processing[id] = NULL;
-       smp_mb();
-       if (slow_work_unreg_work_item == work ||
-           slow_work_unreg_module == module)
-               wake_up_all(&slow_work_unreg_wq);
-#endif
+       slow_work_done_thread_processing(id, work);
 
        return true;
 
@@ -310,7 +320,7 @@ auto_requeue:
        else
                list_add_tail(&work->link, &slow_work_queue);
        spin_unlock_irq(&slow_work_queue_lock);
-       slow_work_thread_processing[id] = NULL;
+       slow_work_clear_thread_processing(id);
        return true;
 }
 
@@ -813,7 +823,7 @@ static void slow_work_new_thread_execute(struct slow_work *work)
 static const struct slow_work_ops slow_work_new_thread_ops = {
        .owner          = THIS_MODULE,
        .execute        = slow_work_new_thread_execute,
-#ifdef CONFIG_SLOW_WORK_PROC
+#ifdef CONFIG_SLOW_WORK_DEBUG
        .desc           = slow_work_new_thread_desc,
 #endif
 };
@@ -943,6 +953,7 @@ EXPORT_SYMBOL(slow_work_register_user);
  */
 static void slow_work_wait_for_items(struct module *module)
 {
+#ifdef CONFIG_MODULES
        DECLARE_WAITQUEUE(myself, current);
        struct slow_work *work;
        int loop;
@@ -989,6 +1000,7 @@ static void slow_work_wait_for_items(struct module *module)
 
        remove_wait_queue(&slow_work_unreg_wq, &myself);
        mutex_unlock(&slow_work_unreg_sync_lock);
+#endif /* CONFIG_MODULES */
 }
 
 /**
@@ -1043,9 +1055,15 @@ static int __init init_slow_work(void)
        if (slow_work_max_max_threads < nr_cpus * 2)
                slow_work_max_max_threads = nr_cpus * 2;
 #endif
-#ifdef CONFIG_SLOW_WORK_PROC
-       proc_create("slow_work_rq", S_IFREG | 0400, NULL,
-                   &slow_work_runqueue_fops);
+#ifdef CONFIG_SLOW_WORK_DEBUG
+       {
+               struct dentry *dbdir;
+
+               dbdir = debugfs_create_dir("slow_work", NULL);
+               if (dbdir && !IS_ERR(dbdir))
+                       debugfs_create_file("runqueue", S_IFREG | 0400, dbdir,
+                                           NULL, &slow_work_runqueue_fops);
+       }
 #endif
        return 0;
 }
index 3c2f007f3ad631ebd940742c68fa1f48b1a88461..321f3c59d7324f4100629b55111bb02b05c70161 100644 (file)
@@ -19,7 +19,7 @@
 /*
  * slow-work.c
  */
-#ifdef CONFIG_SLOW_WORK_PROC
+#ifdef CONFIG_SLOW_WORK_DEBUG
 extern struct slow_work *slow_work_execs[];
 extern pid_t slow_work_pids[];
 extern rwlock_t slow_work_execs_lock;
@@ -30,9 +30,9 @@ extern struct list_head vslow_work_queue;
 extern spinlock_t slow_work_queue_lock;
 
 /*
- * slow-work-proc.c
+ * slow-work-debugfs.c
  */
-#ifdef CONFIG_SLOW_WORK_PROC
+#ifdef CONFIG_SLOW_WORK_DEBUG
 extern const struct file_operations slow_work_runqueue_fops;
 
 extern void slow_work_new_thread_desc(struct slow_work *, struct seq_file *);