Commit 65e5d002 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm

* '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
parents 38567333 cb4d3eae
...@@ -1281,7 +1281,7 @@ config SMP ...@@ -1281,7 +1281,7 @@ config SMP
config SMP_ON_UP config SMP_ON_UP
bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)" bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)"
depends on EXPERIMENTAL depends on EXPERIMENTAL
depends on SMP && !XIP depends on SMP && !XIP_KERNEL
default y default y
help help
SMP kernels contain instructions which fail on non-SMP processors. SMP kernels contain instructions which fail on non-SMP processors.
......
...@@ -285,7 +285,7 @@ static inline int fls(int x) ...@@ -285,7 +285,7 @@ static inline int fls(int x)
if (__builtin_constant_p(x)) if (__builtin_constant_p(x))
return constant_fls(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; ret = 32 - ret;
return ret; return ret;
} }
......
...@@ -115,4 +115,6 @@ static inline void init_fixed_sched_clock(struct clock_data *cd, ...@@ -115,4 +115,6 @@ static inline void init_fixed_sched_clock(struct clock_data *cd,
} }
} }
extern void sched_clock_postinit(void);
#endif #endif
...@@ -60,6 +60,8 @@ str_a1: .asciz "\nError: unrecognized/unsupported machine ID (r1 = 0x" ...@@ -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_a2: .asciz ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n"
str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n" str_a3: .asciz "\nPlease check your kernel config and/or bootloader.\n"
.align .align
#else
b __error
#endif #endif
/* /*
......
...@@ -483,6 +483,7 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) ...@@ -483,6 +483,7 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
return randomize_range(mm->brk, range_end, 0) ? : mm->brk; return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
} }
#ifdef CONFIG_MMU
/* /*
* The vectors page is always readable from user space for the * The vectors page is always readable from user space for the
* atomic helpers and the signal restart code. Let's declare a mapping * 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) ...@@ -503,3 +504,4 @@ const char *arch_vma_name(struct vm_area_struct *vma)
{ {
return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL; return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL;
} }
#endif
...@@ -34,7 +34,7 @@ void __init init_sched_clock(struct clock_data *cd, void (*update)(void), ...@@ -34,7 +34,7 @@ void __init init_sched_clock(struct clock_data *cd, void (*update)(void),
sched_clock_update_fn = update; sched_clock_update_fn = update;
/* calculate the mult/shift to convert counter ticks to ns. */ /* 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; r = rate;
if (r >= 4000000) { if (r >= 4000000) {
...@@ -60,10 +60,15 @@ void __init init_sched_clock(struct clock_data *cd, void (*update)(void), ...@@ -60,10 +60,15 @@ void __init init_sched_clock(struct clock_data *cd, void (*update)(void),
* sets the initial epoch. * sets the initial epoch.
*/ */
sched_clock_timer.data = msecs_to_jiffies(w - (w / 10)); 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 * Ensure that sched_clock() starts off at 0ns
*/ */
cd->epoch_ns = 0; cd->epoch_ns = 0;
} }
void __init sched_clock_postinit(void)
{
sched_clock_poll(sched_clock_timer.data);
}
...@@ -518,25 +518,21 @@ setup_ramdisk(int doload, int prompt, int image_start, unsigned int rd_sz) ...@@ -518,25 +518,21 @@ setup_ramdisk(int doload, int prompt, int image_start, unsigned int rd_sz)
#endif #endif
} }
static void __init static void __init request_standard_resources(struct machine_desc *mdesc)
request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc)
{ {
struct memblock_region *region;
struct resource *res; struct resource *res;
int i;
kernel_code.start = virt_to_phys(_text); kernel_code.start = virt_to_phys(_text);
kernel_code.end = virt_to_phys(_etext - 1); kernel_code.end = virt_to_phys(_etext - 1);
kernel_data.start = virt_to_phys(_sdata); kernel_data.start = virt_to_phys(_sdata);
kernel_data.end = virt_to_phys(_end - 1); kernel_data.end = virt_to_phys(_end - 1);
for (i = 0; i < mi->nr_banks; i++) { for_each_memblock(memory, region) {
if (mi->bank[i].size == 0)
continue;
res = alloc_bootmem_low(sizeof(*res)); res = alloc_bootmem_low(sizeof(*res));
res->name = "System RAM"; res->name = "System RAM";
res->start = mi->bank[i].start; res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region));
res->end = mi->bank[i].start + mi->bank[i].size - 1; res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1;
res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
request_resource(&iomem_resource, res); request_resource(&iomem_resource, res);
...@@ -650,15 +646,17 @@ static int __init parse_tag_revision(const struct tag *tag) ...@@ -650,15 +646,17 @@ static int __init parse_tag_revision(const struct tag *tag)
__tagtable(ATAG_REVISION, parse_tag_revision); __tagtable(ATAG_REVISION, parse_tag_revision);
#ifndef CONFIG_CMDLINE_FORCE
static int __init parse_tag_cmdline(const struct tag *tag) 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); 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; return 0;
} }
__tagtable(ATAG_CMDLINE, parse_tag_cmdline); __tagtable(ATAG_CMDLINE, parse_tag_cmdline);
#endif /* CONFIG_CMDLINE_FORCE */
/* /*
* Scan the tag table for this tag, and call its parse function. * Scan the tag table for this tag, and call its parse function.
...@@ -857,7 +855,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -857,7 +855,7 @@ void __init setup_arch(char **cmdline_p)
arm_memblock_init(&meminfo, mdesc); arm_memblock_init(&meminfo, mdesc);
paging_init(mdesc); paging_init(mdesc);
request_standard_resources(&meminfo, mdesc); request_standard_resources(mdesc);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (is_smp()) if (is_smp())
......
...@@ -114,7 +114,7 @@ static void __cpuinit twd_calibrate_rate(void) ...@@ -114,7 +114,7 @@ static void __cpuinit twd_calibrate_rate(void)
twd_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5); twd_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5);
printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000, printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000,
(twd_timer_rate / 100000) % 100); (twd_timer_rate / 1000000) % 100);
} }
load = twd_timer_rate / HZ; load = twd_timer_rate / HZ;
......
...@@ -94,10 +94,13 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) ...@@ -94,10 +94,13 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
if (tsk != current) { if (tsk != current) {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* /*
* What guarantees do we have here that 'tsk' * What guarantees do we have here that 'tsk' is not
* is not running on another CPU? * 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 #else
data.no_sched_functions = 1; data.no_sched_functions = 1;
frame.fp = thread_saved_fp(tsk); frame.fp = thread_saved_fp(tsk);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <asm/leds.h> #include <asm/leds.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/sched_clock.h>
#include <asm/stacktrace.h> #include <asm/stacktrace.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
...@@ -163,5 +164,8 @@ void __init time_init(void) ...@@ -163,5 +164,8 @@ void __init time_init(void)
{ {
system_timer = machine_desc->timer; system_timer = machine_desc->timer;
system_timer->init(); system_timer->init();
#ifdef CONFIG_HAVE_SCHED_CLOCK
sched_clock_postinit();
#endif
} }
...@@ -25,11 +25,15 @@ ENTRY(__udelay) ...@@ -25,11 +25,15 @@ ENTRY(__udelay)
ldr r2, .LC1 ldr r2, .LC1
mul r0, r2, r0 mul r0, r2, r0
ENTRY(__const_udelay) @ 0 <= r0 <= 0x7fffff06 ENTRY(__const_udelay) @ 0 <= r0 <= 0x7fffff06
mov r1, #-1
ldr r2, .LC0 ldr r2, .LC0
ldr r2, [r2] @ max = 0x01ffffff ldr r2, [r2] @ max = 0x01ffffff
add r0, r0, r1, lsr #32-14
mov r0, r0, lsr #14 @ max = 0x0001ffff mov r0, r0, lsr #14 @ max = 0x0001ffff
add r2, r2, r1, lsr #32-10
mov r2, r2, lsr #10 @ max = 0x00007fff mov r2, r2, lsr #10 @ max = 0x00007fff
mul r0, r2, r0 @ max = 2^32-1 mul r0, r2, r0 @ max = 2^32-1
add r0, r0, r1, lsr #32-6
movs r0, r0, lsr #6 movs r0, r0, lsr #6
moveq pc, lr moveq pc, lr
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <asm/types.h> #include <asm/types.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include "common.h" #include "common.h"
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <asm/types.h> #include <asm/types.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <mach/irqs.h> #include <mach/irqs.h>
#include <mach/hardware.h> #include <mach/hardware.h>
......
...@@ -173,7 +173,7 @@ static unsigned int integrator_get(unsigned int cpu) ...@@ -173,7 +173,7 @@ static unsigned int integrator_get(unsigned int cpu)
if (machine_is_integrator()) { if (machine_is_integrator()) {
vco.s = (cm_osc >> 8) & 7; vco.s = (cm_osc >> 8) & 7;
} else if (machine_is_cintegrator()) { } else {
vco.s = 1; vco.s = 1;
} }
vco.v = cm_osc & 255; vco.v = cm_osc & 255;
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
......
...@@ -30,10 +30,10 @@ static inline void cpu_enter_lowpower(void) ...@@ -30,10 +30,10 @@ static inline void cpu_enter_lowpower(void)
* Turn off coherency * Turn off coherency
*/ */
" mrc p15, 0, %0, c1, c0, 1\n" " 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" " mcr p15, 0, %0, c1, c0, 1\n"
" mrc p15, 0, %0, c1, c0, 0\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" " mcr p15, 0, %0, c1, c0, 0\n"
: "=&r" (v) : "=&r" (v)
: "r" (0), "Ir" (CR_C) : "r" (0), "Ir" (CR_C)
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <asm/div64.h> #include <asm/div64.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/flash.h> #include <asm/mach/flash.h>
#include <asm/irq.h> #include <asm/irq.h>
......
...@@ -26,10 +26,10 @@ static inline void cpu_enter_lowpower(void) ...@@ -26,10 +26,10 @@ static inline void cpu_enter_lowpower(void)
* Turn off coherency * Turn off coherency
*/ */
" mrc p15, 0, %0, c1, c0, 1\n" " 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" " mcr p15, 0, %0, c1, c0, 1\n"
" mrc p15, 0, %0, c1, c0, 0\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" " mcr p15, 0, %0, c1, c0, 0\n"
: "=&r" (v) : "=&r" (v)
: "r" (0), "Ir" (CR_C) : "r" (0), "Ir" (CR_C)
......
...@@ -577,7 +577,7 @@ EXPORT_SYMBOL(dma_map_sg); ...@@ -577,7 +577,7 @@ EXPORT_SYMBOL(dma_map_sg);
* dma_unmap_sg - unmap a set of SG buffers mapped by 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 * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
* @sg: list of buffers * @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) * @dir: DMA transfer direction (same as was passed to dma_map_sg)
* *
* Unmap a set of streaming mode DMA translations. Again, CPU access * Unmap a set of streaming mode DMA translations. Again, CPU access
......
...@@ -159,7 +159,9 @@ ENTRY(cpu_v7_set_pte_ext) ...@@ -159,7 +159,9 @@ ENTRY(cpu_v7_set_pte_ext)
tstne r1, #L_PTE_PRESENT tstne r1, #L_PTE_PRESENT
moveq r3, #0 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 mcr p15, 0, r0, c7, c10, 1 @ flush_pte
#endif #endif
mov pc, lr mov pc, lr
......
...@@ -483,7 +483,7 @@ static void ep93xxfb_dealloc_videomem(struct fb_info *info) ...@@ -483,7 +483,7 @@ static void ep93xxfb_dealloc_videomem(struct fb_info *info)
info->screen_base, info->fix.smem_start); 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 ep93xxfb_mach_info *mach_info = pdev->dev.platform_data;
struct fb_info *info; struct fb_info *info;
...@@ -598,7 +598,7 @@ static int __init ep93xxfb_probe(struct platform_device *pdev) ...@@ -598,7 +598,7 @@ static int __init ep93xxfb_probe(struct platform_device *pdev)
return err; 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 fb_info *info = platform_get_drvdata(pdev);
struct ep93xx_fbi *fbi = info->par; struct ep93xx_fbi *fbi = info->par;
...@@ -622,7 +622,7 @@ static int ep93xxfb_remove(struct platform_device *pdev) ...@@ -622,7 +622,7 @@ static int ep93xxfb_remove(struct platform_device *pdev)
static struct platform_driver ep93xxfb_driver = { static struct platform_driver ep93xxfb_driver = {
.probe = ep93xxfb_probe, .probe = ep93xxfb_probe,
.remove = ep93xxfb_remove, .remove = __devexit_p(ep93xxfb_remove),
.driver = { .driver = {
.name = "ep93xx-fb", .name = "ep93xx-fb",
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment