]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 15 Jan 2011 20:29:50 +0000 (12:29 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 15 Jan 2011 20:29:50 +0000 (12:29 -0800)
* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: fix missing branch in __error_a
  ARM: fix /proc/$PID/stack on SMP
  ARM: Fix build regression on SA11x0, PXA, and H720x targets
  ARM: 6625/1: use memblock memory regions for "System RAM" I/O resources
  ARM: fix wrongly patched constants
  ARM: 6624/1: fix dependency for CONFIG_SMP_ON_UP
  ARM: 6623/1: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S
  ARM: 6622/1: fix dma_unmap_sg() documentation
  ARM: 6621/1: bitops: remove condition code clobber for CLZ
  ARM: 6620/1: Change misleading warning when CONFIG_CMDLINE_FORCE is used
  ARM: 6619/1: nommu: avoid mapping vectors page when !CONFIG_MMU
  ARM: sched_clock: make minsec argument to clocks_calc_mult_shift() zero
  ARM: sched_clock: allow init_sched_clock() to be called early
  ARM: integrator: fix compile warning in cpu.c
  ARM: 6616/1: Fix ep93xx-fb init/exit annotations
  ARM: twd: fix display of twd frequency
  ARM: udelay: prevent math rounding resulting in short udelays

21 files changed:
arch/arm/Kconfig
arch/arm/include/asm/bitops.h
arch/arm/include/asm/sched_clock.h
arch/arm/kernel/head-common.S
arch/arm/kernel/process.c
arch/arm/kernel/sched_clock.c
arch/arm/kernel/setup.c
arch/arm/kernel/smp_twd.c
arch/arm/kernel/stacktrace.c
arch/arm/kernel/time.c
arch/arm/lib/delay.S
arch/arm/mach-h720x/h7201-eval.c
arch/arm/mach-h720x/h7202-eval.c
arch/arm/mach-integrator/cpu.c
arch/arm/mach-pxa/generic.c
arch/arm/mach-s5pv310/hotplug.c
arch/arm/mach-sa1100/generic.c
arch/arm/mach-tegra/hotplug.c
arch/arm/mm/dma-mapping.c
arch/arm/mm/proc-v7.S
drivers/video/ep93xx-fb.c

index e2f801167593e3fd7428ae38eb634eaeadcde225..629ff8261fc156dfca24ff4e43e7d2823394acdc 100644 (file)
@@ -1281,7 +1281,7 @@ config SMP
 config SMP_ON_UP
        bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)"
        depends on EXPERIMENTAL
-       depends on SMP && !XIP
+       depends on SMP && !XIP_KERNEL
        default y
        help
          SMP kernels contain instructions which fail on non-SMP processors.
index 338ff19ae4473252f769d6984f72e260200a947b..7b1bb2bbaf884e1196b6f977184a6a13715e2069 100644 (file)
@@ -285,7 +285,7 @@ static inline int fls(int x)
        if (__builtin_constant_p(x))
               return constant_fls(x);
 
-       asm("clz\t%0, %1" : "=r" (ret) : "r" (x) : "cc");
+       asm("clz\t%0, %1" : "=r" (ret) : "r" (x));
                ret = 32 - ret;
        return ret;
 }
index a84628be1a7b26af6f0663a616dd26cb7b09f30b..c8e6ddf3e860478dcf14119a66b636f0fb0f810e 100644 (file)
@@ -115,4 +115,6 @@ static inline void init_fixed_sched_clock(struct clock_data *cd,
        }
 }
 
+extern void sched_clock_postinit(void);
+
 #endif
index bbecaac1e0135132dd7b208735fd18130030ec76..8f57515bbdb0fcc1fee2b1b9efe85c34ab1a563c 100644 (file)
@@ -60,6 +60,8 @@ str_a1:       .asciz  "\nError: unrecognized/unsupported machine ID (r1 = 0x"
 str_a2:        .asciz  ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n"
 str_a3:        .asciz  "\nPlease check your kernel config and/or bootloader.\n"
        .align
+#else
+       b       __error
 #endif
 
 /*
index e76fcaadce03fca34f20524bc03df51f73cb2d99..94bbedbed6394cf147e2b73bce3b6629d0dbbd9f 100644 (file)
@@ -483,6 +483,7 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
        return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
 }
 
+#ifdef CONFIG_MMU
 /*
  * The vectors page is always readable from user space for the
  * atomic helpers and the signal restart code.  Let's declare a mapping
@@ -503,3 +504,4 @@ const char *arch_vma_name(struct vm_area_struct *vma)
 {
        return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL;
 }
+#endif
index 2cdcc9287c744d32f2cf0a8fe1a55c7fcedd7a98..9a46370fe9dac57c4887e6e78be9e1de20bf9554 100644 (file)
@@ -34,7 +34,7 @@ void __init init_sched_clock(struct clock_data *cd, void (*update)(void),
        sched_clock_update_fn = update;
 
        /* calculate the mult/shift to convert counter ticks to ns. */
-       clocks_calc_mult_shift(&cd->mult, &cd->shift, rate, NSEC_PER_SEC, 60);
+       clocks_calc_mult_shift(&cd->mult, &cd->shift, rate, NSEC_PER_SEC, 0);
 
        r = rate;
        if (r >= 4000000) {
@@ -60,10 +60,15 @@ void __init init_sched_clock(struct clock_data *cd, void (*update)(void),
         * sets the initial epoch.
         */
        sched_clock_timer.data = msecs_to_jiffies(w - (w / 10));
-       sched_clock_poll(sched_clock_timer.data);
+       update();
 
        /*
         * Ensure that sched_clock() starts off at 0ns
         */
        cd->epoch_ns = 0;
 }
+
+void __init sched_clock_postinit(void)
+{
+       sched_clock_poll(sched_clock_timer.data);
+}
index 3455ad33de4c425bfdba98b7bef29999792f54e3..420b8d6485d6087673d5fe33af6d5a1c0cd06f18 100644 (file)
@@ -518,25 +518,21 @@ setup_ramdisk(int doload, int prompt, int image_start, unsigned int rd_sz)
 #endif
 }
 
-static void __init
-request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc)
+static void __init request_standard_resources(struct machine_desc *mdesc)
 {
+       struct memblock_region *region;
        struct resource *res;
-       int i;
 
        kernel_code.start   = virt_to_phys(_text);
        kernel_code.end     = virt_to_phys(_etext - 1);
        kernel_data.start   = virt_to_phys(_sdata);
        kernel_data.end     = virt_to_phys(_end - 1);
 
-       for (i = 0; i < mi->nr_banks; i++) {
-               if (mi->bank[i].size == 0)
-                       continue;
-
+       for_each_memblock(memory, region) {
                res = alloc_bootmem_low(sizeof(*res));
                res->name  = "System RAM";
-               res->start = mi->bank[i].start;
-               res->end   = mi->bank[i].start + mi->bank[i].size - 1;
+               res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region));
+               res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1;
                res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
 
                request_resource(&iomem_resource, res);
@@ -650,15 +646,17 @@ static int __init parse_tag_revision(const struct tag *tag)
 
 __tagtable(ATAG_REVISION, parse_tag_revision);
 
-#ifndef CONFIG_CMDLINE_FORCE
 static int __init parse_tag_cmdline(const struct tag *tag)
 {
+#ifndef CONFIG_CMDLINE_FORCE
        strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE);
+#else
+       pr_warning("Ignoring tag cmdline (using the default kernel command line)\n");
+#endif /* CONFIG_CMDLINE_FORCE */
        return 0;
 }
 
 __tagtable(ATAG_CMDLINE, parse_tag_cmdline);
-#endif /* CONFIG_CMDLINE_FORCE */
 
 /*
  * Scan the tag table for this tag, and call its parse function.
@@ -857,7 +855,7 @@ void __init setup_arch(char **cmdline_p)
        arm_memblock_init(&meminfo, mdesc);
 
        paging_init(mdesc);
-       request_standard_resources(&meminfo, mdesc);
+       request_standard_resources(mdesc);
 
 #ifdef CONFIG_SMP
        if (is_smp())
index dd790745b3ef7f1cabcba28d03c7e6acdbc6b2e4..fd9156698ab93798244f4560f9a4983e69d12e94 100644 (file)
@@ -114,7 +114,7 @@ static void __cpuinit twd_calibrate_rate(void)
                twd_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5);
 
                printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000,
-                       (twd_timer_rate / 100000) % 100);
+                       (twd_timer_rate / 1000000) % 100);
        }
 
        load = twd_timer_rate / HZ;
index c2e112e1a05fbf0d4485db1236448653e25aa8cc..381d23a497c16b2f682da4b7a81c42af92ae9f70 100644 (file)
@@ -94,10 +94,13 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
        if (tsk != current) {
 #ifdef CONFIG_SMP
                /*
-                * What guarantees do we have here that 'tsk'
-                * is not running on another CPU?
+                * What guarantees do we have here that 'tsk' is not
+                * running on another CPU?  For now, ignore it as we
+                * can't guarantee we won't explode.
                 */
-               BUG();
+               if (trace->nr_entries < trace->max_entries)
+                       trace->entries[trace->nr_entries++] = ULONG_MAX;
+               return;
 #else
                data.no_sched_functions = 1;
                frame.fp = thread_saved_fp(tsk);
index f1e2eb19a67d40b9fd71166da0e46c21be72e124..3d76bf2337347fb24b7b4b0783a8f4911ca3c518 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <asm/leds.h>
 #include <asm/thread_info.h>
+#include <asm/sched_clock.h>
 #include <asm/stacktrace.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
@@ -163,5 +164,8 @@ void __init time_init(void)
 {
        system_timer = machine_desc->timer;
        system_timer->init();
+#ifdef CONFIG_HAVE_SCHED_CLOCK
+       sched_clock_postinit();
+#endif
 }
 
index 8d6a8762ab889fdc1d2ef165c9733a92393e7c9a..3c9a05c8d20b27a8054bebc5fed19f89ca03500e 100644 (file)
@@ -25,11 +25,15 @@ ENTRY(__udelay)
                ldr     r2, .LC1
                mul     r0, r2, r0
 ENTRY(__const_udelay)                          @ 0 <= r0 <= 0x7fffff06
+               mov     r1, #-1
                ldr     r2, .LC0
                ldr     r2, [r2]                @ max = 0x01ffffff
+               add     r0, r0, r1, lsr #32-14
                mov     r0, r0, lsr #14         @ max = 0x0001ffff
+               add     r2, r2, r1, lsr #32-10
                mov     r2, r2, lsr #10         @ max = 0x00007fff
                mul     r0, r2, r0              @ max = 2^32-1
+               add     r0, r0, r1, lsr #32-6
                movs    r0, r0, lsr #6
                moveq   pc, lr
 
index 79f0b896e446c6023ce53e2c6df71232c710644b..629454d71c8d626047b934d16f1891b25546af35 100644 (file)
@@ -23,7 +23,6 @@
 #include <asm/types.h>
 #include <asm/mach-types.h>
 #include <asm/page.h>
-#include <asm/pgtable.h>
 #include <asm/mach/arch.h>
 #include <mach/hardware.h>
 #include "common.h"
index cc28b1efe0472e23e382a84ee016743f04e10995..e9f46b6963546dddb70005045d0c70afda335678 100644 (file)
@@ -23,7 +23,6 @@
 #include <asm/types.h>
 #include <asm/mach-types.h>
 #include <asm/page.h>
-#include <asm/pgtable.h>
 #include <asm/mach/arch.h>
 #include <mach/irqs.h>
 #include <mach/hardware.h>
index a3fbcb3adc2959fbcf6e2437a94ea018b75fa7c7..fbb4577798954717775016c34c9aa49b734c17fe 100644 (file)
@@ -173,7 +173,7 @@ static unsigned int integrator_get(unsigned int cpu)
 
        if (machine_is_integrator()) {
                vco.s = (cm_osc >> 8) & 7;
-       } else if (machine_is_cintegrator()) {
+       } else {
                vco.s = 1;
        }
        vco.v = cm_osc & 255;
index d6e15f71fc09541514b3b803ba2488973b7f6ad6..f5d91efc2965a81053ad87573b4fe49a8c423bb9 100644 (file)
@@ -22,7 +22,6 @@
 
 #include <mach/hardware.h>
 #include <asm/system.h>
-#include <asm/pgtable.h>
 #include <asm/mach/map.h>
 #include <asm/mach-types.h>
 
index afa5392d9fc0ed3900562e6fd2125b3e3ff990cd..c24235c89eedd87adebdbf3da0f03713c63a02f1 100644 (file)
@@ -30,10 +30,10 @@ static inline void cpu_enter_lowpower(void)
         * Turn off coherency
         */
        "       mrc     p15, 0, %0, c1, c0, 1\n"
-       "       bic     %0, %0, %2\n"
+       "       bic     %0, %0, #0x20\n"
        "       mcr     p15, 0, %0, c1, c0, 1\n"
        "       mrc     p15, 0, %0, c1, c0, 0\n"
-       "       bic     %0, %0, #0x04\n"
+       "       bic     %0, %0, %2\n"
        "       mcr     p15, 0, %0, c1, c0, 0\n"
          : "=&r" (v)
          : "r" (0), "Ir" (CR_C)
index 59d14f0fdcf8d1af2c5d5f837cc70bba37be99f8..e21f3470eeceeb0d40a89e856400c40fc3a9b104 100644 (file)
@@ -21,7 +21,6 @@
 #include <asm/div64.h>
 #include <mach/hardware.h>
 #include <asm/system.h>
-#include <asm/pgtable.h>
 #include <asm/mach/map.h>
 #include <asm/mach/flash.h>
 #include <asm/irq.h>
index a5cb1ce76ff2a5be2a43fe398bb64f37423d4acd..f3294040d357d5b5cd53fe7bd7c943a7061f26fb 100644 (file)
@@ -26,10 +26,10 @@ static inline void cpu_enter_lowpower(void)
         * Turn off coherency
         */
        "       mrc     p15, 0, %0, c1, c0, 1\n"
-       "       bic     %0, %0, %2\n"
+       "       bic     %0, %0, #0x20\n"
        "       mcr     p15, 0, %0, c1, c0, 1\n"
        "       mrc     p15, 0, %0, c1, c0, 0\n"
-       "       bic     %0, %0, #0x04\n"
+       "       bic     %0, %0, %2\n"
        "       mcr     p15, 0, %0, c1, c0, 0\n"
          : "=&r" (v)
          : "r" (0), "Ir" (CR_C)
index 6b48e0a3d7aaaff0f8c65c3e60f1bae017873d51..4771dba6144811919dc800627a4d6b860bd3b84a 100644 (file)
@@ -577,7 +577,7 @@ EXPORT_SYMBOL(dma_map_sg);
  * dma_unmap_sg - unmap a set of SG buffers mapped by dma_map_sg
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @sg: list of buffers
- * @nents: number of buffers to unmap (returned from dma_map_sg)
+ * @nents: number of buffers to unmap (same as was passed to dma_map_sg)
  * @dir: DMA transfer direction (same as was passed to dma_map_sg)
  *
  * Unmap a set of streaming mode DMA translations.  Again, CPU access
index b49fab21517c04b1f0d7476571a05b7133ca4826..0c1172b56b4ed28b3a4970c6984c991252402d8f 100644 (file)
@@ -159,7 +159,9 @@ ENTRY(cpu_v7_set_pte_ext)
        tstne   r1, #L_PTE_PRESENT
        moveq   r3, #0
 
-       str     r3, [r0, #2048]!
+ ARM(  str     r3, [r0, #2048]! )
+ THUMB(        add     r0, r0, #2048 )
+ THUMB(        str     r3, [r0] )
        mcr     p15, 0, r0, c7, c10, 1          @ flush_pte
 #endif
        mov     pc, lr
index 0c99de0562ca7ccfd4a144d0b348c76b58073256..b358d045f130bf03b55921a8e8ac01c6113f46a4 100644 (file)
@@ -483,7 +483,7 @@ static void ep93xxfb_dealloc_videomem(struct fb_info *info)
                                  info->screen_base, info->fix.smem_start);
 }
 
-static int __init ep93xxfb_probe(struct platform_device *pdev)
+static int __devinit ep93xxfb_probe(struct platform_device *pdev)
 {
        struct ep93xxfb_mach_info *mach_info = pdev->dev.platform_data;
        struct fb_info *info;
@@ -598,7 +598,7 @@ failed:
        return err;
 }
 
-static int ep93xxfb_remove(struct platform_device *pdev)
+static int __devexit ep93xxfb_remove(struct platform_device *pdev)
 {
        struct fb_info *info = platform_get_drvdata(pdev);
        struct ep93xx_fbi *fbi = info->par;
@@ -622,7 +622,7 @@ static int ep93xxfb_remove(struct platform_device *pdev)
 
 static struct platform_driver ep93xxfb_driver = {
        .probe          = ep93xxfb_probe,
-       .remove         = ep93xxfb_remove,
+       .remove         = __devexit_p(ep93xxfb_remove),
        .driver = {
                .name   = "ep93xx-fb",
                .owner  = THIS_MODULE,