aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/Makefile1
-rw-r--r--arch/arm/kernel/armksyms.c20
-rw-r--r--arch/arm/kernel/early_printk.c57
-rw-r--r--arch/arm/kernel/irq.c12
-rw-r--r--arch/arm/kernel/smp_twd.c1
-rw-r--r--arch/arm/kernel/vmlinux.lds.S13
6 files changed, 73 insertions, 31 deletions
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index e7ccf7e697ce..dd00f747e2ad 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -54,5 +54,6 @@ endif
54 54
55head-y := head$(MMUEXT).o 55head-y := head$(MMUEXT).o
56obj-$(CONFIG_DEBUG_LL) += debug.o 56obj-$(CONFIG_DEBUG_LL) += debug.o
57obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
57 58
58extra-y := $(head-y) init_task.o vmlinux.lds 59extra-y := $(head-y) init_task.o vmlinux.lds
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
index 0e627705f746..8214bfebfaca 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
@@ -48,27 +48,7 @@ extern void __aeabi_uidivmod(void);
48extern void __aeabi_ulcmp(void); 48extern void __aeabi_ulcmp(void);
49 49
50extern void fpundefinstr(void); 50extern void fpundefinstr(void);
51extern void fp_enter(void);
52 51
53/*
54 * This has a special calling convention; it doesn't
55 * modify any of the usual registers, except for LR.
56 */
57#define EXPORT_CRC_ALIAS(sym) __CRC_SYMBOL(sym, "")
58
59#define EXPORT_SYMBOL_ALIAS(sym,orig) \
60 EXPORT_CRC_ALIAS(sym) \
61 static const struct kernel_symbol __ksymtab_##sym \
62 __used __attribute__((section("__ksymtab"))) = \
63 { (unsigned long)&orig, #sym };
64
65/*
66 * floating point math emulator support.
67 * These symbols will never change their calling convention...
68 */
69EXPORT_SYMBOL_ALIAS(kern_fp_enter,fp_enter);
70EXPORT_SYMBOL_ALIAS(fp_printk,printk);
71EXPORT_SYMBOL_ALIAS(fp_send_sig,send_sig);
72 52
73EXPORT_SYMBOL(__backtrace); 53EXPORT_SYMBOL(__backtrace);
74 54
diff --git a/arch/arm/kernel/early_printk.c b/arch/arm/kernel/early_printk.c
new file mode 100644
index 000000000000..85aa2b292692
--- /dev/null
+++ b/arch/arm/kernel/early_printk.c
@@ -0,0 +1,57 @@
1/*
2 * linux/arch/arm/kernel/early_printk.c
3 *
4 * Copyright (C) 2009 Sascha Hauer <s.hauer@pengutronix.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/kernel.h>
12#include <linux/console.h>
13#include <linux/init.h>
14
15extern void printch(int);
16
17static void early_write(const char *s, unsigned n)
18{
19 while (n-- > 0) {
20 if (*s == '\n')
21 printch('\r');
22 printch(*s);
23 s++;
24 }
25}
26
27static void early_console_write(struct console *con, const char *s, unsigned n)
28{
29 early_write(s, n);
30}
31
32static struct console early_console = {
33 .name = "earlycon",
34 .write = early_console_write,
35 .flags = CON_PRINTBUFFER | CON_BOOT,
36 .index = -1,
37};
38
39asmlinkage void early_printk(const char *fmt, ...)
40{
41 char buf[512];
42 int n;
43 va_list ap;
44
45 va_start(ap, fmt);
46 n = vscnprintf(buf, sizeof(buf), fmt, ap);
47 early_write(buf, n);
48 va_end(ap);
49}
50
51static int __init setup_early_printk(char *buf)
52{
53 register_console(&early_console);
54 return 0;
55}
56
57early_param("earlyprintk", setup_early_printk);
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index c9a8619f3856..b7cb45bb91e8 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v)
69 } 69 }
70 70
71 if (i < NR_IRQS) { 71 if (i < NR_IRQS) {
72 spin_lock_irqsave(&irq_desc[i].lock, flags); 72 raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
73 action = irq_desc[i].action; 73 action = irq_desc[i].action;
74 if (!action) 74 if (!action)
75 goto unlock; 75 goto unlock;
@@ -84,7 +84,7 @@ int show_interrupts(struct seq_file *p, void *v)
84 84
85 seq_putc(p, '\n'); 85 seq_putc(p, '\n');
86unlock: 86unlock:
87 spin_unlock_irqrestore(&irq_desc[i].lock, flags); 87 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
88 } else if (i == NR_IRQS) { 88 } else if (i == NR_IRQS) {
89#ifdef CONFIG_FIQ 89#ifdef CONFIG_FIQ
90 show_fiq_list(p, v); 90 show_fiq_list(p, v);
@@ -139,7 +139,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)
139 } 139 }
140 140
141 desc = irq_desc + irq; 141 desc = irq_desc + irq;
142 spin_lock_irqsave(&desc->lock, flags); 142 raw_spin_lock_irqsave(&desc->lock, flags);
143 desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; 143 desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
144 if (iflags & IRQF_VALID) 144 if (iflags & IRQF_VALID)
145 desc->status &= ~IRQ_NOREQUEST; 145 desc->status &= ~IRQ_NOREQUEST;
@@ -147,7 +147,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)
147 desc->status &= ~IRQ_NOPROBE; 147 desc->status &= ~IRQ_NOPROBE;
148 if (!(iflags & IRQF_NOAUTOEN)) 148 if (!(iflags & IRQF_NOAUTOEN))
149 desc->status &= ~IRQ_NOAUTOEN; 149 desc->status &= ~IRQ_NOAUTOEN;
150 spin_unlock_irqrestore(&desc->lock, flags); 150 raw_spin_unlock_irqrestore(&desc->lock, flags);
151} 151}
152 152
153void __init init_IRQ(void) 153void __init init_IRQ(void)
@@ -166,9 +166,9 @@ static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu)
166{ 166{
167 pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->node, cpu); 167 pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->node, cpu);
168 168
169 spin_lock_irq(&desc->lock); 169 raw_spin_lock_irq(&desc->lock);
170 desc->chip->set_affinity(irq, cpumask_of(cpu)); 170 desc->chip->set_affinity(irq, cpumask_of(cpu));
171 spin_unlock_irq(&desc->lock); 171 raw_spin_unlock_irq(&desc->lock);
172} 172}
173 173
174/* 174/*
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index a73a34dccf2a..ea02a7b1c244 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -160,6 +160,7 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk)
160 160
161 /* Make sure our local interrupt controller has this enabled */ 161 /* Make sure our local interrupt controller has this enabled */
162 local_irq_save(flags); 162 local_irq_save(flags);
163 irq_to_desc(clk->irq)->status |= IRQ_NOPROBE;
163 get_irq_chip(clk->irq)->unmask(clk->irq); 164 get_irq_chip(clk->irq)->unmask(clk->irq);
164 local_irq_restore(flags); 165 local_irq_restore(flags);
165 166
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 71151bd87a36..4957e13ef55b 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -65,11 +65,11 @@ SECTIONS
65 __init_end = .; 65 __init_end = .;
66#endif 66#endif
67 67
68 /DISCARD/ : { /* Exit code and data */ 68 /*
69 EXIT_TEXT 69 * unwind exit sections must be discarded before the rest of the
70 EXIT_DATA 70 * unwind sections get included.
71 *(.exitcall.exit) 71 */
72 *(.discard) 72 /DISCARD/ : {
73 *(.ARM.exidx.exit.text) 73 *(.ARM.exidx.exit.text)
74 *(.ARM.extab.exit.text) 74 *(.ARM.extab.exit.text)
75#ifndef CONFIG_HOTPLUG_CPU 75#ifndef CONFIG_HOTPLUG_CPU
@@ -238,6 +238,9 @@ SECTIONS
238 238
239 STABS_DEBUG 239 STABS_DEBUG
240 .comment 0 : { *(.comment) } 240 .comment 0 : { *(.comment) }
241
242 /* Default discards */
243 DISCARDS
241} 244}
242 245
243/* 246/*