Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Oct 2010 16:25:11 +0000 (09:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Oct 2010 16:25:11 +0000 (09:25 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: (28 commits)
  net/9p: Return error on read with NULL buffer
  9p: Add datasync to client side TFSYNC/RFSYNC for dotl
  net/9p: Return error if we fail to encode protocol data
  fs/9p: Use generic_file_open with lookup_instantiate_filp
  fs/9p: Add missing iput in v9fs_vfs_lookup
  fs/9p: Use mknod 9p operation on create without open request
  net/9p: Add waitq to VirtIO transport.
  [net/9p]Serialize virtqueue operations to make VirtIO transport SMP safe.
  9p: Implement TREADLINK operation for 9p2000.L
  9p: Use V9FS_MAGIC in statfs
  9p: Implement TGETLOCK
  9p: Implement TLOCK
  [9p] Introduce client side TFSYNC/RFSYNC for dotl.
  [fs/9p] Add file_operations for cached mode in dotl protocol.
  fs/9p: Add access = client option to opt in acl evaluation.
  fs/9p: Implement create time inheritance
  fs/9p: Update ACL on chmod
  fs/9p: Implement setting posix acl
  fs/9p: Add xattr callbacks for POSIX ACL
  fs/9p: Implement POSIX ACL permission checking function
  ...

28 files changed:
arch/parisc/Kconfig
arch/parisc/include/asm/cache.h
arch/parisc/include/asm/cacheflush.h
arch/parisc/include/asm/irq.h
arch/parisc/include/asm/unistd.h
arch/parisc/kernel/irq.c
arch/parisc/kernel/pdc_cons.c
arch/parisc/kernel/syscall_table.S
arch/parisc/kernel/unaligned.c
arch/parisc/kernel/unwind.c
arch/parisc/math-emu/Makefile
drivers/block/aoe/aoeblk.c
drivers/block/aoe/aoedev.c
drivers/block/cciss.c
drivers/block/drbd/drbd_main.c
drivers/block/loop.c
drivers/block/z2ram.c
drivers/char/agp/parisc-agp.c
drivers/parisc/dino.c
drivers/parisc/eisa.c
drivers/parisc/gsc.c
drivers/parisc/iosapic.c
drivers/parisc/led.c
drivers/parisc/superio.c
drivers/power/Kconfig
include/linux/fs.h
include/linux/mmu_notifier.h
security/keys/process_keys.c

index 79a04a9..abde955 100644 (file)
@@ -19,6 +19,7 @@ config PARISC
        select HAVE_IRQ_WORK
        select HAVE_PERF_EVENTS
        select GENERIC_ATOMIC64 if !64BIT
+       select GENERIC_HARDIRQS_NO__DO_IRQ
        help
          The PA-RISC microprocessor is designed by Hewlett-Packard and used
          in many of their workstations & servers (HP9000 700 and 800 series,
@@ -85,6 +86,9 @@ config IRQ_PER_CPU
        bool
        default y
 
+config GENERIC_HARDIRQS_NO__DO_IRQ
+       def_bool y
+
 # unless you want to implement ACPI on PA-RISC ... ;-)
 config PM
        bool
index 039880e..47f11c7 100644 (file)
@@ -24,8 +24,6 @@
 
 #ifndef __ASSEMBLY__
 
-#define L1_CACHE_ALIGN(x)       (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
-
 #define SMP_CACHE_BYTES L1_CACHE_BYTES
 
 #define ARCH_DMA_MINALIGN      L1_CACHE_BYTES
index dba11ae..f388a85 100644 (file)
@@ -126,20 +126,20 @@ static inline void *kmap(struct page *page)
 
 #define kunmap(page)                   kunmap_parisc(page_address(page))
 
-static inline void *kmap_atomic(struct page *page, enum km_type idx)
+static inline void *__kmap_atomic(struct page *page)
 {
        pagefault_disable();
        return page_address(page);
 }
 
-static inline void kunmap_atomic_notypecheck(void *addr, enum km_type idx)
+static inline void __kunmap_atomic(void *addr)
 {
        kunmap_parisc(addr);
        pagefault_enable();
 }
 
-#define kmap_atomic_prot(page, idx, prot)      kmap_atomic(page, idx)
-#define kmap_atomic_pfn(pfn, idx)      kmap_atomic(pfn_to_page(pfn), (idx))
+#define kmap_atomic_prot(page, prot)   kmap_atomic(page)
+#define kmap_atomic_pfn(pfn)   kmap_atomic(pfn_to_page(pfn))
 #define kmap_atomic_to_page(ptr)       virt_to_page(ptr)
 #endif
 
index dfa26b6..c67dccf 100644 (file)
@@ -40,7 +40,7 @@ struct irq_chip;
 void no_ack_irq(unsigned int irq);
 void no_end_irq(unsigned int irq);
 void cpu_ack_irq(unsigned int irq);
-void cpu_end_irq(unsigned int irq);
+void cpu_eoi_irq(unsigned int irq);
 
 extern int txn_alloc_irq(unsigned int nbits);
 extern int txn_claim_irq(int);
index 1ce7d28..3eb82c2 100644 (file)
 #define __NR_perf_event_open   (__NR_Linux + 318)
 #define __NR_recvmmsg          (__NR_Linux + 319)
 #define __NR_accept4           (__NR_Linux + 320)
+#define __NR_prlimit64         (__NR_Linux + 321)
 
-#define __NR_Linux_syscalls    (__NR_accept4 + 1)
+#define __NR_Linux_syscalls    (__NR_prlimit64 + 1)
 
 
 #define __IGNORE_select                /* newselect */
index efbcee5..5024f64 100644 (file)
@@ -52,7 +52,7 @@ static volatile unsigned long cpu_eiem = 0;
 */
 static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;
 
-static void cpu_disable_irq(unsigned int irq)
+static void cpu_mask_irq(unsigned int irq)
 {
        unsigned long eirr_bit = EIEM_MASK(irq);
 
@@ -63,7 +63,7 @@ static void cpu_disable_irq(unsigned int irq)
         * then gets disabled */
 }
 
-static void cpu_enable_irq(unsigned int irq)
+static void cpu_unmask_irq(unsigned int irq)
 {
        unsigned long eirr_bit = EIEM_MASK(irq);
 
@@ -75,12 +75,6 @@ static void cpu_enable_irq(unsigned int irq)
        smp_send_all_nop();
 }
 
-static unsigned int cpu_startup_irq(unsigned int irq)
-{
-       cpu_enable_irq(irq);
-       return 0;
-}
-
 void no_ack_irq(unsigned int irq) { }
 void no_end_irq(unsigned int irq) { }
 
@@ -99,7 +93,7 @@ void cpu_ack_irq(unsigned int irq)
        mtctl(mask, 23);
 }
 
-void cpu_end_irq(unsigned int irq)
+void cpu_eoi_irq(unsigned int irq)
 {
        unsigned long mask = EIEM_MASK(irq);
        int cpu = smp_processor_id();
@@ -146,12 +140,10 @@ static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest)
 
 static struct irq_chip cpu_interrupt_type = {
        .name           = "CPU",
-       .startup        = cpu_startup_irq,
-       .shutdown       = cpu_disable_irq,
-       .enable         = cpu_enable_irq,
-       .disable        = cpu_disable_irq,
+       .mask           = cpu_mask_irq,
+       .unmask         = cpu_unmask_irq,
        .ack            = cpu_ack_irq,
-       .end            = cpu_end_irq,
+       .eoi            = cpu_eoi_irq,
 #ifdef CONFIG_SMP
        .set_affinity   = cpu_set_affinity_irq,
 #endif
@@ -247,10 +239,11 @@ int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data)
        if (irq_desc[irq].chip != &cpu_interrupt_type)
                return -EBUSY;
 
+       /* for iosapic interrupts */
        if (type) {
-               irq_desc[irq].chip = type;
-               irq_desc[irq].chip_data = data;
-               cpu_interrupt_type.enable(irq);
+               set_irq_chip_and_handler(irq, type, handle_level_irq);
+               set_irq_chip_data(irq, data);
+               cpu_unmask_irq(irq);
        }
        return 0;
 }
@@ -368,7 +361,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
                goto set_out;
        }
 #endif
-       __do_IRQ(irq);
+       generic_handle_irq(irq);
 
  out:
        irq_exit();
@@ -398,14 +391,15 @@ static void claim_cpu_irqs(void)
 {
        int i;
        for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) {
-               irq_desc[i].chip = &cpu_interrupt_type;
+               set_irq_chip_and_handler(i, &cpu_interrupt_type,
+                       handle_level_irq);
        }
 
-       irq_desc[TIMER_IRQ].action = &timer_action;
-       irq_desc[TIMER_IRQ].status = IRQ_PER_CPU;
+       set_irq_handler(TIMER_IRQ, handle_percpu_irq);
+       setup_irq(TIMER_IRQ, &timer_action);
 #ifdef CONFIG_SMP
-       irq_desc[IPI_IRQ].action = &ipi_action;
-       irq_desc[IPI_IRQ].status = IRQ_PER_CPU;
+       set_irq_handler(IPI_IRQ, handle_percpu_irq);
+       setup_irq(IPI_IRQ, &ipi_action);
 #endif
 }
 
@@ -423,3 +417,4 @@ void __init init_IRQ(void)
         set_eiem(cpu_eiem);    /* EIEM : enable all external intr */
 
 }
+
index 1ff366c..66d1f17 100644 (file)
@@ -12,6 +12,7 @@
  *    Copyright (C) 2001 Helge Deller <deller at parisc-linux.org>
  *    Copyright (C) 2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org>
  *    Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
+ *    Copyright (C) 2010 Guy Martin <gmsoft at tuxicoman.be>
  *
  *
  *    This program is free software; you can redistribute it and/or modify
 
 /*
  *  The PDC console is a simple console, which can be used for debugging 
- *  boot related problems on HP PA-RISC machines.
+ *  boot related problems on HP PA-RISC machines. It is also useful when no
+ *  other console works.
  *
  *  This code uses the ROM (=PDC) based functions to read and write characters
  *  from and to PDC's boot path.
- *  Since all character read from that path must be polled, this code never
- *  can or will be a fully functional linux console.
  */
 
 /* Define EARLY_BOOTUP_DEBUG to debug kernel related boot problems. 
@@ -53,6 +53,7 @@
 #include <asm/pdc.h>           /* for iodc_call() proto and friends */
 
 static DEFINE_SPINLOCK(pdc_console_lock);
+static struct console pdc_cons;
 
 static void pdc_console_write(struct console *co, const char *s, unsigned count)
 {
@@ -85,12 +86,138 @@ static int pdc_console_setup(struct console *co, char *options)
 
 #if defined(CONFIG_PDC_CONSOLE)
 #include <linux/vt_kern.h>
+#include <linux/tty_flip.h>
+
+#define PDC_CONS_POLL_DELAY (30 * HZ / 1000)
+
+static struct timer_list pdc_console_timer;
+
+extern struct console * console_drivers;
+
+static int pdc_console_tty_open(struct tty_struct *tty, struct file *filp)
+{
+
+       mod_timer(&pdc_console_timer, jiffies + PDC_CONS_POLL_DELAY);
+
+       return 0;
+}
+
+static void pdc_console_tty_close(struct tty_struct *tty, struct file *filp)
+{
+       if (!tty->count)
+               del_timer(&pdc_console_timer);
+}
+
+static int pdc_console_tty_write(struct tty_struct *tty, const unsigned char *buf, int count)
+{
+       pdc_console_write(NULL, buf, count);
+       return count;
+}
+
+static int pdc_console_tty_write_room(struct tty_struct *tty)
+{
+       return 32768; /* no limit, no buffer used */
+}
+
+static int pdc_console_tty_chars_in_buffer(struct tty_struct *tty)
+{
+       return 0; /* no buffer */
+}
+
+static struct tty_driver *pdc_console_tty_driver;
+
+static const struct tty_operations pdc_console_tty_ops = {
+       .open = pdc_console_tty_open,
+       .close = pdc_console_tty_close,
+       .write = pdc_console_tty_write,
+       .write_room = pdc_console_tty_write_room,
+       .chars_in_buffer = pdc_console_tty_chars_in_buffer,
+};
+
+static void pdc_console_poll(unsigned long unused)
+{
+
+       int data, count = 0;
+
+       struct tty_struct *tty = pdc_console_tty_driver->ttys[0];
+
+       if (!tty)
+               return;
+
+       while (1) {
+               data = pdc_console_poll_key(NULL);
+               if (data == -1)
+                       break;
+               tty_insert_flip_char(tty, data & 0xFF, TTY_NORMAL);
+               count ++;
+       }
+
+       if (count)
+               tty_flip_buffer_push(tty);
+
+       if (tty->count && (pdc_cons.flags & CON_ENABLED))
+               mod_timer(&pdc_console_timer, jiffies + PDC_CONS_POLL_DELAY);
+}
+
+static int __init pdc_console_tty_driver_init(void)
+{
+
+       int err;
+       struct tty_driver *drv;
+
+       /* Check if the console driver is still registered.
+        * It is unregistered if the pdc console was not selected as the
+        * primary console. */
+
+       struct console *tmp = console_drivers;
+
+       for (tmp = console_drivers; tmp; tmp = tmp->next)
+               if (tmp == &pdc_cons)
+                       break;
+
+       if (!tmp) {
+               printk(KERN_INFO "PDC console driver not registered anymore, not creating %s\n", pdc_cons.name);
+               return -ENODEV;
+       }
+
+       printk(KERN_INFO "The PDC console driver is still registered, removing CON_BOOT flag\n");
+       pdc_cons.flags &= ~CON_BOOT;
+
+       drv = alloc_tty_driver(1);
+
+       if (!drv)
+               return -ENOMEM;
+
+       drv->driver_name = "pdc_cons";
+       drv->name = "ttyB";
+       drv->major = MUX_MAJOR;
+       drv->minor_start = 0;
+       drv->type = TTY_DRIVER_TYPE_SYSTEM;
+       drv->init_termios = tty_std_termios;
+       drv->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS;
+       tty_set_operations(drv, &pdc_console_tty_ops);
+
+       err = tty_register_driver(drv);
+       if (err) {
+               printk(KERN_ERR "Unable to register the PDC console TTY driver\n");
+               return err;
+       }
+
+       pdc_console_tty_driver = drv;
+
+       /* No need to initialize the pdc_console_timer if tty isn't allocated */
+       init_timer(&pdc_console_timer);
+       pdc_console_timer.function = pdc_console_poll;
+
+       return 0;
+}
+
+module_init(pdc_console_tty_driver_init);
 
 static struct tty_driver * pdc_console_device (struct console *c, int *index)
 {
-       extern struct tty_driver console_driver;
-       *index = c->index ? c->index-1 : fg_console;
-       return &console_driver;
+       *index = c->index;
+       return pdc_console_tty_driver;
 }
 #else
 #define pdc_console_device NULL
@@ -101,7 +228,7 @@ static struct console pdc_cons = {
        .write =        pdc_console_write,
        .device =       pdc_console_device,
        .setup =        pdc_console_setup,
-       .flags =        CON_BOOT | CON_PRINTBUFFER | CON_ENABLED,
+       .flags =        CON_BOOT | CON_PRINTBUFFER,
        .index =        -1,
 };
 
index 3d52c97..74867df 100644 (file)
        ENTRY_SAME(perf_event_open)
        ENTRY_COMP(recvmmsg)
        ENTRY_SAME(accept4)             /* 320 */
+       ENTRY_SAME(prlimit64)
 
        /* Nothing yet */
 
index 92d977b..234e368 100644 (file)
@@ -619,15 +619,12 @@ void handle_unaligned(struct pt_regs *regs)
                flop=1;
                ret = emulate_std(regs, R2(regs->iir),1);
                break;
-
-#ifdef CONFIG_PA20
        case OPCODE_LDD_L:
                ret = emulate_ldd(regs, R2(regs->iir),0);
                break;
        case OPCODE_STD_L:
                ret = emulate_std(regs, R2(regs->iir),0);
                break;
-#endif
        }
 #endif
        switch (regs->iir & OPCODE3_MASK)
index d58eac1..76ed62e 100644 (file)
@@ -80,8 +80,11 @@ find_unwind_entry(unsigned long addr)
                        if (addr >= table->start && 
                            addr <= table->end)
                                e = find_unwind_entry_in_table(table, addr);
-                       if (e)
+                       if (e) {
+                               /* Move-to-front to exploit common traces */
+                               list_move(&table->list, &unwind_tables);
                                break;
+                       }
                }
 
        return e;
index 1f3f225..0bd63b0 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 # See arch/parisc/math-emu/README
-EXTRA_CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \
+ccflags-y := -Wno-parentheses -Wno-implicit-function-declaration \
        -Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \
        -Wno-implicit-int
 
index f21c237..541e188 100644 (file)
@@ -4,12 +4,14 @@
  * block device routines
  */
 
+#include <linux/kernel.h>
 #include <linux/hdreg.h>
 #include <linux/blkdev.h>
 #include <linux/backing-dev.h>
 #include <linux/fs.h>
 #include <linux/ioctl.h>
 #include <linux/slab.h>
+#include <linux/ratelimit.h>
 #include <linux/genhd.h>
 #include <linux/netdevice.h>
 #include <linux/mutex.h>
@@ -207,7 +209,7 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio)
        spin_lock_irqsave(&d->lock, flags);
 
        if ((d->flags & DEVFL_UP) == 0) {
-               printk(KERN_INFO "aoe: device %ld.%d is not up\n",
+               pr_info_ratelimited("aoe: device %ld.%d is not up\n",
                        d->aoemajor, d->aoeminor);
                spin_unlock_irqrestore(&d->lock, flags);
                mempool_free(buf, d->bufpool);
index 0849280..6b5110a 100644 (file)
@@ -102,6 +102,7 @@ aoedev_freedev(struct aoedev *d)
 {
        struct aoetgt **t, **e;
 
+       cancel_work_sync(&d->work);
        if (d->gd) {
                aoedisk_rm_sysfs(d);
                del_gendisk(d->gd);
@@ -135,7 +136,6 @@ aoedev_flush(const char __user *str, size_t cnt)
                all = !strncmp(buf, "all", 3);
        }
 
-       flush_scheduled_work();
        spin_lock_irqsave(&devlist_lock, flags);
        dd = &devlist;
        while ((d = *dd)) {
@@ -257,8 +257,6 @@ aoedev_exit(void)
        struct aoedev *d;
        ulong flags;
 
-       flush_scheduled_work();
-
        while ((d = devlist)) {
                devlist = d->next;
 
index f09e6df..2cc4dda 100644 (file)
@@ -66,11 +66,6 @@ MODULE_VERSION("3.6.26");
 MODULE_LICENSE("GPL");
 
 static DEFINE_MUTEX(cciss_mutex);
-static int cciss_allow_hpsa;
-module_param(cciss_allow_hpsa, int, S_IRUGO|S_IWUSR);
-MODULE_PARM_DESC(cciss_allow_hpsa,
-       "Prevent cciss driver from accessing hardware known to be "
-       " supported by the hpsa driver");
 
 #include "cciss_cmd.h"
 #include "cciss.h"
@@ -98,19 +93,6 @@ static const struct pci_device_id cciss_pci_device_id[] = {
        {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSD,     0x103C, 0x3215},
        {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSC,     0x103C, 0x3237},
        {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSC,     0x103C, 0x323D},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSE,     0x103C, 0x3241},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSE,     0x103C, 0x3243},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSE,     0x103C, 0x3245},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSE,     0x103C, 0x3247},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSE,     0x103C, 0x3249},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSE,     0x103C, 0x324A},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSE,     0x103C, 0x324B},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSF,     0x103C, 0x3350},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSF,     0x103C, 0x3351},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSF,     0x103C, 0x3352},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSF,     0x103C, 0x3353},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSF,     0x103C, 0x3354},
-       {PCI_VENDOR_ID_HP,     PCI_DEVICE_ID_HP_CISSF,     0x103C, 0x3355},
        {0,}
 };
 
@@ -138,24 +120,9 @@ static struct board_type products[] = {
        {0x3214103C, "Smart Array E200i", &SA5_access},
        {0x3215103C, "Smart Array E200i", &SA5_access},
        {0x3237103C, "Smart Array E500", &SA5_access},
-/* controllers below this line are also supported by the hpsa driver. */
-#define HPSA_BOUNDARY 0x3223103C
        {0x3223103C, "Smart Array P800", &SA5_access},
        {0x3234103C, "Smart Array P400", &SA5_access},
        {0x323D103C, "Smart Array P700m", &SA5_access},
-       {0x3241103C, "Smart Array P212", &SA5_access},
-       {0x3243103C, "Smart Array P410", &SA5_access},
-       {0x3245103C, "Smart Array P410i", &SA5_access},
-       {0x3247103C, "Smart Array P411", &SA5_access},
-       {0x3249103C, "Smart Array P812", &SA5_access},
-       {0x324A103C, "Smart Array P712m", &SA5_access},
-       {0x324B103C, "Smart Array P711m", &SA5_access},
-       {0x3350103C, "Smart Array", &SA5_access},
-       {0x3351103C, "Smart Array", &SA5_access},
-       {0x3352103C, "Smart Array", &SA5_access},
-       {0x3353103C, "Smart Array", &SA5_access},
-       {0x3354103C, "Smart Array", &SA5_access},
-       {0x3355103C, "Smart Array", &SA5_access},
 };
 
 /* How long to wait (in milliseconds) for board to go into simple mode */
@@ -1184,6 +1151,7 @@ static int cciss_ioctl32_big_passthru(struct block_device *bdev, fmode_t mode,
        int err;
        u32 cp;
 
+       memset(&arg64, 0, sizeof(arg64));
        err = 0;
        err |=
            copy_from_user(&arg64.LUN_info, &arg32->LUN_info,
@@ -3970,9 +3938,6 @@ static int __devinit cciss_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
                        subsystem_vendor_id;
 
        for (i = 0; i < ARRAY_SIZE(products); i++) {
-               /* Stand aside for hpsa driver on request */
-               if (cciss_allow_hpsa && products[i].board_id == HPSA_BOUNDARY)
-                       return -ENODEV;
                if (*board_id == products[i].board_id)
                        return i;
        }
index c5dfe64..25c7a73 100644 (file)
@@ -2982,7 +2982,7 @@ static int drbd_create_mempools(void)
 
        drbd_ee_mempool = mempool_create(number,
                mempool_alloc_slab, mempool_free_slab, drbd_ee_cache);
-       if (drbd_request_mempool == NULL)
+       if (drbd_ee_mempool == NULL)
                goto Enomem;
 
        /* drbd's page pool */
index 450c958..1e5284e 100644 (file)
@@ -1049,9 +1049,9 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev)
        if (bdev)
                invalidate_bdev(bdev);
        set_capacity(lo->lo_disk, 0);
+       loop_sysfs_exit(lo);
        if (bdev) {
                bd_set_size(bdev, 0);
-               loop_sysfs_exit(lo);
                /* let user-space know about this change */
                kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, KOBJ_CHANGE);
        }
index dcd4cfc..a22e3f8 100644 (file)
@@ -80,8 +80,10 @@ static void do_z2_request(struct request_queue *q)
                int err = 0;
 
                if (start + len > z2ram_size) {
-                       printk( KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n",
-                               blk_rq_pos(req), blk_rq_cur_sectors(req));
+                       pr_err(DEVICE_NAME ": bad access: block=%llu, "
+                              "count=%u\n",
+                              (unsigned long long)blk_rq_pos(req),
+                              blk_rq_cur_sectors(req));
                        err = -EIO;
                        goto done;
                }
index 1c12921..17e380f 100644 (file)
@@ -358,8 +358,12 @@ parisc_agp_setup(void __iomem *ioc_hpa, void __iomem *lba_hpa)
        bridge->dev = fake_bridge_dev;
 
        error = agp_add_bridge(bridge);
+       if (error)
+               goto fail;
+       return 0;
 
 fail:
+       kfree(fake_bridge_dev);
        return error;
 }
 
index c542c7b..d9f5148 100644 (file)
@@ -296,10 +296,9 @@ static struct pci_port_ops dino_port_ops = {
        .outl   = dino_out32
 };
 
-static void dino_disable_irq(unsigned int irq)
+static void dino_mask_irq(unsigned int irq)
 {
-       struct irq_desc *desc = irq_to_desc(irq);
-       struct dino_device *dino_dev = desc->chip_data;
+       struct dino_device *dino_dev = get_irq_chip_data(irq);
        int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
 
        DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq);
@@ -309,10 +308,9 @@ static void dino_disable_irq(unsigned int irq)
        __raw_writel(dino_dev->imr, dino_dev->hba.base_addr+DINO_IMR);
 }
 
-static void dino_enable_irq(unsigned int irq)
+static void dino_unmask_irq(unsigned int irq)
 {
-       struct irq_desc *desc = irq_to_desc(irq);
-       struct dino_device *dino_dev = desc->chip_data;
+       struct dino_device *dino_dev = get_irq_chip_data(irq);
        int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
        u32 tmp;
 
@@ -347,20 +345,11 @@ static void dino_enable_irq(unsigned int irq)
        }
 }
 
-static unsigned int dino_startup_irq(unsigned int irq)
-{
-       dino_enable_irq(irq);
-       return 0;
-}
-
 static struct irq_chip dino_interrupt_type = {
-       .name           = "GSC-PCI",
-       .startup        = dino_startup_irq,
-       .shutdown       = dino_disable_irq,
-       .enable         = dino_enable_irq, 
-       .disable        = dino_disable_irq,
-       .ack            = no_ack_irq,
-       .end            = no_end_irq,
+       .name   = "GSC-PCI",
+       .unmask = dino_unmask_irq,
+       .mask   = dino_mask_irq,
+       .ack    = no_ack_irq,
 };
 
 
@@ -391,7 +380,7 @@ ilr_again:
                int irq = dino_dev->global_irq[local_irq];
                DBG(KERN_DEBUG "%s(%d, %p) mask 0x%x\n",
                        __func__, irq, intr_dev, mask);
-               __do_IRQ(irq);
+               generic_handle_irq(irq);
                mask &= ~(1 << local_irq);
        } while (mask);
 
index 46f503f..1211974 100644 (file)
@@ -144,7 +144,7 @@ static unsigned int eisa_irq_level __read_mostly; /* default to edge triggered *
 
 
 /* called by free irq */
-static void eisa_disable_irq(unsigned int irq)
+static void eisa_mask_irq(unsigned int irq)
 {
        unsigned long flags;
 
@@ -164,7 +164,7 @@ static void eisa_disable_irq(unsigned int irq)
 }
 
 /* called by request irq */
-static void eisa_enable_irq(unsigned int irq)
+static void eisa_unmask_irq(unsigned int irq)
 {
        unsigned long flags;
        EISA_DBG("enable irq %d\n", irq);
@@ -182,20 +182,11 @@ static void eisa_enable_irq(unsigned int irq)
        EISA_DBG("pic1 mask %02x\n", eisa_in8(0xa1));
 }
 
-static unsigned int eisa_startup_irq(unsigned int irq)
-{
-       eisa_enable_irq(irq);
-       return 0;
-}
-
 static struct irq_chip eisa_interrupt_type = {
-       .name    =      "EISA",
-       .startup =      eisa_startup_irq,
-       .shutdown =     eisa_disable_irq,
-       .enable =       eisa_enable_irq,
-       .disable =      eisa_disable_irq,
-       .ack =          no_ack_irq,
-       .end =          no_end_irq,
+       .name   =       "EISA",
+       .unmask =       eisa_unmask_irq,
+       .mask   =       eisa_mask_irq,
+       .ack    =       no_ack_irq,
 };
 
 static irqreturn_t eisa_irq(int wax_irq, void *intr_dev)
@@ -233,7 +224,7 @@ static irqreturn_t eisa_irq(int wax_irq, void *intr_dev)
        }
        spin_unlock_irqrestore(&eisa_irq_lock, flags);
 
-       __do_IRQ(irq);
+       generic_handle_irq(irq);
    
        spin_lock_irqsave(&eisa_irq_lock, flags);
        /* unmask */
@@ -346,10 +337,10 @@ static int __init eisa_probe(struct parisc_device *dev)
        }
        
        /* Reserve IRQ2 */
-       irq_to_desc(2)->action = &irq2_action;
-       
+       setup_irq(2, &irq2_action);
        for (i = 0; i < 16; i++) {
-               irq_to_desc(i)->chip = &eisa_interrupt_type;
+               set_irq_chip_and_handler(i, &eisa_interrupt_type,
+                       handle_level_irq);
        }
        
        EISA_bus = 1;
index 20a1bce..e605298 100644 (file)
@@ -86,7 +86,7 @@ irqreturn_t gsc_asic_intr(int gsc_asic_irq, void *dev)
        do {
                int local_irq = __ffs(irr);
                unsigned int irq = gsc_asic->global_irq[local_irq];
-               __do_IRQ(irq);
+               generic_handle_irq(irq);
                irr &= ~(1 << local_irq);
        } while (irr);
 
@@ -105,10 +105,9 @@ int gsc_find_local_irq(unsigned int irq, int *global_irqs, int limit)
        return NO_IRQ;
 }
 
-static void gsc_asic_disable_irq(unsigned int irq)
+static void gsc_asic_mask_irq(unsigned int irq)
 {
-       struct irq_desc *desc = irq_to_desc(irq);
-       struct gsc_asic *irq_dev = desc->chip_data;
+       struct gsc_asic *irq_dev = get_irq_chip_data(irq);
        int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
        u32 imr;
 
@@ -121,10 +120,9 @@ static void gsc_asic_disable_irq(unsigned int irq)
        gsc_writel(imr, irq_dev->hpa + OFFSET_IMR);
 }
 
-static void gsc_asic_enable_irq(unsigned int irq)
+static void gsc_asic_unmask_irq(unsigned int irq)
 {
-       struct irq_desc *desc = irq_to_desc(irq);
-       struct gsc_asic *irq_dev = desc->chip_data;
+       struct gsc_asic *irq_dev = get_irq_chip_data(irq);
        int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
        u32 imr;
 
@@ -141,33 +139,23 @@ static void gsc_asic_enable_irq(unsigned int irq)
         */
 }
 
-static unsigned int gsc_asic_startup_irq(unsigned int irq)
-{
-       gsc_asic_enable_irq(irq);
-       return 0;
-}
-
 static struct irq_chip gsc_asic_interrupt_type = {
-       .name    =      "GSC-ASIC",
-       .startup =      gsc_asic_startup_irq,
-       .shutdown =     gsc_asic_disable_irq,
-       .enable =       gsc_asic_enable_irq,
-       .disable =      gsc_asic_disable_irq,
-       .ack =          no_ack_irq,
-       .end =          no_end_irq,
+       .name   =       "GSC-ASIC",
+       .unmask =       gsc_asic_unmask_irq,
+       .mask   =       gsc_asic_mask_irq,
+       .ack    =       no_ack_irq,
 };
 
 int gsc_assign_irq(struct irq_chip *type, void *data)
 {
        static int irq = GSC_IRQ_BASE;
-       struct irq_desc *desc;
 
        if (irq > GSC_IRQ_MAX)
                return NO_IRQ;
 
-       desc = irq_to_desc(irq);
-       desc->chip = type;
-       desc->chip_data = data;
+       set_irq_chip_and_handler(irq, type, handle_level_irq);
+       set_irq_chip_data(irq, data);
+
        return irq++;
 }
 
index c768367..a3120a0 100644 (file)
@@ -615,17 +615,10 @@ iosapic_set_irt_data( struct vector_info *vi, u32 *dp0, u32 *dp1)
 }
 
 
-static struct vector_info *iosapic_get_vector(unsigned int irq)
-{
-       struct irq_desc *desc = irq_to_desc(irq);
-
-       return desc->chip_data;
-}
-
-static void iosapic_disable_irq(unsigned int irq)
+static void iosapic_mask_irq(unsigned int irq)
 {
        unsigned long flags;
-       struct vector_info *vi = iosapic_get_vector(irq);
+       struct vector_info *vi = get_irq_chip_data(irq);
        u32 d0, d1;
 
        spin_lock_irqsave(&iosapic_lock, flags);
@@ -635,9 +628,9 @@ static void iosapic_disable_irq(unsigned int irq)
        spin_unlock_irqrestore(&iosapic_lock, flags);
 }
 
-static void iosapic_enable_irq(unsigned int irq)
+static void iosapic_unmask_irq(unsigned int irq)
 {
-       struct vector_info *vi = iosapic_get_vector(irq);
+       struct vector_info *vi = get_irq_chip_data(irq);
        u32 d0, d1;
 
        /* data is initialized by fixup_irq */
@@ -676,36 +669,14 @@ printk("\n");
        DBG(KERN_DEBUG "enable_irq(%d): eoi(%p, 0x%x)\n", irq,
                        vi->eoi_addr, vi->eoi_data);
        iosapic_eoi(vi->eoi_addr, vi->eoi_data);
-}
-
-/*
- * PARISC only supports PCI devices below I/O SAPIC.
- * PCI only supports level triggered in order to share IRQ lines.
- * ergo I/O SAPIC must always issue EOI on parisc.
- *
- * i386/ia64 support ISA devices and have to deal with
- * edge-triggered interrupts too.
- */
-static void iosapic_end_irq(unsigned int irq)
-{
-       struct vector_info *vi = iosapic_get_vector(irq);
-       DBG(KERN_DEBUG "end_irq(%d): eoi(%p, 0x%x)\n", irq,
-                       vi->eoi_addr, vi->eoi_data);
-       iosapic_eoi(vi->eoi_addr, vi->eoi_data);
-       cpu_end_irq(irq);
-}
-
-static unsigned int iosapic_startup_irq(unsigned int irq)
-{
-       iosapic_enable_irq(irq);
-       return 0;
+       cpu_eoi_irq(irq);
 }
 
 #ifdef CONFIG_SMP
 static int iosapic_set_affinity_irq(unsigned int irq,
                                     const struct cpumask *dest)
 {
-       struct vector_info *vi = iosapic_get_vector(irq);
+       struct vector_info *vi = get_irq_chip_data(irq);
        u32 d0, d1, dummy_d0;
        unsigned long flags;
        int dest_cpu;
@@ -730,13 +701,10 @@ static int iosapic_set_affinity_irq(unsigned int irq,
 #endif
 
 static struct irq_chip iosapic_interrupt_type = {
-       .name    =      "IO-SAPIC-level",
-       .startup =      iosapic_startup_irq,
-       .shutdown =     iosapic_disable_irq,
-       .enable =       iosapic_enable_irq,
-       .disable =      iosapic_disable_irq,
-       .ack =          cpu_ack_irq,
-       .end =          iosapic_end_irq,
+       .name   =       "IO-SAPIC-level",
+       .unmask =       iosapic_unmask_irq,
+       .mask   =       iosapic_mask_irq,
+       .ack    =       cpu_ack_irq,
 #ifdef CONFIG_SMP
        .set_affinity = iosapic_set_affinity_irq,
 #endif
@@ -891,8 +859,8 @@ void *iosapic_register(unsigned long hpa)
        isi->isi_version = iosapic_rd_version(isi);
        isi->isi_num_vectors = IOSAPIC_IRDT_MAX_ENTRY(isi->isi_version) + 1;
 
-       vip = isi->isi_vector = (struct vector_info *)
-               kzalloc(sizeof(struct vector_info) * isi->isi_num_vectors, GFP_KERNEL);
+       vip = isi->isi_vector = kcalloc(isi->isi_num_vectors,
+                                       sizeof(struct vector_info), GFP_KERNEL);
        if (vip == NULL) {
                kfree(isi);
                return NULL;
index c5c14dd..2350e8a 100644 (file)
@@ -346,8 +346,8 @@ static __inline__ int led_get_net_activity(void)
 #ifndef CONFIG_NET
        return 0;
 #else
-       static unsigned long rx_total_last, tx_total_last;
-       unsigned long rx_total, tx_total;
+       static u64 rx_total_last, tx_total_last;
+       u64 rx_total, tx_total;
        struct net_device *dev;
        int retval;
 
@@ -356,7 +356,7 @@ static __inline__ int led_get_net_activity(void)
        /* we are running as a workqueue task, so we can use an RCU lookup */
        rcu_read_lock();
        for_each_netdev_rcu(&init_net, dev) {
-           const struct net_device_stats *stats;
+           const struct rtnl_link_stats64 *stats;
            struct rtnl_link_stats64 temp;
            struct in_device *in_dev = __in_dev_get_rcu(dev);
            if (!in_dev || !in_dev->ifa_list)
index f7806d8..0846daf 100644 (file)
@@ -139,7 +139,7 @@ superio_interrupt(int parent_irq, void *devp)
        }
 
        /* Call the appropriate device's interrupt */
-       __do_IRQ(local_irq);
+       generic_handle_irq(local_irq);
 
        /* set EOI - forces a new interrupt if a lower priority device
         * still needs service.
@@ -286,7 +286,7 @@ superio_init(struct pci_dev *pcidev)
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO, superio_init);
 
-static void superio_disable_irq(unsigned int irq)
+static void superio_mask_irq(unsigned int irq)
 {
        u8 r8;
 
@@ -303,7 +303,7 @@ static void superio_disable_irq(unsigned int irq)
        outb (r8,IC_PIC1+1);
 }
 
-static void superio_enable_irq(unsigned int irq)
+static void superio_unmask_irq(unsigned int irq)
 {
        u8 r8;
 
@@ -319,20 +319,11 @@ static void superio_enable_irq(unsigned int irq)
        outb (r8,IC_PIC1+1);
 }
 
-static unsigned int superio_startup_irq(unsigned int irq)
-{
-       superio_enable_irq(irq);
-       return 0;
-}
-
 static struct irq_chip superio_interrupt_type = {
-       .name    =      SUPERIO,
-       .startup =      superio_startup_irq,
-       .shutdown =     superio_disable_irq,
-       .enable =       superio_enable_irq,
-       .disable =      superio_disable_irq,
+       .name   =       SUPERIO,
+       .unmask =       superio_unmask_irq,
+       .mask   =       superio_mask_irq,
        .ack =          no_ack_irq,
-       .end =          no_end_irq,
 };
 
 #ifdef DEBUG_SUPERIO_INIT
@@ -363,9 +354,7 @@ int superio_fixup_irq(struct pci_dev *pcidev)
 #endif
 
        for (i = 0; i < 16; i++) {
-               struct irq_desc *desc = irq_to_desc(i);
-
-               desc->chip = &superio_interrupt_type;
+               set_irq_chip_and_handler(i, &superio_interrupt_type, handle_level_irq);
        }
 
        /*
index 60d83d9..ec44477 100644 (file)
@@ -182,6 +182,7 @@ config CHARGER_ISP1704
 config CHARGER_TWL4030
        tristate "OMAP TWL4030 BCI charger driver"
        depends on TWL4030_CORE
+       depends on BROKEN
        help
          Say Y here to enable support for TWL4030 Battery Charge Interface.
 
index 6ed7ace..1c73b50 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/limits.h>
 #include <linux/ioctl.h>
 #include <linux/blk_types.h>
+#include <linux/types.h>
 
 /*
  * It's silly to have NR_OPEN bigger than NR_FILE, but you can change
index 4e02ee2..43dcfbd 100644 (file)
@@ -227,7 +227,7 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm)
 
 /*
  * These two macros will sometime replace ptep_clear_flush.
- * ptep_clear_flush is impleemnted as macro itself, so this also is
+ * ptep_clear_flush is implemented as macro itself, so this also is
  * implemented as a macro until ptep_clear_flush will converted to an
  * inline function, to diminish the risk of compilation failure. The
  * invalidate_page method over time can be moved outside the PT lock
index f8e7251..504bdd2 100644 (file)
@@ -207,7 +207,7 @@ static int install_process_keyring(void)
        ret = install_process_keyring_to_cred(new);
        if (ret < 0) {
                abort_creds(new);
-               return ret != -EEXIST ?: 0;
+               return ret != -EEXIST ? ret : 0;
        }
 
        return commit_creds(new);