Commit 789319db authored by Linus Torvalds's avatar Linus Torvalds

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: Add global register dumping facility.
  sparc: remove CVS keywords
  sparc64: remove CVS keywords
parents fd9908c0 93dae5b7
# $Id: config.in,v 1.113 2002/01/24 22:14:44 davem Exp $
# For a description of the syntax of this configuration file, # For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.txt. # see Documentation/kbuild/kconfig-language.txt.
# #
......
# $Id: Makefile,v 1.10 2000/02/23 08:17:46 jj Exp $
# Makefile for the Sparc boot stuff. # Makefile for the Sparc boot stuff.
# #
# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) # Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: btfixupprep.c,v 1.6 2001/08/22 15:27:47 davem Exp $ /*
Simple utility to prepare vmlinux image for sparc. Simple utility to prepare vmlinux image for sparc.
Resolves all BTFIXUP uses and settings and creates Resolves all BTFIXUP uses and settings and creates
a special .s object to link to the image. a special .s object to link to the image.
......
/* $Id: piggyback.c,v 1.4 2000/12/05 00:48:57 anton Exp $ /*
Simple utility to make a single-image install kernel with initial ramdisk Simple utility to make a single-image install kernel with initial ramdisk
for Sparc tftpbooting without need to set up nfs. for Sparc tftpbooting without need to set up nfs.
......
/* $Id: ebus.c,v 1.20 2002/01/05 01:13:43 davem Exp $ /*
* ebus.c: PCI to EBus bridge device. * ebus.c: PCI to EBus bridge device.
* *
* Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
......
/* $Id: etrap.S,v 1.31 2000/01/08 16:38:18 anton Exp $ /*
* etrap.S: Sparc trap window preparation for entry into the * etrap.S: Sparc trap window preparation for entry into the
* Linux kernel. * Linux kernel.
* *
......
/* $Id: head.S,v 1.105 2001/08/12 09:08:56 davem Exp $ /*
* head.S: The initial boot code for the Sparc port of Linux. * head.S: The initial boot code for the Sparc port of Linux.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: idprom.c,v 1.24 1999/08/31 06:54:20 davem Exp $ /*
* idprom.c: Routines to load the idprom into kernel addresses and * idprom.c: Routines to load the idprom into kernel addresses and
* interpret the data contained within. * interpret the data contained within.
* *
......
/* $Id: ioport.c,v 1.45 2001/10/30 04:54:21 davem Exp $ /*
* ioport.c: Simple io mapping allocator. * ioport.c: Simple io mapping allocator.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: irq.c,v 1.114 2001/12/11 04:55:51 davem Exp $ /*
* arch/sparc/kernel/irq.c: Interrupt request handling routines. On the * arch/sparc/kernel/irq.c: Interrupt request handling routines. On the
* Sparc the IRQs are basically 'cast in stone' * Sparc the IRQs are basically 'cast in stone'
* and you are supposed to probe the prom's device * and you are supposed to probe the prom's device
......
/* $Id: muldiv.c,v 1.5 1997/12/15 20:07:20 ecd Exp $ /*
* muldiv.c: Hardware multiply/division illegal instruction trap * muldiv.c: Hardware multiply/division illegal instruction trap
* for sun4c/sun4 (which do not have those instructions) * for sun4c/sun4 (which do not have those instructions)
* *
......
/* $Id: rtrap.S,v 1.58 2002/01/31 03:30:05 davem Exp $ /*
* rtrap.S: Return from Sparc trap low-level code. * rtrap.S: Return from Sparc trap low-level code.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: setup.c,v 1.126 2001/11/13 00:49:27 davem Exp $ /*
* linux/arch/sparc/kernel/setup.c * linux/arch/sparc/kernel/setup.c
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: sparc_ksyms.c,v 1.107 2001/07/17 16:17:33 anton Exp $ /*
* arch/sparc/kernel/ksyms.c: Sparc specific ksyms support. * arch/sparc/kernel/ksyms.c: Sparc specific ksyms support.
* *
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: sun4d_irq.c,v 1.29 2001/12/11 04:55:51 davem Exp $ /*
* arch/sparc/kernel/sun4d_irq.c: * arch/sparc/kernel/sun4d_irq.c:
* SS1000/SC2000 interrupt handling. * SS1000/SC2000 interrupt handling.
* *
......
/* $Id: trampoline.S,v 1.14 2002/01/11 08:45:38 davem Exp $ /*
* trampoline.S: SMP cpu boot-up trampoline code. * trampoline.S: SMP cpu boot-up trampoline code.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: traps.c,v 1.64 2000/09/03 15:00:49 anton Exp $ /*
* arch/sparc/kernel/traps.c * arch/sparc/kernel/traps.c
* *
* Copyright 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: unaligned.c,v 1.23 2001/12/21 00:54:31 davem Exp $ /*
* unaligned.c: Unaligned load/store trap handling with special * unaligned.c: Unaligned load/store trap handling with special
* cases for the kernel to do them more quickly. * cases for the kernel to do them more quickly.
* *
......
/* $Id: wof.S,v 1.40 2000/01/08 16:38:18 anton Exp $ /*
* wof.S: Sparc window overflow handler. * wof.S: Sparc window overflow handler.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: wuf.S,v 1.39 2000/01/08 16:38:18 anton Exp $ /*
* wuf.S: Window underflow trap handler for the Sparc. * wuf.S: Window underflow trap handler for the Sparc.
* *
* Copyright (C) 1995 David S. Miller * Copyright (C) 1995 David S. Miller
......
# $Id: Makefile,v 1.35 2000/12/15 00:41:18 davem Exp $
# Makefile for Sparc library files.. # Makefile for Sparc library files..
# #
......
/* $Id: ashldi3.S,v 1.2 1999/11/19 04:11:46 davem Exp $ /*
* ashldi3.S: GCC emits these for certain drivers playing * ashldi3.S: GCC emits these for certain drivers playing
* with long longs. * with long longs.
* *
......
/* $Id: ashrdi3.S,v 1.4 1999/11/19 04:11:49 davem Exp $ /*
* ashrdi3.S: The filesystem code creates all kinds of references to * ashrdi3.S: The filesystem code creates all kinds of references to
* this little routine on the sparc with gcc. * this little routine on the sparc with gcc.
* *
......
/* $Id: blockops.S,v 1.8 1998/01/30 10:58:44 jj Exp $ /*
* blockops.S: Common block zero optimized routines. * blockops.S: Common block zero optimized routines.
* *
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: locks.S,v 1.16 2000/02/26 11:02:47 anton Exp $ /*
* locks.S: SMP low-level lock primitives on Sparc. * locks.S: SMP low-level lock primitives on Sparc.
* *
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: lshrdi3.S,v 1.1 1999/03/21 06:37:45 davem Exp $ */
.globl __lshrdi3 .globl __lshrdi3
__lshrdi3: __lshrdi3:
......
/* $Id: memscan.S,v 1.4 1996/09/08 02:01:20 davem Exp $ /*
* memscan.S: Optimized memscan for the Sparc. * memscan.S: Optimized memscan for the Sparc.
* *
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: mul.S,v 1.4 1996/09/30 02:22:32 davem Exp $ /*
* mul.S: This routine was taken from glibc-1.09 and is covered * mul.S: This routine was taken from glibc-1.09 and is covered
* by the GNU Library General Public License Version 2. * by the GNU Library General Public License Version 2.
*/ */
......
/* $Id: rem.S,v 1.7 1996/09/30 02:22:34 davem Exp $ /*
* rem.S: This routine was taken from glibc-1.09 and is covered * rem.S: This routine was taken from glibc-1.09 and is covered
* by the GNU Library General Public License Version 2. * by the GNU Library General Public License Version 2.
*/ */
......
/* $Id: rwsem.S,v 1.5 2000/05/09 17:40:13 davem Exp $ /*
* Assembly part of rw semaphores. * Assembly part of rw semaphores.
* *
* Copyright (C) 1999 Jakub Jelinek (jakub@redhat.com) * Copyright (C) 1999 Jakub Jelinek (jakub@redhat.com)
......
/* $Id: sdiv.S,v 1.6 1996/10/02 17:37:00 davem Exp $ /*
* sdiv.S: This routine was taken from glibc-1.09 and is covered * sdiv.S: This routine was taken from glibc-1.09 and is covered
* by the GNU Library General Public License Version 2. * by the GNU Library General Public License Version 2.
*/ */
......
/* $Id: strncmp.S,v 1.2 1996/09/09 02:47:20 davem Exp $ /*
* strncmp.S: Hand optimized Sparc assembly of GCC output from GNU libc * strncmp.S: Hand optimized Sparc assembly of GCC output from GNU libc
* generic strncmp routine. * generic strncmp routine.
*/ */
......
/* $Id: udiv.S,v 1.4 1996/09/30 02:22:38 davem Exp $ /*
* udiv.S: This routine was taken from glibc-1.09 and is covered * udiv.S: This routine was taken from glibc-1.09 and is covered
* by the GNU Library General Public License Version 2. * by the GNU Library General Public License Version 2.
*/ */
......
/* $Id: umul.S,v 1.4 1996/09/30 02:22:39 davem Exp $ /*
* umul.S: This routine was taken from glibc-1.09 and is covered * umul.S: This routine was taken from glibc-1.09 and is covered
* by the GNU Library General Public License Version 2. * by the GNU Library General Public License Version 2.
*/ */
......
/* $Id: urem.S,v 1.4 1996/09/30 02:22:42 davem Exp $ /*
* urem.S: This routine was taken from glibc-1.09 and is covered * urem.S: This routine was taken from glibc-1.09 and is covered
* by the GNU Library General Public License Version 2. * by the GNU Library General Public License Version 2.
*/ */
......
/* $Id: ashldi3.S,v 1.1 1998/04/06 16:09:28 jj Exp $ /*
* ashldi3.S: Math-emu code creates all kinds of references to * ashldi3.S: Math-emu code creates all kinds of references to
* this little routine on the sparc with gcc. * this little routine on the sparc with gcc.
* *
......
# $Id: Makefile,v 1.38 2000/12/15 00:41:22 davem Exp $
# Makefile for the linux Sparc-specific parts of the memory manager. # Makefile for the linux Sparc-specific parts of the memory manager.
# #
......
/* $Id: fault.c,v 1.122 2001/11/17 07:19:26 davem Exp $ /*
* fault.c: Page fault handlers for the Sparc. * fault.c: Page fault handlers for the Sparc.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: generic.c,v 1.14 2001/12/21 04:56:15 davem Exp $ /*
* generic.c: Generic Sparc mm routines that are not dependent upon * generic.c: Generic Sparc mm routines that are not dependent upon
* MMU type but are Sparc specific. * MMU type but are Sparc specific.
* *
......
/* $Id: hypersparc.S,v 1.18 2001/12/21 04:56:15 davem Exp $ /*
* hypersparc.S: High speed Hypersparc mmu/cache operations. * hypersparc.S: High speed Hypersparc mmu/cache operations.
* *
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: init.c,v 1.103 2001/11/19 19:03:08 davem Exp $ /*
* linux/arch/sparc/mm/init.c * linux/arch/sparc/mm/init.c
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: io-unit.c,v 1.24 2001/12/17 07:05:09 davem Exp $ /*
* io-unit.c: IO-UNIT specific routines for memory management. * io-unit.c: IO-UNIT specific routines for memory management.
* *
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
......
/* $Id: loadmmu.c,v 1.56 2000/02/08 20:24:21 davem Exp $ /*
* loadmmu.c: This code loads up all the mm function pointers once the * loadmmu.c: This code loads up all the mm function pointers once the
* machine type has been determined. It also sets the static * machine type has been determined. It also sets the static
* mmu values such as PAGE_NONE, etc. * mmu values such as PAGE_NONE, etc.
......
/* $Id: nosrmmu.c,v 1.5 1999/11/19 04:11:54 davem Exp $ /*
* nosrmmu.c: This file is a bunch of dummies for sun4 compiles, * nosrmmu.c: This file is a bunch of dummies for sun4 compiles,
* so that it does not need srmmu and avoid ifdefs. * so that it does not need srmmu and avoid ifdefs.
* *
......
/* $Id: nosun4c.c,v 1.3 2000/02/14 04:52:36 jj Exp $ /*
* nosun4c.c: This file is a bunch of dummies for SMP compiles, * nosun4c.c: This file is a bunch of dummies for SMP compiles,
* so that it does not need sun4c and avoid ifdefs. * so that it does not need sun4c and avoid ifdefs.
* *
......
/* $Id: swift.S,v 1.9 2002/01/08 11:11:59 davem Exp $ /*
* swift.S: MicroSparc-II mmu/cache operations. * swift.S: MicroSparc-II mmu/cache operations.
* *
* Copyright (C) 1999 David S. Miller (davem@redhat.com) * Copyright (C) 1999 David S. Miller (davem@redhat.com)
......
/* $Id: tsunami.S,v 1.7 2001/12/21 04:56:15 davem Exp $ /*
* tsunami.S: High speed MicroSparc-I mmu/cache operations. * tsunami.S: High speed MicroSparc-I mmu/cache operations.
* *
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: viking.S,v 1.19 2001/12/21 04:56:15 davem Exp $ /*
* viking.S: High speed Viking cache/mmu operations * viking.S: High speed Viking cache/mmu operations
* *
* Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
......
# $Id: Makefile,v 1.8 2000/12/15 00:41:22 davem Exp $
# Makefile for the Sun Boot PROM interface library under # Makefile for the Sun Boot PROM interface library under
# Linux. # Linux.
# #
......
/* $Id: bootstr.c,v 1.20 2000/02/08 20:24:23 davem Exp $ /*
* bootstr.c: Boot string/argument acquisition from the PROM. * bootstr.c: Boot string/argument acquisition from the PROM.
* *
* Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: console.c,v 1.25 2001/10/30 04:54:22 davem Exp $ /*
* console.c: Routines that deal with sending and receiving IO * console.c: Routines that deal with sending and receiving IO
* to/from the current console device using the PROM. * to/from the current console device using the PROM.
* *
......
/* $Id: devmap.c,v 1.7 2000/08/26 02:38:03 anton Exp $ /*
* promdevmap.c: Map device/IO areas to virtual addresses. * promdevmap.c: Map device/IO areas to virtual addresses.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: devops.c,v 1.13 2000/08/26 02:38:03 anton Exp $ /*
* devops.c: Device operations using the PROM. * devops.c: Device operations using the PROM.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: init.c,v 1.14 2000/01/29 01:09:12 anton Exp $ /*
* init.c: Initialize internal variables used by the PROM * init.c: Initialize internal variables used by the PROM
* library functions. * library functions.
* *
......
/* $Id: misc.c,v 1.18 2000/08/26 02:38:03 anton Exp $ /*
* misc.c: Miscellaneous prom functions that don't belong * misc.c: Miscellaneous prom functions that don't belong
* anywhere else. * anywhere else.
* *
......
/* $Id: mp.c,v 1.12 2000/08/26 02:38:03 anton Exp $ /*
* mp.c: OpenBoot Prom Multiprocessor support routines. Don't call * mp.c: OpenBoot Prom Multiprocessor support routines. Don't call
* these on a UP or else you will halt and catch fire. ;) * these on a UP or else you will halt and catch fire. ;)
* *
......
/* $Id: palloc.c,v 1.4 1996/04/25 06:09:48 davem Exp $ /*
* palloc.c: Memory allocation from the Sun PROM. * palloc.c: Memory allocation from the Sun PROM.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: ranges.c,v 1.15 2001/12/19 00:29:51 davem Exp $ /*
* ranges.c: Handle ranges in newer proms for obio/sbus. * ranges.c: Handle ranges in newer proms for obio/sbus.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: segment.c,v 1.7 2000/08/26 02:38:03 anton Exp $ /*
* segment.c: Prom routine to map segments in other contexts before * segment.c: Prom routine to map segments in other contexts before
* a standalone is completely mapped. This is for sun4 and * a standalone is completely mapped. This is for sun4 and
* sun4c architectures only. * sun4c architectures only.
......
/* $Id: tree.c,v 1.26 2000/08/26 02:38:03 anton Exp $ /*
* tree.c: Basic device tree traversal/scanning for the Linux * tree.c: Basic device tree traversal/scanning for the Linux
* prom library. * prom library.
* *
......
# $Id: Makefile,v 1.52 2002/02/09 19:49:31 davem Exp $
# sparc64/Makefile # sparc64/Makefile
# #
# Makefile for the architecture dependent flags and dependencies on the # Makefile for the architecture dependent flags and dependencies on the
......
# $Id: Makefile,v 1.4 1997/12/15 20:08:56 ecd Exp $
# Makefile for the Sparc64 boot stuff. # Makefile for the Sparc64 boot stuff.
# #
# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) # Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: piggyback.c,v 1.2 2000/09/19 14:34:39 anton Exp $ /*
Simple utility to make a single-image install kernel with initial ramdisk Simple utility to make a single-image install kernel with initial ramdisk
for Sparc64 tftpbooting without need to set up nfs. for Sparc64 tftpbooting without need to set up nfs.
......
/* $Id: dtlb_prot.S,v 1.22 2001/04/11 23:40:32 davem Exp $ /*
* dtlb_prot.S: DTLB protection trap strategy. * dtlb_prot.S: DTLB protection trap strategy.
* This is included directly into the trap table. * This is included directly into the trap table.
* *
......
/* $Id: ebus.c,v 1.64 2001/11/08 04:41:33 davem Exp $ /*
* ebus.c: PCI to EBus bridge device. * ebus.c: PCI to EBus bridge device.
* *
* Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
......
/* $Id: etrap.S,v 1.46 2002/02/09 19:49:30 davem Exp $ /*
* etrap.S: Preparing for entry into the kernel on Sparc V9. * etrap.S: Preparing for entry into the kernel on Sparc V9.
* *
* Copyright (C) 1996, 1997 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: idprom.c,v 1.3 1999/08/31 06:54:53 davem Exp $ /*
* idprom.c: Routines to load the idprom into kernel addresses and * idprom.c: Routines to load the idprom into kernel addresses and
* interpret the data contained within. * interpret the data contained within.
* *
......
/* arch/sparc64/kernel/process.c /* arch/sparc64/kernel/process.c
* *
* Copyright (C) 1995, 1996 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995, 1996, 2008 David S. Miller (davem@davemloft.net)
* Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
* Copyright (C) 1997, 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * Copyright (C) 1997, 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
*/ */
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/cpu.h> #include <linux/cpu.h>
#include <linux/elfcore.h> #include <linux/elfcore.h>
#include <linux/sysrq.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -49,6 +50,8 @@ ...@@ -49,6 +50,8 @@
#include <asm/sstate.h> #include <asm/sstate.h>
#include <asm/reboot.h> #include <asm/reboot.h>
#include <asm/syscalls.h> #include <asm/syscalls.h>
#include <asm/irq_regs.h>
#include <asm/smp.h>
/* #define VERBOSE_SHOWREGS */ /* #define VERBOSE_SHOWREGS */
...@@ -298,6 +301,118 @@ void show_regs(struct pt_regs *regs) ...@@ -298,6 +301,118 @@ void show_regs(struct pt_regs *regs)
#endif #endif
} }
#ifdef CONFIG_MAGIC_SYSRQ
struct global_reg_snapshot global_reg_snapshot[NR_CPUS];
static DEFINE_SPINLOCK(global_reg_snapshot_lock);
static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs,
int this_cpu)
{
flushw_all();
global_reg_snapshot[this_cpu].tstate = regs->tstate;
global_reg_snapshot[this_cpu].tpc = regs->tpc;
global_reg_snapshot[this_cpu].tnpc = regs->tnpc;
global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7];
if (regs->tstate & TSTATE_PRIV) {
struct reg_window *rw;
rw = (struct reg_window *)
(regs->u_regs[UREG_FP] + STACK_BIAS);
global_reg_snapshot[this_cpu].i7 = rw->ins[6];
} else
global_reg_snapshot[this_cpu].i7 = 0;
global_reg_snapshot[this_cpu].thread = tp;
}
/* In order to avoid hangs we do not try to synchronize with the
* global register dump client cpus. The last store they make is to
* the thread pointer, so do a short poll waiting for that to become
* non-NULL.
*/
static void __global_reg_poll(struct global_reg_snapshot *gp)
{
int limit = 0;
while (!gp->thread && ++limit < 100) {
barrier();
udelay(1);
}
}
static void sysrq_handle_globreg(int key, struct tty_struct *tty)
{
struct thread_info *tp = current_thread_info();
struct pt_regs *regs = get_irq_regs();
#ifdef CONFIG_KALLSYMS
char buffer[KSYM_SYMBOL_LEN];
#endif
unsigned long flags;
int this_cpu, cpu;
if (!regs)
regs = tp->kregs;
spin_lock_irqsave(&global_reg_snapshot_lock, flags);
memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot));
this_cpu = raw_smp_processor_id();
__global_reg_self(tp, regs, this_cpu);
smp_fetch_global_regs();
for_each_online_cpu(cpu) {
struct global_reg_snapshot *gp = &global_reg_snapshot[cpu];
struct thread_info *tp;
__global_reg_poll(gp);
tp = gp->thread;
printk("%c CPU[%3d]: TSTATE[%016lx] TPC[%016lx] TNPC[%016lx] TASK[%s:%d]\n",
(cpu == this_cpu ? '*' : ' '), cpu,
gp->tstate, gp->tpc, gp->tnpc,
((tp && tp->task) ? tp->task->comm : "NULL"),
((tp && tp->task) ? tp->task->pid : -1));
#ifdef CONFIG_KALLSYMS
if (gp->tstate & TSTATE_PRIV) {
sprint_symbol(buffer, gp->tpc);
printk(" TPC[%s] ", buffer);
sprint_symbol(buffer, gp->o7);
printk("O7[%s] ", buffer);
sprint_symbol(buffer, gp->i7);
printk("I7[%s]\n", buffer);
} else
#endif
{
printk(" TPC[%lx] O7[%lx] I7[%lx]\n",
gp->tpc, gp->o7, gp->i7);
}
}
memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot));
spin_unlock_irqrestore(&global_reg_snapshot_lock, flags);
}
static struct sysrq_key_op sparc_globalreg_op = {
.handler = sysrq_handle_globreg,
.help_msg = "Globalregs",
.action_msg = "Show Global CPU Regs",
};
static int __init sparc_globreg_init(void)
{
return register_sysrq_key('y', &sparc_globalreg_op);
}
core_initcall(sparc_globreg_init);
#endif
unsigned long thread_saved_pc(struct task_struct *tsk) unsigned long thread_saved_pc(struct task_struct *tsk)
{ {
struct thread_info *ti = task_thread_info(tsk); struct thread_info *ti = task_thread_info(tsk);
......
/* $Id: rtrap.S,v 1.61 2002/02/09 19:49:31 davem Exp $ /*
* rtrap.S: Preparing for return from trap on Sparc V9. * rtrap.S: Preparing for return from trap on Sparc V9.
* *
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
......
/* $Id: sbus.c,v 1.19 2002/01/23 11:27:32 davem Exp $ /*
* sbus.c: UltraSparc SBUS controller support. * sbus.c: UltraSparc SBUS controller support.
* *
* Copyright (C) 1999 David S. Miller (davem@redhat.com) * Copyright (C) 1999 David S. Miller (davem@redhat.com)
......
/* $Id: setup.c,v 1.72 2002/02/09 19:49:30 davem Exp $ /*
* linux/arch/sparc64/kernel/setup.c * linux/arch/sparc64/kernel/setup.c
* *
* Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: signal.c,v 1.60 2002/02/09 19:49:31 davem Exp $ /*
* arch/sparc64/kernel/signal.c * arch/sparc64/kernel/signal.c
* *
* Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 1991, 1992 Linus Torvalds
......
...@@ -900,6 +900,9 @@ extern unsigned long xcall_flush_tlb_mm; ...@@ -900,6 +900,9 @@ extern unsigned long xcall_flush_tlb_mm;
extern unsigned long xcall_flush_tlb_pending; extern unsigned long xcall_flush_tlb_pending;
extern unsigned long xcall_flush_tlb_kernel_range; extern unsigned long xcall_flush_tlb_kernel_range;
extern unsigned long xcall_report_regs; extern unsigned long xcall_report_regs;
#ifdef CONFIG_MAGIC_SYSRQ
extern unsigned long xcall_fetch_glob_regs;
#endif
extern unsigned long xcall_receive_signal; extern unsigned long xcall_receive_signal;
extern unsigned long xcall_new_mmu_context_version; extern unsigned long xcall_new_mmu_context_version;
#ifdef CONFIG_KGDB #ifdef CONFIG_KGDB
...@@ -1080,6 +1083,13 @@ void smp_report_regs(void) ...@@ -1080,6 +1083,13 @@ void smp_report_regs(void)
smp_cross_call(&xcall_report_regs, 0, 0, 0); smp_cross_call(&xcall_report_regs, 0, 0, 0);
} }
#ifdef CONFIG_MAGIC_SYSRQ
void smp_fetch_global_regs(void)
{
smp_cross_call(&xcall_fetch_glob_regs, 0, 0, 0);
}
#endif
/* We know that the window frames of the user have been flushed /* We know that the window frames of the user have been flushed
* to the stack before we get here because all callers of us * to the stack before we get here because all callers of us
* are flush_tlb_*() routines, and these run after flush_cache_*() * are flush_tlb_*() routines, and these run after flush_cache_*()
......
/* $Id: starfire.c,v 1.10 2001/04/14 21:13:45 davem Exp $ /*
* starfire.c: Starfire/E10000 support. * starfire.c: Starfire/E10000 support.
* *
* Copyright (C) 1998 David S. Miller (davem@redhat.com) * Copyright (C) 1998 David S. Miller (davem@redhat.com)
......
/* $Id: sys32.S,v 1.12 2000/03/24 04:17:37 davem Exp $ /*
* sys32.S: I-cache tricks for 32-bit compatibility layer simple * sys32.S: I-cache tricks for 32-bit compatibility layer simple
* conversions. * conversions.
* *
......
/* $Id: trampoline.S,v 1.26 2002/02/09 19:49:30 davem Exp $ /*
* trampoline.S: Jump start slave processors on sparc64. * trampoline.S: Jump start slave processors on sparc64.
* *
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: unaligned.c,v 1.24 2002/02/09 19:49:31 davem Exp $ /*
* unaligned.c: Unaligned load/store trap handling with special * unaligned.c: Unaligned load/store trap handling with special
* cases for the kernel to do them more quickly. * cases for the kernel to do them more quickly.
* *
......
/* $Id: PeeCeeI.c,v 1.4 1999/09/06 01:17:35 davem Exp $ /*
* PeeCeeI.c: The emerging standard... * PeeCeeI.c: The emerging standard...
* *
* Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: VISsave.S,v 1.6 2002/02/09 19:49:30 davem Exp $ /*
* VISsave.S: Code for saving FPU register state for * VISsave.S: Code for saving FPU register state for
* VIS routines. One should not call this directly, * VIS routines. One should not call this directly,
* but use macros provided in <asm/visasm.h>. * but use macros provided in <asm/visasm.h>.
......
/* $Id: memcmp.S,v 1.3 2000/03/23 07:51:08 davem Exp $ /*
* Sparc64 optimized memcmp code. * Sparc64 optimized memcmp code.
* *
* Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
......
/* $Id: memscan.S,v 1.3 2000/01/31 04:59:10 davem Exp $ /*
* memscan.S: Optimized memscan for Sparc64. * memscan.S: Optimized memscan for Sparc64.
* *
* Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz) * Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
......
/* $Id: strncmp.S,v 1.2 1997/03/11 17:51:44 jj Exp $ /*
* Sparc64 optimized strncmp code. * Sparc64 optimized strncmp code.
* *
* Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
......
/* $Id: strncpy_from_user.S,v 1.6 1999/05/25 16:53:05 jj Exp $ /*
* strncpy_from_user.S: Sparc64 strncpy from userspace. * strncpy_from_user.S: Sparc64 strncpy from userspace.
* *
* Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz) * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz)
......
/* $Id: math.c,v 1.11 1999/12/20 05:02:25 davem Exp $ /*
* arch/sparc64/math-emu/math.c * arch/sparc64/math-emu/math.c
* *
* Copyright (C) 1997,1999 Jakub Jelinek (jj@ultra.linux.cz) * Copyright (C) 1997,1999 Jakub Jelinek (jj@ultra.linux.cz)
......
/* $Id: sfp-util.h,v 1.5 2001/06/10 06:48:46 davem Exp $ /*
* arch/sparc64/math-emu/sfp-util.h * arch/sparc64/math-emu/sfp-util.h
* *
* Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz)
......
# $Id: Makefile,v 1.8 2000/12/14 22:57:25 davem Exp $
# Makefile for the linux Sparc64-specific parts of the memory manager. # Makefile for the linux Sparc64-specific parts of the memory manager.
# #
......
/* $Id: fault.c,v 1.59 2002/02/09 19:49:31 davem Exp $ /*
* arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc. * arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc.
* *
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: generic.c,v 1.18 2001/12/21 04:56:15 davem Exp $ /*
* generic.c: Generic Sparc mm routines that are not dependent upon * generic.c: Generic Sparc mm routines that are not dependent upon
* MMU type but are Sparc specific. * MMU type but are Sparc specific.
* *
......
/* $Id: init.c,v 1.209 2002/02/09 19:49:31 davem Exp $ /*
* arch/sparc64/mm/init.c * arch/sparc64/mm/init.c
* *
* Copyright (C) 1996-1999 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996-1999 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: ultra.S,v 1.72 2002/02/09 19:49:31 davem Exp $ /*
* ultra.S: Don't expand these all over the place... * ultra.S: Don't expand these all over the place...
* *
* Copyright (C) 1997, 2000 David S. Miller (davem@redhat.com) * Copyright (C) 1997, 2000, 2008 David S. Miller (davem@davemloft.net)
*/ */
#include <asm/asi.h> #include <asm/asi.h>
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/hypervisor.h> #include <asm/hypervisor.h>
#include <asm/cpudata.h>
/* Basically, most of the Spitfire vs. Cheetah madness /* Basically, most of the Spitfire vs. Cheetah madness
* has to do with the fact that Cheetah does not support * has to do with the fact that Cheetah does not support
...@@ -514,6 +515,32 @@ xcall_report_regs: ...@@ -514,6 +515,32 @@ xcall_report_regs:
b rtrap_xcall b rtrap_xcall
ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
#ifdef CONFIG_MAGIC_SYSRQ
.globl xcall_fetch_glob_regs
xcall_fetch_glob_regs:
sethi %hi(global_reg_snapshot), %g1
or %g1, %lo(global_reg_snapshot), %g1
__GET_CPUID(%g2)
sllx %g2, 6, %g3
add %g1, %g3, %g1
rdpr %tstate, %g7
stx %g7, [%g1 + GR_SNAP_TSTATE]
rdpr %tpc, %g7
stx %g7, [%g1 + GR_SNAP_TPC]
rdpr %tnpc, %g7
stx %g7, [%g1 + GR_SNAP_TNPC]
stx %o7, [%g1 + GR_SNAP_O7]
stx %i7, [%g1 + GR_SNAP_I7]
sethi %hi(trap_block), %g7
or %g7, %lo(trap_block), %g7
sllx %g2, TRAP_BLOCK_SZ_SHIFT, %g2
add %g7, %g2, %g7
ldx [%g7 + TRAP_PER_CPU_THREAD], %g3
membar #StoreStore
stx %g3, [%g1 + GR_SNAP_THREAD]
retry
#endif /* CONFIG_MAGIC_SYSRQ */
#ifdef DCACHE_ALIASING_POSSIBLE #ifdef DCACHE_ALIASING_POSSIBLE
.align 32 .align 32
.globl xcall_flush_dcache_page_cheetah .globl xcall_flush_dcache_page_cheetah
......
# $Id: Makefile,v 1.7 2000/12/14 22:57:25 davem Exp $
# Makefile for the Sun Boot PROM interface library under # Makefile for the Sun Boot PROM interface library under
# Linux. # Linux.
# #
......
/* $Id: bootstr.c,v 1.6 1999/08/31 06:55:01 davem Exp $ /*
* bootstr.c: Boot string/argument acquisition from the PROM. * bootstr.c: Boot string/argument acquisition from the PROM.
* *
* Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: devops.c,v 1.3 1997/10/29 07:43:28 ecd Exp $ /*
* devops.c: Device operations using the PROM. * devops.c: Device operations using the PROM.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: init.c,v 1.10 1999/09/21 14:35:59 davem Exp $ /*
* init.c: Initialize internal variables used by the PROM * init.c: Initialize internal variables used by the PROM
* library functions. * library functions.
* *
......
/* $Id: misc.c,v 1.20 2001/09/21 03:17:07 kanoj Exp $ /*
* misc.c: Miscellaneous prom functions that don't belong * misc.c: Miscellaneous prom functions that don't belong
* anywhere else. * anywhere else.
* *
......
/* $Id: p1275.c,v 1.22 2001/10/18 09:40:00 davem Exp $ /*
* p1275.c: Sun IEEE 1275 PROM low level interface routines * p1275.c: Sun IEEE 1275 PROM low level interface routines
* *
* Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
......
/* $Id: tree.c,v 1.10 1998/01/10 22:39:00 ecd Exp $ /*
* tree.c: Basic device tree traversal/scanning for the Linux * tree.c: Basic device tree traversal/scanning for the Linux
* prom library. * prom library.
* *
......
...@@ -402,6 +402,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = { ...@@ -402,6 +402,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
&sysrq_showstate_blocked_op, /* w */ &sysrq_showstate_blocked_op, /* w */
/* x: May be registered on ppc/powerpc for xmon */ /* x: May be registered on ppc/powerpc for xmon */
NULL, /* x */ NULL, /* x */
/* y: May be registered on sparc64 for global register dump */
NULL, /* y */ NULL, /* y */
NULL /* z */ NULL /* z */
}; };
......
/* $Id: asi.h,v 1.18 1998/03/09 14:04:46 jj Exp $ */
#ifndef _SPARC_ASI_H #ifndef _SPARC_ASI_H
#define _SPARC_ASI_H #define _SPARC_ASI_H
......
/* $Id: auxio.h,v 1.18 1997/11/07 15:01:45 jj Exp $ /*
* auxio.h: Definitions and code for the Auxiliary I/O register. * auxio.h: Definitions and code for the Auxiliary I/O register.
* *
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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