Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Jun 2008 21:30:47 +0000 (14:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Jun 2008 21:30:47 +0000 (14:30 -0700)
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (48 commits)
  V4L/DVB (8001): dib0070: fix dib0070_attach when !CONFIG_DVB_TUNER_DIB0070
  V4L/DVB (8000): tda827x: fix NULL pointer in tda827xa_lna_gain
  V4L/DVB (7990): Fix entry for PowerColor RA 330 and make it run with firmware version 2.7
  V4L/DVB (7983): tda18271_calc_rf_cal must return the return value of tda18271_lookup_map
  V4L/DVB (7978): cx18: explicitly test for XC2028 tuner
  V4L/DVB (7977): cx18: fix init order and remove duplicate open_on_first_use.
  V4L/DVB (7975): saa7134_empress
  V4L/DVB (7974): fix MEDIA_TUNER && FW_LOADER build error
  V4L/DVB (7972): or51132.c: unaligned
  V4L/DVB (7971): usb: unaligned
  V4L/DVB (7970): mix trivial endianness annotations
  V4L/DVB (7969): m920x: unaligned access
  V4L/DVB (7968): zoran: endianness annotations
  V4L/DVB (7967): bt8xx: unaligned access
  V4L/DVB (7966): cx18: direct dereferencing of iomem
  V4L/DVB (7965): annotate bcx_riscmem
  V4L/DVB (7964): cx18 iomem annotations
  V4L/DVB (7963): ivtv: trivial annotations
  V4L/DVB (7962): ttusb endianness annotations and fixes
  V4L/DVB (7961): fix endianness bug in dib0700_devices.c
  ...

28 files changed:
Documentation/SubmittingPatches
arch/mips/au1000/common/clocks.c
arch/mips/au1000/common/dbdma.c
arch/mips/kernel/Makefile
arch/mips/kernel/traps.c
arch/mips/mips-boards/generic/time.c
arch/mips/mm/page.c
arch/mips/mm/tlbex.c
arch/mips/pci/ops-bridge.c
arch/mips/pci/pci-ip27.c
arch/mips/sgi-ip27/ip27-init.c
arch/mips/sgi-ip27/ip27-memory.c
arch/mips/sgi-ip27/ip27-smp.c
arch/mips/sgi-ip27/ip27-timer.c
arch/x86/Kconfig.debug
drivers/ata/libata-sff.c
drivers/block/brd.c
drivers/mtd/maps/omap_nor.c
drivers/mtd/nand/pxa3xx_nand.c
drivers/mtd/onenand/generic.c
drivers/pnp/system.c
fs/cifs/asn1.c
include/asm-frv/checksum.h
include/asm-mips/mach-au1x00/au1xxx_dbdma.h
include/asm-mips/mipsregs.h
include/asm-mips/pgtable.h
include/asm-mips/rtlx.h
net/ipv4/netfilter/nf_nat_snmp_basic.c

index 9c93a03ea33b09996cde8aa84f48a85567f3282e..118ca6e9404f47ded06c7ee3a287003d00377e56 100644 (file)
@@ -327,6 +327,52 @@ Some people also put extra tags at the end.  They'll just be ignored for
 now, but you can do this to mark internal company procedures or just
 point out some special detail about the sign-off. 
 
+If you are a subsystem or branch maintainer, sometimes you need to slightly
+modify patches you receive in order to merge them, because the code is not
+exactly the same in your tree and the submitters'. If you stick strictly to
+rule (c), you should ask the submitter to rediff, but this is a totally
+counter-productive waste of time and energy. Rule (b) allows you to adjust
+the code, but then it is very impolite to change one submitter's code and
+make him endorse your bugs. To solve this problem, it is recommended that
+you add a line between the last Signed-off-by header and yours, indicating
+the nature of your changes. While there is nothing mandatory about this, it
+seems like prepending the description with your mail and/or name, all
+enclosed in square brackets, is noticeable enough to make it obvious that
+you are responsible for last-minute changes. Example :
+
+       Signed-off-by: Random J Developer <random@developer.example.org>
+       [lucky@maintainer.example.org: struct foo moved from foo.c to foo.h]
+       Signed-off-by: Lucky K Maintainer <lucky@maintainer.example.org>
+
+This practise is particularly helpful if you maintain a stable branch and
+want at the same time to credit the author, track changes, merge the fix,
+and protect the submitter from complaints. Note that under no circumstances
+can you change the author's identity (the From header), as it is the one
+which appears in the changelog.
+
+Special note to back-porters: It seems to be a common and useful practise
+to insert an indication of the origin of a patch at the top of the commit
+message (just after the subject line) to facilitate tracking. For instance,
+here's what we see in 2.6-stable :
+
+    Date:   Tue May 13 19:10:30 2008 +0000
+
+        SCSI: libiscsi regression in 2.6.25: fix nop timer handling
+
+        commit 4cf1043593db6a337f10e006c23c69e5fc93e722 upstream
+
+And here's what appears in 2.4 :
+
+    Date:   Tue May 13 22:12:27 2008 +0200
+
+        wireless, airo: waitbusy() won't delay
+
+        [backport of 2.6 commit b7acbdfbd1f277c1eb23f344f899cfa4cd0bf36a]
+
+Whatever the format, this information provides a valuable help to people
+tracking your trees, and to people trying to trouble-shoot bugs in your
+tree.
+
 
 13) When to use Acked-by: and Cc:
 
index 46f8ee0e265771be26b8833d54e19d949344ed3d..043429d17c5fd9ec1e3b9ccf01b7f51cf4621d4c 100644 (file)
@@ -45,6 +45,7 @@ unsigned int get_au1x00_speed(void)
 {
        return au1x00_clock;
 }
+EXPORT_SYMBOL(get_au1x00_speed);
 
 /*
  * The UART baud base is not known at compile time ... if
index 42d555236de15bbd4bc731554fb54a8ab305d6d1..601ee9180ee4fcad79ce0837b4f3c63b73a88348 100644 (file)
@@ -216,6 +216,17 @@ u32 au1xxx_ddma_add_device(dbdev_tab_t *dev)
 }
 EXPORT_SYMBOL(au1xxx_ddma_add_device);
 
+void au1xxx_ddma_del_device(u32 devid)
+{
+       dbdev_tab_t *p = find_dbdev_id(devid);
+
+       if (p != NULL) {
+               memset(p, 0, sizeof(dbdev_tab_t));
+               p->dev_id = ~0;
+       }
+}
+EXPORT_SYMBOL(au1xxx_ddma_del_device);
+
 /* Allocate a channel and return a non-zero descriptor if successful. */
 u32 au1xxx_dbdma_chan_alloc(u32 srcid, u32 destid,
        void (*callback)(int, void *), void *callparam)
index cc0244036aec793b9f45c983d346151bab3a4ed3..65e46a6d4178591f35512ef2ccc067f89037115e 100644 (file)
@@ -30,7 +30,6 @@ obj-$(CONFIG_CPU_LOONGSON2)   += r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_MIPS32)       += r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_MIPS64)       += r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_R3000)                += r2300_fpu.o r2300_switch.o
-obj-$(CONFIG_CPU_R4000)                += r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_R4300)                += r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_R4X00)                += r4k_fpu.o r4k_switch.o
 obj-$(CONFIG_CPU_R5000)                += r4k_fpu.o r4k_switch.o
index cb8b0e2c79547ba1c67a577cc852daf51f558dab..f9165d1a17bfbccec9d64a9a07148696fcf1784c 100644 (file)
@@ -88,15 +88,17 @@ static void show_raw_backtrace(unsigned long reg29)
 #ifdef CONFIG_KALLSYMS
        printk("\n");
 #endif
-#define IS_KVA01(a) ((((unsigned int)a) & 0xc0000000) == 0x80000000)
-       if (IS_KVA01(sp)) {
-               while (!kstack_end(sp)) {
-                       addr = *sp++;
-                       if (__kernel_text_address(addr))
-                               print_ip_sym(addr);
+       while (!kstack_end(sp)) {
+               unsigned long __user *p =
+                       (unsigned long __user *)(unsigned long)sp++;
+               if (__get_user(addr, p)) {
+                       printk(" (Bad stack address)");
+                       break;
                }
-               printk("\n");
+               if (__kernel_text_address(addr))
+                       print_ip_sym(addr);
        }
+       printk("\n");
 }
 
 #ifdef CONFIG_KALLSYMS
index 008fd82b584041013082a87c127dc70f669679f8..fe2cac1b4514514b0e21cde351badebe19d0ea4d 100644 (file)
@@ -58,27 +58,8 @@ static int mips_cpu_timer_irq;
 static int mips_cpu_perf_irq;
 extern int cp0_perfcount_irq;
 
-DEFINE_PER_CPU(unsigned int, tickcount);
-#define tickcount_this_cpu __get_cpu_var(tickcount)
-static unsigned long ledbitmask;
-
 static void mips_timer_dispatch(void)
 {
-#if defined(CONFIG_MIPS_MALTA) || defined(CONFIG_MIPS_ATLAS)
-       /*
-        * Yes, this is very tacky, won't work as expected with SMTC and
-        * dyntick will break it,
-        * but it gives me a nice warm feeling during debug
-        */
-#define LEDBAR 0xbf000408
-       if (tickcount_this_cpu++ >= HZ) {
-               tickcount_this_cpu = 0;
-               change_bit(smp_processor_id(), &ledbitmask);
-               smp_wmb(); /* Make sure every one else sees the change */
-               /* This will pick up any recent changes made by other CPU's */
-               *(unsigned int *)LEDBAR = ledbitmask;
-       }
-#endif
        do_IRQ(mips_cpu_timer_irq);
 }
 
index d827d61443690baefa37a4d3f5211fdb3f35c238..cab81f42eee56589239fdd9d6a8eb0fb5a5e47a9 100644 (file)
@@ -310,8 +310,8 @@ void __cpuinit build_clear_page(void)
        if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
                uasm_i_lui(&buf, AT, 0xa000);
 
-       off = min(8, pref_bias_clear_store / cache_line_size) *
-             cache_line_size;
+       off = cache_line_size ? min(8, pref_bias_clear_store / cache_line_size)
+                               * cache_line_size : 0;
        while (off) {
                build_clear_pref(&buf, -off);
                off -= cache_line_size;
@@ -454,12 +454,14 @@ void __cpuinit build_copy_page(void)
        if (R4600_V2_HIT_CACHEOP_WAR && cpu_is_r4600_v2_x())
                uasm_i_lui(&buf, AT, 0xa000);
 
-       off = min(8, pref_bias_copy_load / cache_line_size) * cache_line_size;
+       off = cache_line_size ? min(8, pref_bias_copy_load / cache_line_size) *
+                               cache_line_size : 0;
        while (off) {
                build_copy_load_pref(&buf, -off);
                off -= cache_line_size;
        }
-       off = min(8, pref_bias_copy_store / cache_line_size) * cache_line_size;
+       off = cache_line_size ? min(8, pref_bias_copy_load / cache_line_size) *
+                               cache_line_size : 0;
        while (off) {
                build_copy_store_pref(&buf, -off);
                off -= cache_line_size;
index 382738ca8a0b17d0247e63ceaf0300456f5fff6e..76da73a5ab3caff4fcf43921ed8a132a8a739897 100644 (file)
@@ -224,8 +224,9 @@ static u32 final_handler[64] __cpuinitdata;
 static void __cpuinit __maybe_unused build_tlb_probe_entry(u32 **p)
 {
        switch (current_cpu_type()) {
-       /* Found by experiment: R4600 v2.0 needs this, too.  */
+       /* Found by experiment: R4600 v2.0/R4700 needs this, too.  */
        case CPU_R4600:
+       case CPU_R4700:
        case CPU_R5000:
        case CPU_R5000A:
        case CPU_NEVADA:
index 1fa09929cd7a997391ae35f6f65189c8e0ffba81..b46b3e211775932038d1b82ddf0bb9b3594aaf7b 100644 (file)
 #include <asm/sn/intr.h>
 #include <asm/sn/sn0/hub.h>
 
+/*
+ * Most of the IOC3 PCI config register aren't present
+ * we emulate what is needed for a normal PCI enumeration
+ */
+static u32 emulate_ioc3_cfg(int where, int size)
+{
+       if (size == 1 && where == 0x3d)
+               return 0x01;
+       else if (size == 2 && where == 0x3c)
+               return 0x0100;
+       else if (size == 4 && where == 0x3c)
+               return 0x00000100;
+
+       return 0;
+}
+
 /*
  * The Bridge ASIC supports both type 0 and type 1 access.  Type 1 is
  * not really documented, so right now I can't write code which uses it.
@@ -64,7 +80,7 @@ oh_my_gawd:
         * generic PCI code a chance to look at the wrong register.
         */
        if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) {
-               *value = 0;
+               *value = emulate_ioc3_cfg(where, size);
                return PCIBIOS_SUCCESSFUL;
        }
 
@@ -127,7 +143,7 @@ oh_my_gawd:
         * generic PCI code a chance to look at the wrong register.
         */
        if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) {
-               *value = 0;
+               *value = emulate_ioc3_cfg(where, size);
                return PCIBIOS_SUCCESSFUL;
        }
 
index bb64828a92fece6bcab023b1fd50cbcaf814231e..a18516925cdd3eeab62ae19f92e270521f5a3f3b 100644 (file)
@@ -47,6 +47,9 @@ int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid)
        static int num_bridges = 0;
        bridge_t *bridge;
        int slot;
+       extern int pci_probe_only;
+
+       pci_probe_only = 1;
 
        printk("a bridge\n");
 
@@ -100,6 +103,11 @@ int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid)
         */
        bridge->b_wid_control |= BRIDGE_CTRL_IO_SWAP |
                                 BRIDGE_CTRL_MEM_SWAP;
+#ifdef CONFIG_PAGE_SIZE_4KB
+       bridge->b_wid_control &= ~BRIDGE_CTRL_PAGE_SIZE;
+#else /* 16kB or larger */
+       bridge->b_wid_control |= BRIDGE_CTRL_PAGE_SIZE;
+#endif
 
        /*
         * Hmm...  IRIX sets additional bits in the address which
index 7093e7c573a42d0f06b689417792490ef37ee5f6..4a500e8cd3cc2e86f0e4503b871f918095a1757a 100644 (file)
@@ -161,27 +161,6 @@ cnodeid_t get_compact_nodeid(void)
        return NASID_TO_COMPACT_NODEID(get_nasid());
 }
 
-/* Extracted from the IOC3 meta driver.  FIXME.  */
-static inline void ioc3_sio_init(void)
-{
-       struct ioc3 *ioc3;
-       nasid_t nid;
-       long loops;
-
-       nid = get_nasid();
-       ioc3 = (struct ioc3 *) KL_CONFIG_CH_CONS_INFO(nid)->memory_base;
-
-       ioc3->sscr_a = 0;                       /* PIO mode for uarta.  */
-       ioc3->sscr_b = 0;                       /* PIO mode for uartb.  */
-       ioc3->sio_iec = ~0;
-       ioc3->sio_ies = (SIO_IR_SA_INT | SIO_IR_SB_INT);
-
-       loops=1000000; while(loops--);
-       ioc3->sregs.uarta.iu_fcr = 0;
-       ioc3->sregs.uartb.iu_fcr = 0;
-       loops=1000000; while(loops--);
-}
-
 static inline void ioc3_eth_init(void)
 {
        struct ioc3 *ioc3;
@@ -234,7 +213,6 @@ void __init plat_mem_setup(void)
                panic("Kernel compiled for N mode.");
 #endif
 
-       ioc3_sio_init();
        ioc3_eth_init();
        per_cpu_init();
 
index bf438d02366e4823aa5849d9592b9163bfb088ae..42cd109563064e2a818b8def35419829a2611f93 100644 (file)
 #define SLOT_PFNSHIFT           (SLOT_SHIFT - PAGE_SHIFT)
 #define PFN_NASIDSHFT           (NASID_SHFT - PAGE_SHIFT)
 
-#define SLOT_IGNORED           0xffff
-
-static short __initdata slot_lastfilled_cache[MAX_COMPACT_NODES];
-static unsigned short __initdata slot_psize_cache[MAX_COMPACT_NODES][MAX_MEM_SLOTS];
 static struct bootmem_data __initdata plat_node_bdata[MAX_COMPACT_NODES];
 
 struct node_data *__node_data[MAX_COMPACT_NODES];
@@ -267,51 +263,6 @@ static pfn_t __init slot_getbasepfn(cnodeid_t cnode, int slot)
        return ((pfn_t)nasid << PFN_NASIDSHFT) | (slot << SLOT_PFNSHIFT);
 }
 
-/*
- * Return the number of pages of memory provided by the given slot
- * on the specified node.
- */
-static pfn_t __init slot_getsize(cnodeid_t node, int slot)
-{
-       return (pfn_t) slot_psize_cache[node][slot];
-}
-
-/*
- * Return highest slot filled
- */
-static int __init node_getlastslot(cnodeid_t node)
-{
-       return (int) slot_lastfilled_cache[node];
-}
-
-/*
- * Return the pfn of the last free page of memory on a node.
- */
-static pfn_t __init node_getmaxclick(cnodeid_t node)
-{
-       pfn_t   slot_psize;
-       int     slot;
-
-       /*
-        * Start at the top slot. When we find a slot with memory in it,
-        * that's the winner.
-        */
-       for (slot = (MAX_MEM_SLOTS - 1); slot >= 0; slot--) {
-               if ((slot_psize = slot_getsize(node, slot))) {
-                       if (slot_psize == SLOT_IGNORED)
-                               continue;
-                       /* Return the basepfn + the slot size, minus 1. */
-                       return slot_getbasepfn(node, slot) + slot_psize - 1;
-               }
-       }
-
-       /*
-        * If there's no memory on the node, return 0. This is likely
-        * to cause problems.
-        */
-       return 0;
-}
-
 static pfn_t __init slot_psize_compute(cnodeid_t node, int slot)
 {
        nasid_t nasid;
@@ -404,13 +355,13 @@ static void __init mlreset(void)
 static void __init szmem(void)
 {
        pfn_t slot_psize, slot0sz = 0, nodebytes;       /* Hack to detect problem configs */
-       int slot, ignore;
+       int slot;
        cnodeid_t node;
 
        num_physpages = 0;
 
        for_each_online_node(node) {
-               ignore = nodebytes = 0;
+               nodebytes = 0;
                for (slot = 0; slot < MAX_MEM_SLOTS; slot++) {
                        slot_psize = slot_psize_compute(node, slot);
                        if (slot == 0)
@@ -420,21 +371,20 @@ static void __init szmem(void)
                         * kernel text.
                         */
                        nodebytes += (1LL << SLOT_SHIFT);
+
+                       if (!slot_psize)
+                               continue;
+
                        if ((nodebytes >> PAGE_SHIFT) * (sizeof(struct page)) >
-                                               (slot0sz << PAGE_SHIFT))
-                               ignore = 1;
-                       if (ignore && slot_psize) {
+                                               (slot0sz << PAGE_SHIFT)) {
                                printk("Ignoring slot %d onwards on node %d\n",
                                                                slot, node);
-                               slot_psize_cache[node][slot] = SLOT_IGNORED;
                                slot = MAX_MEM_SLOTS;
                                continue;
                        }
                        num_physpages += slot_psize;
-                       slot_psize_cache[node][slot] =
-                                       (unsigned short) slot_psize;
-                       if (slot_psize)
-                               slot_lastfilled_cache[node] = slot;
+                       add_active_range(node, slot_getbasepfn(node, slot),
+                                        slot_getbasepfn(node, slot) + slot_psize);
                }
        }
 }
@@ -442,18 +392,20 @@ static void __init szmem(void)
 static void __init node_mem_init(cnodeid_t node)
 {
        pfn_t slot_firstpfn = slot_getbasepfn(node, 0);
-       pfn_t slot_lastpfn = slot_firstpfn + slot_getsize(node, 0);
        pfn_t slot_freepfn = node_getfirstfree(node);
-       struct pglist_data *pd;
        unsigned long bootmap_size;
+       pfn_t start_pfn, end_pfn;
+
+       get_pfn_range_for_nid(node, &start_pfn, &end_pfn);
 
        /*
         * Allocate the node data structures on the node first.
         */
        __node_data[node] = __va(slot_freepfn << PAGE_SHIFT);
 
-       pd = NODE_DATA(node);
-       pd->bdata = &plat_node_bdata[node];
+       NODE_DATA(node)->bdata = &plat_node_bdata[node];
+       NODE_DATA(node)->node_start_pfn = start_pfn;
+       NODE_DATA(node)->node_spanned_pages = end_pfn - start_pfn;
 
        cpus_clear(hub_data(node)->h_cpus);
 
@@ -461,12 +413,12 @@ static void __init node_mem_init(cnodeid_t node)
                               sizeof(struct hub_data));
 
        bootmap_size = init_bootmem_node(NODE_DATA(node), slot_freepfn,
-                                       slot_firstpfn, slot_lastpfn);
-       free_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT,
-                       (slot_lastpfn - slot_firstpfn) << PAGE_SHIFT);
+                                       start_pfn, end_pfn);
+       free_bootmem_with_active_regions(node, end_pfn);
        reserve_bootmem_node(NODE_DATA(node), slot_firstpfn << PAGE_SHIFT,
                ((slot_freepfn - slot_firstpfn) << PAGE_SHIFT) + bootmap_size,
                BOOTMEM_DEFAULT);
+       sparse_memory_present_with_active_regions(node);
 }
 
 /*
@@ -515,16 +467,15 @@ void __init paging_init(void)
        pagetable_init();
 
        for_each_online_node(node) {
-               pfn_t start_pfn = slot_getbasepfn(node, 0);
-               pfn_t end_pfn = node_getmaxclick(node) + 1;
+               pfn_t start_pfn, end_pfn;
 
-               zones_size[ZONE_NORMAL] = end_pfn - start_pfn;
-               free_area_init_node(node, NODE_DATA(node),
-                               zones_size, start_pfn, NULL);
+               get_pfn_range_for_nid(node, &start_pfn, &end_pfn);
 
                if (end_pfn > max_low_pfn)
                        max_low_pfn = end_pfn;
        }
+       zones_size[ZONE_NORMAL] = max_low_pfn;
+       free_area_init_nodes(zones_size);
 }
 
 void __init mem_init(void)
@@ -535,34 +486,10 @@ void __init mem_init(void)
        high_memory = (void *) __va(num_physpages << PAGE_SHIFT);
 
        for_each_online_node(node) {
-               unsigned slot, numslots;
-               struct page *end, *p;
-
                /*
                 * This will free up the bootmem, ie, slot 0 memory.
                 */
                totalram_pages += free_all_bootmem_node(NODE_DATA(node));
-
-               /*
-                * We need to manually do the other slots.
-                */
-               numslots = node_getlastslot(node);
-               for (slot = 1; slot <= numslots; slot++) {
-                       p = nid_page_nr(node, slot_getbasepfn(node, slot) -
-                                             slot_getbasepfn(node, 0));
-
-                       /*
-                        * Free valid memory in current slot.
-                        */
-                       for (end = p + slot_getsize(node, slot); p < end; p++) {
-                               /* if (!page_is_ram(pgnr)) continue; */
-                               /* commented out until page_is_ram works */
-                               ClearPageReserved(p);
-                               init_page_count(p);
-                               __free_page(p);
-                               totalram_pages++;
-                       }
-               }
        }
 
        totalram_pages -= setup_zero_pages();   /* This comes from node 0 */
index f15fc93d6b35112331fbd0fd9c842c0cf36bcb86..ba5cdebeaf0d23d703ce93a163cdd1b030a6bdf6 100644 (file)
@@ -176,11 +176,14 @@ static void ip27_send_ipi_mask(cpumask_t mask, unsigned int action)
 static void __cpuinit ip27_init_secondary(void)
 {
        per_cpu_init();
-       local_irq_enable();
 }
 
 static void __cpuinit ip27_smp_finish(void)
 {
+       extern void hub_rt_clock_event_init(void);
+
+       hub_rt_clock_event_init();
+       local_irq_enable();
 }
 
 static void __init ip27_cpus_done(void)
index 9cebc9e7da63ad4c926fbd142f39da54313d8594..8b4e854af925b4b832dff234c0a0bcd64e2f5a42 100644 (file)
@@ -160,10 +160,13 @@ static void rt_set_mode(enum clock_event_mode mode,
 
 int rt_timer_irq;
 
+static DEFINE_PER_CPU(struct clock_event_device, hub_rt_clockevent);
+static DEFINE_PER_CPU(char [11], hub_rt_name);
+
 static irqreturn_t hub_rt_counter_handler(int irq, void *dev_id)
 {
-       struct clock_event_device *cd = dev_id;
        unsigned int cpu = smp_processor_id();
+       struct clock_event_device *cd = &per_cpu(hub_rt_clockevent, cpu);
        int slice = cputoslice(cpu);
 
        /*
@@ -192,10 +195,7 @@ struct irqaction hub_rt_irqaction = {
 #define NSEC_PER_CYCLE         800
 #define CYCLES_PER_SEC         (NSEC_PER_SEC / NSEC_PER_CYCLE)
 
-static DEFINE_PER_CPU(struct clock_event_device, hub_rt_clockevent);
-static DEFINE_PER_CPU(char [11], hub_rt_name);
-
-static void __cpuinit hub_rt_clock_event_init(void)
+void __cpuinit hub_rt_clock_event_init(void)
 {
        unsigned int cpu = smp_processor_id();
        struct clock_event_device *cd = &per_cpu(hub_rt_clockevent, cpu);
@@ -203,17 +203,16 @@ static void __cpuinit hub_rt_clock_event_init(void)
        int irq = rt_timer_irq;
 
        sprintf(name, "hub-rt %d", cpu);
-       cd->name                = "HUB-RT",
-       cd->features            = CLOCK_EVT_FEAT_ONESHOT,
+       cd->name                = name;
+       cd->features            = CLOCK_EVT_FEAT_ONESHOT;
        clockevent_set_clock(cd, CYCLES_PER_SEC);
        cd->max_delta_ns        = clockevent_delta2ns(0xfffffffffffff, cd);
        cd->min_delta_ns        = clockevent_delta2ns(0x300, cd);
-       cd->rating              = 200,
-       cd->irq                 = irq,
-       cd->cpumask             = cpumask_of_cpu(cpu),
-       cd->rating              = 300,
-       cd->set_next_event      = rt_next_event,
-       cd->set_mode            = rt_set_mode,
+       cd->rating              = 200;
+       cd->irq                 = irq;
+       cd->cpumask             = cpumask_of_cpu(cpu);
+       cd->set_next_event      = rt_next_event;
+       cd->set_mode            = rt_set_mode;
        clockevents_register_device(cd);
 }
 
@@ -261,6 +260,7 @@ void __init plat_time_init(void)
 {
        hub_rt_clocksource_init();
        hub_rt_clock_event_global_init();
+       hub_rt_clock_event_init();
 }
 
 void __cpuinit cpu_time_init(void)
@@ -281,7 +281,6 @@ void __cpuinit cpu_time_init(void)
 
        printk("CPU %d clock is %dMHz.\n", smp_processor_id(), cpu->cpu_speed);
 
-       hub_rt_clock_event_init();
        set_c0_status(SRB_TIMOCLK);
 }
 
index ac1e31ba4795cb0f067a280826da257432f93f33..18363374d51a9a57b39b6fb8d3f87a054b4b4aa5 100644 (file)
@@ -6,15 +6,19 @@ config TRACE_IRQFLAGS_SUPPORT
 source "lib/Kconfig.debug"
 
 config NONPROMISC_DEVMEM
-       bool "Disable promiscuous /dev/mem"
+       bool "Filter access to /dev/mem"
        help
-         The /dev/mem file by default only allows userspace access to PCI
-         space and the BIOS code and data regions. This is sufficient for
-         dosemu and X and all common users of /dev/mem. With this config
-         option, you allow userspace access to all of memory, including
-         kernel and userspace memory. Accidental access to this is
-         obviously disasterous, but specific access can be used by people
-         debugging the kernel.
+         If this option is left off, you allow userspace access to all
+         of memory, including kernel and userspace memory. Accidental
+         access to this is obviously disastrous, but specific access can
+         be used by people debugging the kernel.
+
+         If this option is switched on, the /dev/mem file only allows
+         userspace access to PCI space and the BIOS code and data regions.
+         This is sufficient for dosemu and X and all common users of
+         /dev/mem.
+
+         If in doubt, say Y.
 
 config EARLY_PRINTK
        bool "Early printk" if EMBEDDED
index 90d20c615ef59e28db733dba6330c386673a5e1a..215d18672a5a9c62a00c43d5b3678b3bc5638242 100644 (file)
@@ -278,7 +278,7 @@ static u8 ata_sff_irq_status(struct ata_port *ap)
                        return status;
        }
        /* Clear INTRQ latch */
-       status = ata_sff_check_status(ap);
+       status = ap->ops->sff_check_status(ap);
        return status;
 }
 
index 680cdfc00b90b99714113b32199aeca2a97e72be..24b97b0bef994411bda31e377c041da6471ed9a2 100644 (file)
@@ -397,6 +397,7 @@ module_param(max_part, int, 0);
 MODULE_PARM_DESC(max_part, "Maximum number of partitions per RAM disk");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR);
+MODULE_ALIAS("rd");
 
 #ifndef MODULE
 /* Legacy boot options - nonmodular */
index 240b0e2d095d6bade93555986d0cd09cc163aa80..c12d8056bebd123c792978f62749dd1a3eb4356d 100644 (file)
@@ -110,7 +110,7 @@ static int __init omapflash_probe(struct platform_device *pdev)
        err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0);
        if (err > 0)
                add_mtd_partitions(info->mtd, info->parts, err);
-       else if (err < 0 && pdata->parts)
+       else if (err <= 0 && pdata->parts)
                add_mtd_partitions(info->mtd, pdata->parts, pdata->nr_parts);
        else
 #endif
index fceb468ccdecd48324e2b31f4114bb3a201bc86d..fe2bc7e421191a061020d6f0dda7731d1c2bd819 100644 (file)
@@ -1216,7 +1216,7 @@ static int pxa3xx_nand_resume(struct platform_device *pdev)
 
        clk_enable(info->clk);
 
-       return pxa3xx_nand_config_flash(info);
+       return pxa3xx_nand_config_flash(info, info->flash_info);
 }
 #else
 #define pxa3xx_nand_suspend    NULL
index 3d44d040a47def9bb00a7fea1b561135d8f84aa9..ad81ab8e95e2ca5f3d9cdea4e2b50472c282e202 100644 (file)
@@ -76,7 +76,7 @@ static int __devinit generic_onenand_probe(struct device *dev)
        err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0);
        if (err > 0)
                add_mtd_partitions(&info->mtd, info->parts, err);
-       else if (err < 0 && pdata->parts)
+       else if (err <= 0 && pdata->parts)
                add_mtd_partitions(&info->mtd, pdata->parts, pdata->nr_parts);
        else
 #endif
index 8f0a570509c58dee29de82f9d36b02ad291057db..cf4e07b01d484e7038e7bf2424bb04b68e84e014 100644 (file)
@@ -81,7 +81,7 @@ static void reserve_resources_of_dev(struct pnp_dev *dev)
        }
 
        for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) {
-               if (res->flags & IORESOURCE_DISABLED)
+               if (res->flags & (IORESOURCE_UNSET | IORESOURCE_DISABLED))
                        continue;
 
                reserve_range(dev, res->start, res->end, 0);
index cb52cbbe45ff4704790ec4ffbf0a985e3423f492..f58e41d3ba485d97bbf57726e7087d5ec6db1d63 100644 (file)
@@ -186,6 +186,11 @@ asn1_length_decode(struct asn1_ctx *ctx, unsigned int *def, unsigned int *len)
                        }
                }
        }
+
+       /* don't trust len bigger than ctx buffer */
+       if (*len > ctx->end - ctx->pointer)
+               return 0;
+
        return 1;
 }
 
@@ -203,6 +208,10 @@ asn1_header_decode(struct asn1_ctx *ctx,
        if (!asn1_length_decode(ctx, &def, &len))
                return 0;
 
+       /* primitive shall be definite, indefinite shall be constructed */
+       if (*con == ASN1_PRI && !def)
+               return 0;
+
        if (def)
                *eoc = ctx->pointer + len;
        else
@@ -389,6 +398,11 @@ asn1_oid_decode(struct asn1_ctx *ctx,
        unsigned long *optr;
 
        size = eoc - ctx->pointer + 1;
+
+       /* first subid actually encodes first two subids */
+       if (size < 2 || size > ULONG_MAX/sizeof(unsigned long))
+               return 0;
+
        *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);
        if (*oid == NULL)
                return 0;
index 9b1689850187c91a51b203a988e81e16bd2ba5f6..269da09ff637f5f1a3bfb6b5ef55e8002bae3f16 100644 (file)
@@ -75,7 +75,7 @@ __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
            : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (inc), "=&r"(tmp)
            : "0" (sum), "1" (iph), "2" (ihl), "3" (4),
            "m"(*(volatile struct { int _[100]; } *)iph)
-           : "icc0", "icc1"
+           : "icc0", "icc1", "memory"
            );
 
        return (__force __sum16)~sum;
index ad17d7ce516abcad29e894f4cdd8172ad8892dd0..44a67bf05dc19aff393d72ca3bb999e1a1c8bda1 100644 (file)
@@ -355,6 +355,7 @@ void au1xxx_dbdma_dump(u32 chanid);
 u32 au1xxx_dbdma_put_dscr(u32 chanid, au1x_ddma_desc_t *dscr);
 
 u32 au1xxx_ddma_add_device(dbdev_tab_t *dev);
+extern void au1xxx_ddma_del_device(u32 devid);
 void *au1xxx_ddma_get_nextptr_virt(au1x_ddma_desc_t *dp);
 
 /*
index aa17f658f73c9d164036fb838554f6e8ec1dc572..a46f8e258e6bdfbeb9921998f4d8c4022844b81a 100644 (file)
@@ -765,6 +765,9 @@ do {                                                                        \
 #define read_c0_index()                __read_32bit_c0_register($0, 0)
 #define write_c0_index(val)    __write_32bit_c0_register($0, 0, val)
 
+#define read_c0_random()       __read_32bit_c0_register($1, 0)
+#define write_c0_random(val)   __write_32bit_c0_register($1, 0, val)
+
 #define read_c0_entrylo0()     __read_ulong_c0_register($2, 0)
 #define write_c0_entrylo0(val) __write_ulong_c0_register($2, 0, val)
 
index 2f597eea44482a269c896c62aef017ca28ca4d3d..6a0edf72ffbc1aeaa2f039bdf6849eda7eebe511 100644 (file)
@@ -239,9 +239,10 @@ static inline pte_t pte_mkdirty(pte_t pte)
 static inline pte_t pte_mkyoung(pte_t pte)
 {
        pte.pte_low |= _PAGE_ACCESSED;
-       if (pte.pte_low & _PAGE_READ)
+       if (pte.pte_low & _PAGE_READ) {
                pte.pte_low  |= _PAGE_SILENT_READ;
                pte.pte_high |= _PAGE_SILENT_READ;
+       }
        return pte;
 }
 #else
index 20b666022dcbdd08c66519ef76a9543ed7dc5487..4ca3063ed2ce9330cd3c87ef3b1da6fb001927d5 100644 (file)
@@ -3,7 +3,7 @@
  *
  */
 
-#ifndef __ASM_RTLX_H
+#ifndef __ASM_RTLX_H_
 #define __ASM_RTLX_H_
 
 #include <irq.h>
index 5daefad3d1936393139baf80d48cff263c5262cd..7750c97fde7bb6bdc6ae05061b2528d3d3e31310 100644 (file)
@@ -232,6 +232,11 @@ static unsigned char asn1_length_decode(struct asn1_ctx *ctx,
                        }
                }
        }
+
+       /* don't trust len bigger than ctx buffer */
+       if (*len > ctx->end - ctx->pointer)
+               return 0;
+
        return 1;
 }
 
@@ -250,6 +255,10 @@ static unsigned char asn1_header_decode(struct asn1_ctx *ctx,
        if (!asn1_length_decode(ctx, &def, &len))
                return 0;
 
+       /* primitive shall be definite, indefinite shall be constructed */
+       if (*con == ASN1_PRI && !def)
+               return 0;
+
        if (def)
                *eoc = ctx->pointer + len;
        else
@@ -434,6 +443,11 @@ static unsigned char asn1_oid_decode(struct asn1_ctx *ctx,
        unsigned long *optr;
 
        size = eoc - ctx->pointer + 1;
+
+       /* first subid actually encodes first two subids */
+       if (size < 2 || size > ULONG_MAX/sizeof(unsigned long))
+               return 0;
+
        *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);
        if (*oid == NULL) {
                if (net_ratelimit())
This page took 0.044969 seconds and 5 git commands to generate.