Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: make IOMMU code respect the segment boundary limits
  [SPARC64]: Fix cpu trampoline et al. mismatch warnings.
  [SPARC64]: More sparse warning fixes in process.c
  [SPARC64]: Fix sparse warning wrt. fault_in_user_windows.
  [SPARC64]: Kill show_regs32().
  [SPARC64]: Fix sparse warnings wrt. __show_regs().
  [SPARC64]: Kill show_stackframe{,32}().
  [SPARC64]: Fix sparse warnings wrt. machine_alt_power_off().
This commit is contained in:
Linus Torvalds 2008-02-23 21:00:21 -08:00
commit 85b80ebfa4
12 changed files with 34 additions and 84 deletions

View File

@ -3,6 +3,8 @@
* Copyright (C) 2007 David S. Miller <davem@davemloft.net>
*/
#include <linux/init.h>
#include <asm/thread_info.h>
#include <asm/hypervisor.h>
#include <asm/scratchpad.h>
@ -13,7 +15,7 @@
#include <asm/head.h>
#include <asm/asi.h>
.text
__CPUINIT
.align 8
.globl hv_cpu_startup, hv_cpu_startup_end

View File

@ -134,7 +134,8 @@ unsigned long iommu_range_alloc(struct device *dev,
else
boundary_size = ALIGN(1UL << 32, 1 << IO_PAGE_SHIFT);
n = iommu_area_alloc(arena->map, limit, start, npages, 0,
n = iommu_area_alloc(arena->map, limit, start, npages,
iommu->page_table_map_base >> IO_PAGE_SHIFT,
boundary_size >> IO_PAGE_SHIFT, 0);
if (n == -1) {
if (likely(pass < 1)) {

View File

@ -465,8 +465,6 @@ void __kprobes jprobe_return(void)
extern void jprobe_return_trap_instruction(void);
extern void __show_regs(struct pt_regs * regs);
int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
{
u32 *addr = (u32 *) regs->tpc;

View File

@ -20,6 +20,7 @@
#include <asm/of_device.h>
#include <asm/io.h>
#include <asm/sstate.h>
#include <asm/reboot.h>
#include <linux/unistd.h>
@ -39,8 +40,6 @@ static irqreturn_t power_handler(int irq, void *dev_id)
return IRQ_HANDLED;
}
extern void machine_halt(void);
extern void machine_alt_power_off(void);
static void (*poweroff_method)(void) = machine_alt_power_off;
void machine_power_off(void)

View File

@ -30,6 +30,7 @@
#include <linux/tick.h>
#include <linux/init.h>
#include <linux/cpu.h>
#include <linux/elfcore.h>
#include <asm/oplib.h>
#include <asm/uaccess.h>
@ -47,6 +48,8 @@
#include <asm/unistd.h>
#include <asm/hypervisor.h>
#include <asm/sstate.h>
#include <asm/reboot.h>
#include <asm/syscalls.h>
/* #define VERBOSE_SHOWREGS */
@ -211,62 +214,6 @@ static void show_regwindow(struct pt_regs *regs)
print_symbol("I7: <%s>\n", rwk->ins[7]);
}
void show_stackframe(struct sparc_stackf *sf)
{
unsigned long size;
unsigned long *stk;
int i;
printk("l0: %016lx l1: %016lx l2: %016lx l3: %016lx\n"
"l4: %016lx l5: %016lx l6: %016lx l7: %016lx\n",
sf->locals[0], sf->locals[1], sf->locals[2], sf->locals[3],
sf->locals[4], sf->locals[5], sf->locals[6], sf->locals[7]);
printk("i0: %016lx i1: %016lx i2: %016lx i3: %016lx\n"
"i4: %016lx i5: %016lx fp: %016lx ret_pc: %016lx\n",
sf->ins[0], sf->ins[1], sf->ins[2], sf->ins[3],
sf->ins[4], sf->ins[5], (unsigned long)sf->fp, sf->callers_pc);
printk("sp: %016lx x0: %016lx x1: %016lx x2: %016lx\n"
"x3: %016lx x4: %016lx x5: %016lx xx: %016lx\n",
(unsigned long)sf->structptr, sf->xargs[0], sf->xargs[1],
sf->xargs[2], sf->xargs[3], sf->xargs[4], sf->xargs[5],
sf->xxargs[0]);
size = ((unsigned long)sf->fp) - ((unsigned long)sf);
size -= STACKFRAME_SZ;
stk = (unsigned long *)((unsigned long)sf + STACKFRAME_SZ);
i = 0;
do {
printk("s%d: %016lx\n", i++, *stk++);
} while ((size -= sizeof(unsigned long)));
}
void show_stackframe32(struct sparc_stackf32 *sf)
{
unsigned long size;
unsigned *stk;
int i;
printk("l0: %08x l1: %08x l2: %08x l3: %08x\n",
sf->locals[0], sf->locals[1], sf->locals[2], sf->locals[3]);
printk("l4: %08x l5: %08x l6: %08x l7: %08x\n",
sf->locals[4], sf->locals[5], sf->locals[6], sf->locals[7]);
printk("i0: %08x i1: %08x i2: %08x i3: %08x\n",
sf->ins[0], sf->ins[1], sf->ins[2], sf->ins[3]);
printk("i4: %08x i5: %08x fp: %08x ret_pc: %08x\n",
sf->ins[4], sf->ins[5], sf->fp, sf->callers_pc);
printk("sp: %08x x0: %08x x1: %08x x2: %08x\n"
"x3: %08x x4: %08x x5: %08x xx: %08x\n",
sf->structptr, sf->xargs[0], sf->xargs[1],
sf->xargs[2], sf->xargs[3], sf->xargs[4], sf->xargs[5],
sf->xxargs[0]);
size = ((unsigned long)sf->fp) - ((unsigned long)sf);
size -= STACKFRAME32_SZ;
stk = (unsigned *)((unsigned long)sf + STACKFRAME32_SZ);
i = 0;
do {
printk("s%d: %08x\n", i++, *stk++);
} while ((size -= sizeof(unsigned)));
}
#ifdef CONFIG_SMP
static DEFINE_SPINLOCK(regdump_lock);
#endif
@ -354,24 +301,6 @@ void show_regs(struct pt_regs *regs)
#endif
}
void show_regs32(struct pt_regs32 *regs)
{
printk("PSR: %08x PC: %08x NPC: %08x Y: %08x %s\n", regs->psr,
regs->pc, regs->npc, regs->y, print_tainted());
printk("g0: %08x g1: %08x g2: %08x g3: %08x ",
regs->u_regs[0], regs->u_regs[1], regs->u_regs[2],
regs->u_regs[3]);
printk("g4: %08x g5: %08x g6: %08x g7: %08x\n",
regs->u_regs[4], regs->u_regs[5], regs->u_regs[6],
regs->u_regs[7]);
printk("o0: %08x o1: %08x o2: %08x o3: %08x ",
regs->u_regs[8], regs->u_regs[9], regs->u_regs[10],
regs->u_regs[11]);
printk("o4: %08x o5: %08x sp: %08x ret_pc: %08x\n",
regs->u_regs[12], regs->u_regs[13], regs->u_regs[14],
regs->u_regs[15]);
}
unsigned long thread_saved_pc(struct task_struct *tsk)
{
struct thread_info *ti = task_thread_info(tsk);

View File

@ -86,7 +86,7 @@ extern void setup_sparc64_timer(void);
static volatile unsigned long callin_flag = 0;
void __devinit smp_callin(void)
void __cpuinit smp_callin(void)
{
int cpuid = hard_smp_processor_id();

View File

@ -4,6 +4,8 @@
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
*/
#include <linux/init.h>
#include <asm/head.h>
#include <asm/asi.h>
#include <asm/lsu.h>
@ -36,7 +38,7 @@ dtlb_load:
tramp_stack:
.skip TRAMP_STACK_SIZE
.text
__CPUINIT
.align 8
.globl sparc64_cpu_startup, sparc64_cpu_startup_end
sparc64_cpu_startup:

View File

@ -1791,8 +1791,6 @@ static const char *sun4v_err_type_to_str(u32 type)
};
}
extern void __show_regs(struct pt_regs * regs);
static void sun4v_log_error(struct pt_regs *regs, struct sun4v_error_entry *ent, int cpu, const char *pfx, atomic_t *ocnt)
{
int cnt;

View File

@ -109,6 +109,7 @@ extern unsigned long profile_pc(struct pt_regs *);
#define profile_pc(regs) instruction_pointer(regs)
#endif
extern void show_regs(struct pt_regs *);
extern void __show_regs(struct pt_regs *);
#endif
#else /* __ASSEMBLY__ */

View File

@ -0,0 +1,6 @@
#ifndef _SPARC64_REBOOT_H
#define _SPARC64_REBOOT_H
extern void machine_alt_power_off(void);
#endif /* _SPARC64_REBOOT_H */

View File

@ -0,0 +1,13 @@
#ifndef _SPARC64_SYSCALLS_H
#define _SPARC64_SYSCALLS_H
struct pt_regs;
extern asmlinkage long sparc_do_fork(unsigned long clone_flags,
unsigned long stack_start,
struct pt_regs *regs,
unsigned long stack_size);
extern asmlinkage int sparc_execve(struct pt_regs *regs);
#endif /* _SPARC64_SYSCALLS_H */

View File

@ -117,6 +117,7 @@ do { __asm__ __volatile__("ba,pt %%xcc, 1f\n\t" \
extern void sun_do_break(void);
extern int stop_a_enabled;
extern void fault_in_user_windows(void);
extern void synchronize_user_stack(void);
extern void __flushw_user(void);