aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc64/kernel/hvtramp.S4
-rw-r--r--arch/sparc64/kernel/iommu.c3
-rw-r--r--arch/sparc64/kernel/kprobes.c2
-rw-r--r--arch/sparc64/kernel/power.c3
-rw-r--r--arch/sparc64/kernel/process.c77
-rw-r--r--arch/sparc64/kernel/smp.c2
-rw-r--r--arch/sparc64/kernel/trampoline.S4
-rw-r--r--arch/sparc64/kernel/traps.c2
8 files changed, 13 insertions, 84 deletions
diff --git a/arch/sparc64/kernel/hvtramp.S b/arch/sparc64/kernel/hvtramp.S
index b692e044a463..0236c43772fa 100644
--- a/arch/sparc64/kernel/hvtramp.S
+++ b/arch/sparc64/kernel/hvtramp.S
@@ -3,6 +3,8 @@
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net> 3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
4 */ 4 */
5 5
6#include <linux/init.h>
7
6#include <asm/thread_info.h> 8#include <asm/thread_info.h>
7#include <asm/hypervisor.h> 9#include <asm/hypervisor.h>
8#include <asm/scratchpad.h> 10#include <asm/scratchpad.h>
@@ -13,7 +15,7 @@
13#include <asm/head.h> 15#include <asm/head.h>
14#include <asm/asi.h> 16#include <asm/asi.h>
15 17
16 .text 18 __CPUINIT
17 .align 8 19 .align 8
18 .globl hv_cpu_startup, hv_cpu_startup_end 20 .globl hv_cpu_startup, hv_cpu_startup_end
19 21
diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c
index 0e347ff812a3..fbaab3497bfd 100644
--- a/arch/sparc64/kernel/iommu.c
+++ b/arch/sparc64/kernel/iommu.c
@@ -134,7 +134,8 @@ unsigned long iommu_range_alloc(struct device *dev,
134 else 134 else
135 boundary_size = ALIGN(1UL << 32, 1 << IO_PAGE_SHIFT); 135 boundary_size = ALIGN(1UL << 32, 1 << IO_PAGE_SHIFT);
136 136
137 n = iommu_area_alloc(arena->map, limit, start, npages, 0, 137 n = iommu_area_alloc(arena->map, limit, start, npages,
138 iommu->page_table_map_base >> IO_PAGE_SHIFT,
138 boundary_size >> IO_PAGE_SHIFT, 0); 139 boundary_size >> IO_PAGE_SHIFT, 0);
139 if (n == -1) { 140 if (n == -1) {
140 if (likely(pass < 1)) { 141 if (likely(pass < 1)) {
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c
index 34fc3ddd5002..f43b5d755354 100644
--- a/arch/sparc64/kernel/kprobes.c
+++ b/arch/sparc64/kernel/kprobes.c
@@ -465,8 +465,6 @@ void __kprobes jprobe_return(void)
465 465
466extern void jprobe_return_trap_instruction(void); 466extern void jprobe_return_trap_instruction(void);
467 467
468extern void __show_regs(struct pt_regs * regs);
469
470int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) 468int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
471{ 469{
472 u32 *addr = (u32 *) regs->tpc; 470 u32 *addr = (u32 *) regs->tpc;
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c
index 850cdffdd69c..eae8ca2a6ba5 100644
--- a/arch/sparc64/kernel/power.c
+++ b/arch/sparc64/kernel/power.c
@@ -20,6 +20,7 @@
20#include <asm/of_device.h> 20#include <asm/of_device.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/sstate.h> 22#include <asm/sstate.h>
23#include <asm/reboot.h>
23 24
24#include <linux/unistd.h> 25#include <linux/unistd.h>
25 26
@@ -39,8 +40,6 @@ static irqreturn_t power_handler(int irq, void *dev_id)
39 return IRQ_HANDLED; 40 return IRQ_HANDLED;
40} 41}
41 42
42extern void machine_halt(void);
43extern void machine_alt_power_off(void);
44static void (*poweroff_method)(void) = machine_alt_power_off; 43static void (*poweroff_method)(void) = machine_alt_power_off;
45 44
46void machine_power_off(void) 45void machine_power_off(void)
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index 6eceac51ae62..2aafce7dfc0e 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -30,6 +30,7 @@
30#include <linux/tick.h> 30#include <linux/tick.h>
31#include <linux/init.h> 31#include <linux/init.h>
32#include <linux/cpu.h> 32#include <linux/cpu.h>
33#include <linux/elfcore.h>
33 34
34#include <asm/oplib.h> 35#include <asm/oplib.h>
35#include <asm/uaccess.h> 36#include <asm/uaccess.h>
@@ -47,6 +48,8 @@
47#include <asm/unistd.h> 48#include <asm/unistd.h>
48#include <asm/hypervisor.h> 49#include <asm/hypervisor.h>
49#include <asm/sstate.h> 50#include <asm/sstate.h>
51#include <asm/reboot.h>
52#include <asm/syscalls.h>
50 53
51/* #define VERBOSE_SHOWREGS */ 54/* #define VERBOSE_SHOWREGS */
52 55
@@ -211,62 +214,6 @@ static void show_regwindow(struct pt_regs *regs)
211 print_symbol("I7: <%s>\n", rwk->ins[7]); 214 print_symbol("I7: <%s>\n", rwk->ins[7]);
212} 215}
213 216
214void show_stackframe(struct sparc_stackf *sf)
215{
216 unsigned long size;
217 unsigned long *stk;
218 int i;
219
220 printk("l0: %016lx l1: %016lx l2: %016lx l3: %016lx\n"
221 "l4: %016lx l5: %016lx l6: %016lx l7: %016lx\n",
222 sf->locals[0], sf->locals[1], sf->locals[2], sf->locals[3],
223 sf->locals[4], sf->locals[5], sf->locals[6], sf->locals[7]);
224 printk("i0: %016lx i1: %016lx i2: %016lx i3: %016lx\n"
225 "i4: %016lx i5: %016lx fp: %016lx ret_pc: %016lx\n",
226 sf->ins[0], sf->ins[1], sf->ins[2], sf->ins[3],
227 sf->ins[4], sf->ins[5], (unsigned long)sf->fp, sf->callers_pc);
228 printk("sp: %016lx x0: %016lx x1: %016lx x2: %016lx\n"
229 "x3: %016lx x4: %016lx x5: %016lx xx: %016lx\n",
230 (unsigned long)sf->structptr, sf->xargs[0], sf->xargs[1],
231 sf->xargs[2], sf->xargs[3], sf->xargs[4], sf->xargs[5],
232 sf->xxargs[0]);
233 size = ((unsigned long)sf->fp) - ((unsigned long)sf);
234 size -= STACKFRAME_SZ;
235 stk = (unsigned long *)((unsigned long)sf + STACKFRAME_SZ);
236 i = 0;
237 do {
238 printk("s%d: %016lx\n", i++, *stk++);
239 } while ((size -= sizeof(unsigned long)));
240}
241
242void show_stackframe32(struct sparc_stackf32 *sf)
243{
244 unsigned long size;
245 unsigned *stk;
246 int i;
247
248 printk("l0: %08x l1: %08x l2: %08x l3: %08x\n",
249 sf->locals[0], sf->locals[1], sf->locals[2], sf->locals[3]);
250 printk("l4: %08x l5: %08x l6: %08x l7: %08x\n",
251 sf->locals[4], sf->locals[5], sf->locals[6], sf->locals[7]);
252 printk("i0: %08x i1: %08x i2: %08x i3: %08x\n",
253 sf->ins[0], sf->ins[1], sf->ins[2], sf->ins[3]);
254 printk("i4: %08x i5: %08x fp: %08x ret_pc: %08x\n",
255 sf->ins[4], sf->ins[5], sf->fp, sf->callers_pc);
256 printk("sp: %08x x0: %08x x1: %08x x2: %08x\n"
257 "x3: %08x x4: %08x x5: %08x xx: %08x\n",
258 sf->structptr, sf->xargs[0], sf->xargs[1],
259 sf->xargs[2], sf->xargs[3], sf->xargs[4], sf->xargs[5],
260 sf->xxargs[0]);
261 size = ((unsigned long)sf->fp) - ((unsigned long)sf);
262 size -= STACKFRAME32_SZ;
263 stk = (unsigned *)((unsigned long)sf + STACKFRAME32_SZ);
264 i = 0;
265 do {
266 printk("s%d: %08x\n", i++, *stk++);
267 } while ((size -= sizeof(unsigned)));
268}
269
270#ifdef CONFIG_SMP 217#ifdef CONFIG_SMP
271static DEFINE_SPINLOCK(regdump_lock); 218static DEFINE_SPINLOCK(regdump_lock);
272#endif 219#endif
@@ -354,24 +301,6 @@ void show_regs(struct pt_regs *regs)
354#endif 301#endif
355} 302}
356 303
357void show_regs32(struct pt_regs32 *regs)
358{
359 printk("PSR: %08x PC: %08x NPC: %08x Y: %08x %s\n", regs->psr,
360 regs->pc, regs->npc, regs->y, print_tainted());
361 printk("g0: %08x g1: %08x g2: %08x g3: %08x ",
362 regs->u_regs[0], regs->u_regs[1], regs->u_regs[2],
363 regs->u_regs[3]);
364 printk("g4: %08x g5: %08x g6: %08x g7: %08x\n",
365 regs->u_regs[4], regs->u_regs[5], regs->u_regs[6],
366 regs->u_regs[7]);
367 printk("o0: %08x o1: %08x o2: %08x o3: %08x ",
368 regs->u_regs[8], regs->u_regs[9], regs->u_regs[10],
369 regs->u_regs[11]);
370 printk("o4: %08x o5: %08x sp: %08x ret_pc: %08x\n",
371 regs->u_regs[12], regs->u_regs[13], regs->u_regs[14],
372 regs->u_regs[15]);
373}
374
375unsigned long thread_saved_pc(struct task_struct *tsk) 304unsigned long thread_saved_pc(struct task_struct *tsk)
376{ 305{
377 struct thread_info *ti = task_thread_info(tsk); 306 struct thread_info *ti = task_thread_info(tsk);
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index a8052b76df41..cc454731d879 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -86,7 +86,7 @@ extern void setup_sparc64_timer(void);
86 86
87static volatile unsigned long callin_flag = 0; 87static volatile unsigned long callin_flag = 0;
88 88
89void __devinit smp_callin(void) 89void __cpuinit smp_callin(void)
90{ 90{
91 int cpuid = hard_smp_processor_id(); 91 int cpuid = hard_smp_processor_id();
92 92
diff --git a/arch/sparc64/kernel/trampoline.S b/arch/sparc64/kernel/trampoline.S
index 04e81dda13d0..4ae2e525d68b 100644
--- a/arch/sparc64/kernel/trampoline.S
+++ b/arch/sparc64/kernel/trampoline.S
@@ -4,6 +4,8 @@
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
5 */ 5 */
6 6
7#include <linux/init.h>
8
7#include <asm/head.h> 9#include <asm/head.h>
8#include <asm/asi.h> 10#include <asm/asi.h>
9#include <asm/lsu.h> 11#include <asm/lsu.h>
@@ -36,7 +38,7 @@ dtlb_load:
36tramp_stack: 38tramp_stack:
37 .skip TRAMP_STACK_SIZE 39 .skip TRAMP_STACK_SIZE
38 40
39 .text 41 __CPUINIT
40 .align 8 42 .align 8
41 .globl sparc64_cpu_startup, sparc64_cpu_startup_end 43 .globl sparc64_cpu_startup, sparc64_cpu_startup_end
42sparc64_cpu_startup: 44sparc64_cpu_startup:
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index 2b6abf633343..007f5317c0de 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -1791,8 +1791,6 @@ static const char *sun4v_err_type_to_str(u32 type)
1791 }; 1791 };
1792} 1792}
1793 1793
1794extern void __show_regs(struct pt_regs * regs);
1795
1796static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, int cpu, const char *pfx, atomic_t *ocnt) 1794static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, int cpu, const char *pfx, atomic_t *ocnt)
1797{ 1795{
1798 int cnt; 1796 int cnt;