]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 10 Dec 2008 18:02:17 +0000 (10:02 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 10 Dec 2008 18:02:17 +0000 (10:02 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: fw-ohci: fix IOMMU resource exhaustion
  ieee1394: node manager causes up to ~3.25s delay in freezing tasks

22 files changed:
arch/um/drivers/mconsole_kern.c
drivers/rtc/rtc-ds1672.c
drivers/rtc/rtc-max6900.c
drivers/rtc/rtc-twl4030.c
drivers/serial/s3c2440.c
drivers/video/console/fbcon.c
drivers/video/mb862xx/mb862xxfb.c
fs/ext4/balloc.c
fs/inotify.c
fs/proc/base.c
fs/proc/task_mmu.c
include/asm-generic/atomic.h
include/linux/ftrace.h
kernel/latencytop.c
kernel/relay.c
lib/percpu_counter.c
mm/backing-dev.c
mm/migrate.c
mm/page_cgroup.c
mm/slub.c
mm/swap.c
mm/vmalloc.c

index 19d579d74d27f18ae67bb1b5c9adcf93f963a288..8f44ebb0dec82286e85838369d8fdfd9de929ae6 100644 (file)
@@ -16,6 +16,8 @@
 #include <linux/slab.h>
 #include <linux/syscalls.h>
 #include <linux/utsname.h>
+#include <linux/socket.h>
+#include <linux/un.h>
 #include <linux/workqueue.h>
 #include <linux/mutex.h>
 #include <asm/uaccess.h>
@@ -785,7 +787,7 @@ static int __init mconsole_init(void)
        /* long to avoid size mismatch warnings from gcc */
        long sock;
        int err;
-       char file[256];
+       char file[UNIX_PATH_MAX];
 
        if (umid_file_name("mconsole", file, sizeof(file)))
                return -1;
index 341d7a5b45a28c3ecab9de39f9c0e515e5ac4331..4e91419e8911c50bcfbc18aa1d536e88c41178c0 100644 (file)
@@ -209,12 +209,18 @@ static int ds1672_probe(struct i2c_client *client,
        return err;
 }
 
+static struct i2c_device_id ds1672_id[] = {
+       { "ds1672", 0 },
+       { }
+};
+
 static struct i2c_driver ds1672_driver = {
        .driver = {
                   .name = "rtc-ds1672",
                   },
        .probe = &ds1672_probe,
        .remove = &ds1672_remove,
+       .id_table = ds1672_id,
 };
 
 static int __init ds1672_init(void)
index 80782798763fa2528993ed652b0cf337e9d79008..a4f6665ab3c56760bbf72f63e05649d69dda3a03 100644 (file)
@@ -247,12 +247,18 @@ max6900_probe(struct i2c_client *client, const struct i2c_device_id *id)
        return 0;
 }
 
+static struct i2c_device_id max6900_id[] = {
+       { "max6900", 0 },
+       { }
+};
+
 static struct i2c_driver max6900_driver = {
        .driver = {
                   .name = "rtc-max6900",
                   },
        .probe = max6900_probe,
        .remove = max6900_remove,
+       .id_table = max6900_id,
 };
 
 static int __init max6900_init(void)
index abe87a4d266520d67976ac7f7620cbdfe07446c2..01d8da9afdc8506f0469a3b8a8c6284b98a235fe 100644 (file)
@@ -337,7 +337,7 @@ static int twl4030_rtc_ioctl(struct device *dev, unsigned int cmd,
 }
 
 #else
-#define        omap_rtc_ioctl  NULL
+#define        twl4030_rtc_ioctl       NULL
 #endif
 
 static irqreturn_t twl4030_rtc_interrupt(int irq, void *rtc)
index 317d239ab74043cf10ada65e9329d4da0d3e87fe..29cbb0afef8e735276fe3fb39d6b2da5519ae6b2 100644 (file)
@@ -177,5 +177,5 @@ module_exit(s3c2440_serial_exit);
 
 MODULE_DESCRIPTION("Samsung S3C2440,S3C2442 SoC Serial port driver");
 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
-MODULE_LICENSE("GPLi v2");
+MODULE_LICENSE("GPL v2");
 MODULE_ALIAS("platform:s3c2440-uart");
index 67ff370d80afed55b52a256b0fbff13e8f6a2dc4..0b2adefe9e3d55f3b20e3e668a8d5e7969058948 100644 (file)
@@ -3531,12 +3531,18 @@ static void fbcon_exit(void)
        softback_buf = 0UL;
 
        for (i = 0; i < FB_MAX; i++) {
+               int pending;
+
                mapped = 0;
                info = registered_fb[i];
 
                if (info == NULL)
                        continue;
 
+               pending = cancel_work_sync(&info->queue);
+               DPRINTK("fbcon: %s pending work\n", (pending ? "canceled" :
+                       "no"));
+
                for (j = first_fb_vc; j <= last_fb_vc; j++) {
                        if (con2fb_map[j] == i)
                                mapped = 1;
index 38718d95fbb9ad3091ba7652e72f1377235bb19a..fb64234a3825a2a9d1ee7f24e52e7cd75b969713 100644 (file)
@@ -927,9 +927,9 @@ static int __devinit mb862xx_pci_probe(struct pci_dev *pdev,
        }
 
        dev_dbg(dev, "fb phys 0x%llx 0x%lx\n",
-               (u64)par->fb_base_phys, (ulong)par->mapped_vram);
+               (unsigned long long)par->fb_base_phys, (ulong)par->mapped_vram);
        dev_dbg(dev, "mmio phys 0x%llx 0x%lx\n",
-               (u64)par->mmio_base_phys, (ulong)par->mmio_len);
+               (unsigned long long)par->mmio_base_phys, (ulong)par->mmio_len);
 
        if (mb862xx_pci_gdc_init(par))
                goto io_unmap;
index d2003cdc36aa687ab998a8c558144ddcc23ae6bb..db35cfdb3c8b6e25424a78af0aaaa69579cc2a07 100644 (file)
@@ -609,8 +609,8 @@ int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
 
        if (free_blocks - (nblocks + root_blocks + dirty_blocks) <
                                                EXT4_FREEBLOCKS_WATERMARK) {
-               free_blocks  = percpu_counter_sum(fbc);
-               dirty_blocks = percpu_counter_sum(dbc);
+               free_blocks  = percpu_counter_sum_positive(fbc);
+               dirty_blocks = percpu_counter_sum_positive(dbc);
                if (dirty_blocks < 0) {
                        printk(KERN_CRIT "Dirty block accounting "
                                        "went wrong %lld\n",
index 7bbed1b89825f8b37f4fa753201290d0002bf618..dae3f28f30d4779ee69cc8780d8424818b0fbfa4 100644 (file)
@@ -428,11 +428,13 @@ void inotify_unmount_inodes(struct list_head *list)
                watches = &inode->inotify_watches;
                list_for_each_entry_safe(watch, next_w, watches, i_list) {
                        struct inotify_handle *ih= watch->ih;
+                       get_inotify_watch(watch);
                        mutex_lock(&ih->mutex);
                        ih->in_ops->handle_event(watch, watch->wd, IN_UNMOUNT, 0,
                                                 NULL, NULL);
                        inotify_remove_watch_locked(ih, watch);
                        mutex_unlock(&ih->mutex);
+                       put_inotify_watch(watch);
                }
                mutex_unlock(&inode->inotify_mutex);
                iput(inode);            
index 486cf3fe7139949a0911e0e33f9cb99a06bfb8fb..d4677603c88920b45e14af3d91b71894b2c5b7b2 100644 (file)
@@ -371,7 +371,7 @@ static int lstats_show_proc(struct seq_file *m, void *v)
                                task->latency_record[i].time,
                                task->latency_record[i].max);
                        for (q = 0; q < LT_BACKTRACEDEPTH; q++) {
-                               char sym[KSYM_NAME_LEN];
+                               char sym[KSYM_SYMBOL_LEN];
                                char *c;
                                if (!task->latency_record[i].backtrace[q])
                                        break;
index b770c095e45c62f86e78da2f9d1524085f9d45fd..3a8bdd7f5756e37d430f15b2b5b76fb672c9b965 100644 (file)
@@ -557,9 +557,9 @@ static u64 swap_pte_to_pagemap_entry(pte_t pte)
        return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT);
 }
 
-static unsigned long pte_to_pagemap_entry(pte_t pte)
+static u64 pte_to_pagemap_entry(pte_t pte)
 {
-       unsigned long pme = 0;
+       u64 pme = 0;
        if (is_swap_pte(pte))
                pme = PM_PFRAME(swap_pte_to_pagemap_entry(pte))
                        | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP;
index 4ec0a296bdec8413394dbecedbf779bb19bfcf4b..7abdaa91ccd3738ea7e8633f16c78f3031ce15bf 100644 (file)
@@ -251,7 +251,7 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
 #define atomic_long_cmpxchg(l, old, new) \
        (atomic_cmpxchg((atomic_t *)(l), (old), (new)))
 #define atomic_long_xchg(v, new) \
-       (atomic_xchg((atomic_t *)(l), (new)))
+       (atomic_xchg((atomic_t *)(v), (new)))
 
 #endif  /*  BITS_PER_LONG == 64  */
 
index 703eb53cfa2b2a1512b7ce97d9c1da218ad9ac0f..9c5bc6be2b091274b37b14046f03ebf3db70c194 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/ktime.h>
 #include <linux/init.h>
 #include <linux/types.h>
+#include <linux/module.h>
 #include <linux/kallsyms.h>
 
 #ifdef CONFIG_FUNCTION_TRACER
@@ -231,7 +232,7 @@ ftrace_init_module(unsigned long *start, unsigned long *end) { }
 
 struct boot_trace {
        pid_t                   caller;
-       char                    func[KSYM_NAME_LEN];
+       char                    func[KSYM_SYMBOL_LEN];
        int                     result;
        unsigned long long      duration;               /* usecs */
        ktime_t                 calltime;
index 5e7b45c569233536ef23dadfafd90e40d20b7f62..449db466bdbc280f1509dad905a72a6a1407d9cb 100644 (file)
@@ -191,7 +191,7 @@ static int lstats_show(struct seq_file *m, void *v)
                                latency_record[i].time,
                                latency_record[i].max);
                        for (q = 0; q < LT_BACKTRACEDEPTH; q++) {
-                               char sym[KSYM_NAME_LEN];
+                               char sym[KSYM_SYMBOL_LEN];
                                char *c;
                                if (!latency_record[i].backtrace[q])
                                        break;
index 32b0befdcb6a6cba585cb555d9db4a87246d9468..09ac2008f77b419a5c169e41f3ddcbab6aa90746 100644 (file)
@@ -1317,12 +1317,9 @@ static ssize_t relay_file_splice_read(struct file *in,
                if (ret < 0)
                        break;
                else if (!ret) {
-                       if (spliced)
-                               break;
-                       if (flags & SPLICE_F_NONBLOCK) {
+                       if (flags & SPLICE_F_NONBLOCK)
                                ret = -EAGAIN;
-                               break;
-                       }
+                       break;
                }
 
                *ppos += ret;
index a8663890a88c2e358f21b8cdc6f23a8ebb9d77e5..b255b939bc1b85bd4fc385df4e1322e9472b2b26 100644 (file)
@@ -62,10 +62,7 @@ s64 __percpu_counter_sum(struct percpu_counter *fbc)
        for_each_online_cpu(cpu) {
                s32 *pcount = per_cpu_ptr(fbc->counters, cpu);
                ret += *pcount;
-               *pcount = 0;
        }
-       fbc->count = ret;
-
        spin_unlock(&fbc->lock);
        return ret;
 }
@@ -104,13 +101,13 @@ void percpu_counter_destroy(struct percpu_counter *fbc)
        if (!fbc->counters)
                return;
 
-       free_percpu(fbc->counters);
-       fbc->counters = NULL;
 #ifdef CONFIG_HOTPLUG_CPU
        mutex_lock(&percpu_counters_lock);
        list_del(&fbc->list);
        mutex_unlock(&percpu_counters_lock);
 #endif
+       free_percpu(fbc->counters);
+       fbc->counters = NULL;
 }
 EXPORT_SYMBOL(percpu_counter_destroy);
 
index 2a56124dbc28effcbda0a48c2268d1b7f763ee91..801c08b046e6cc0f1a12740dc74fed16ff018fe6 100644 (file)
@@ -176,7 +176,7 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent,
        int ret = 0;
        struct device *dev;
 
-       if (WARN_ON(bdi->dev))
+       if (bdi->dev)   /* The driver needs to use separate queues per device */
                goto exit;
 
        va_start(args, fmt);
index 1e0d6b237f4418c2f8b8ca50e88d85a787adc0a7..d8f07667fc8045e6690ab74a6e58806c7093ed7c 100644 (file)
@@ -987,25 +987,18 @@ out:
 /*
  * Determine the nodes of an array of pages and store it in an array of status.
  */
-static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
-                        const void __user * __user *pages,
-                        int __user *status)
+static void do_pages_stat_array(struct mm_struct *mm, unsigned long nr_pages,
+                               const void __user **pages, int *status)
 {
        unsigned long i;
-       int err;
 
        down_read(&mm->mmap_sem);
 
        for (i = 0; i < nr_pages; i++) {
-               const void __user *p;
-               unsigned long addr;
+               unsigned long addr = (unsigned long)(*pages);
                struct vm_area_struct *vma;
                struct page *page;
-
-               err = -EFAULT;
-               if (get_user(p, pages+i))
-                       goto out;
-               addr = (unsigned long) p;
+               int err;
 
                vma = find_vma(mm, addr);
                if (!vma)
@@ -1024,12 +1017,52 @@ static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
 
                err = page_to_nid(page);
 set_status:
-               put_user(err, status+i);
+               *status = err;
+
+               pages++;
+               status++;
+       }
+
+       up_read(&mm->mmap_sem);
+}
+
+/*
+ * Determine the nodes of a user array of pages and store it in
+ * a user array of status.
+ */
+static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
+                        const void __user * __user *pages,
+                        int __user *status)
+{
+#define DO_PAGES_STAT_CHUNK_NR 16
+       const void __user *chunk_pages[DO_PAGES_STAT_CHUNK_NR];
+       int chunk_status[DO_PAGES_STAT_CHUNK_NR];
+       unsigned long i, chunk_nr = DO_PAGES_STAT_CHUNK_NR;
+       int err;
+
+       for (i = 0; i < nr_pages; i += chunk_nr) {
+               if (chunk_nr + i > nr_pages)
+                       chunk_nr = nr_pages - i;
+
+               err = copy_from_user(chunk_pages, &pages[i],
+                                    chunk_nr * sizeof(*chunk_pages));
+               if (err) {
+                       err = -EFAULT;
+                       goto out;
+               }
+
+               do_pages_stat_array(mm, chunk_nr, chunk_pages, chunk_status);
+
+               err = copy_to_user(&status[i], chunk_status,
+                                  chunk_nr * sizeof(*chunk_status));
+               if (err) {
+                       err = -EFAULT;
+                       goto out;
+               }
        }
        err = 0;
 
 out:
-       up_read(&mm->mmap_sem);
        return err;
 }
 
index 0b3cbf090a674a1424cb1d7cc9e4cd4f3bfa4c02..ab27ff75051958fb992417ddcf675a296b96176e 100644 (file)
@@ -49,6 +49,9 @@ static int __init alloc_node_page_cgroup(int nid)
        start_pfn = NODE_DATA(nid)->node_start_pfn;
        nr_pages = NODE_DATA(nid)->node_spanned_pages;
 
+       if (!nr_pages)
+               return 0;
+
        table_size = sizeof(struct page_cgroup) * nr_pages;
 
        base = __alloc_bootmem_node_nopanic(NODE_DATA(nid),
index 749588a50a5ac2764eb49cf944d8bf784eedfb5f..a2cd47d89e0aa1f159d8e9e6ed2dcee32969068f 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3597,7 +3597,7 @@ static int list_locations(struct kmem_cache *s, char *buf,
        for (i = 0; i < t.count; i++) {
                struct location *l = &t.loc[i];
 
-               if (len > PAGE_SIZE - 100)
+               if (len > PAGE_SIZE - KSYM_SYMBOL_LEN - 100)
                        break;
                len += sprintf(buf + len, "%7ld ", l->count);
 
index 2881987603ebd880fa6410553c2bef83b7a99d50..b135ec90cdeb92673e2e97389f7cf9afc3ae80c9 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -299,7 +299,6 @@ void lru_add_drain(void)
        put_cpu();
 }
 
-#if defined(CONFIG_NUMA) || defined(CONFIG_UNEVICTABLE_LRU)
 static void lru_add_drain_per_cpu(struct work_struct *dummy)
 {
        lru_add_drain();
@@ -313,18 +312,6 @@ int lru_add_drain_all(void)
        return schedule_on_each_cpu(lru_add_drain_per_cpu);
 }
 
-#else
-
-/*
- * Returns 0 for success
- */
-int lru_add_drain_all(void)
-{
-       lru_add_drain();
-       return 0;
-}
-#endif
-
 /*
  * Batched page_cache_release().  Decrement the reference count on all the
  * passed pages.  If it fell to zero then remove the page from the LRU and
index f3f6e0758562283ac51fc4267a4d87fed600e917..1ddb77ba3995c2d8f486baf32c1409b3daf8093f 100644 (file)
@@ -1717,7 +1717,7 @@ static int s_show(struct seq_file *m, void *p)
                v->addr, v->addr + v->size, v->size);
 
        if (v->caller) {
-               char buff[2 * KSYM_NAME_LEN];
+               char buff[KSYM_SYMBOL_LEN];
 
                seq_putc(m, ' ');
                sprint_symbol(buff, (unsigned long)v->caller);