aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-16 05:27:45 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-16 05:27:45 -0400
commitd939d2851fd12568e2eabb2916769e8a57ba5c89 (patch)
treef3158a5ddd41541a61126f9e48de1ce89c632f64 /arch/sparc64
parent9f5314fb4d556d3132c784d0df47352b2830ca53 (diff)
parent066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff)
Merge branch 'linus' into x86/irq
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/Makefile1
-rw-r--r--arch/sparc64/boot/Makefile1
-rw-r--r--arch/sparc64/boot/piggyback.c2
-rw-r--r--arch/sparc64/defconfig40
-rw-r--r--arch/sparc64/kernel/dtlb_prot.S2
-rw-r--r--arch/sparc64/kernel/ebus.c2
-rw-r--r--arch/sparc64/kernel/etrap.S2
-rw-r--r--arch/sparc64/kernel/idprom.c2
-rw-r--r--arch/sparc64/kernel/init_task.c1
-rw-r--r--arch/sparc64/kernel/process.c153
-rw-r--r--arch/sparc64/kernel/rtrap.S9
-rw-r--r--arch/sparc64/kernel/sbus.c2
-rw-r--r--arch/sparc64/kernel/setup.c2
-rw-r--r--arch/sparc64/kernel/signal.c23
-rw-r--r--arch/sparc64/kernel/signal32.c13
-rw-r--r--arch/sparc64/kernel/smp.c10
-rw-r--r--arch/sparc64/kernel/stacktrace.c12
-rw-r--r--arch/sparc64/kernel/starfire.c2
-rw-r--r--arch/sparc64/kernel/sys32.S2
-rw-r--r--arch/sparc64/kernel/sys_sparc.c36
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c33
-rw-r--r--arch/sparc64/kernel/trampoline.S2
-rw-r--r--arch/sparc64/kernel/traps.c12
-rw-r--r--arch/sparc64/kernel/unaligned.c2
-rw-r--r--arch/sparc64/lib/PeeCeeI.c2
-rw-r--r--arch/sparc64/lib/VISsave.S2
-rw-r--r--arch/sparc64/lib/memcmp.S2
-rw-r--r--arch/sparc64/lib/memscan.S2
-rw-r--r--arch/sparc64/lib/strncmp.S2
-rw-r--r--arch/sparc64/lib/strncpy_from_user.S2
-rw-r--r--arch/sparc64/math-emu/math.c2
-rw-r--r--arch/sparc64/math-emu/sfp-util.h2
-rw-r--r--arch/sparc64/mm/Makefile1
-rw-r--r--arch/sparc64/mm/fault.c2
-rw-r--r--arch/sparc64/mm/generic.c2
-rw-r--r--arch/sparc64/mm/init.c20
-rw-r--r--arch/sparc64/mm/ultra.S31
-rw-r--r--arch/sparc64/prom/Makefile1
-rw-r--r--arch/sparc64/prom/bootstr.c2
-rw-r--r--arch/sparc64/prom/devops.c2
-rw-r--r--arch/sparc64/prom/init.c2
-rw-r--r--arch/sparc64/prom/misc.c2
-rw-r--r--arch/sparc64/prom/p1275.c2
-rw-r--r--arch/sparc64/prom/tree.c2
44 files changed, 294 insertions, 157 deletions
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile
index 9cb75c852b45..4b8f2b084c21 100644
--- a/arch/sparc64/Makefile
+++ b/arch/sparc64/Makefile
@@ -1,4 +1,3 @@
1# $Id: Makefile,v 1.52 2002/02/09 19:49:31 davem Exp $
2# sparc64/Makefile 1# sparc64/Makefile
3# 2#
4# Makefile for the architecture dependent flags and dependencies on the 3# Makefile for the architecture dependent flags and dependencies on the
diff --git a/arch/sparc64/boot/Makefile b/arch/sparc64/boot/Makefile
index 6968a6da57da..0458b5244f09 100644
--- a/arch/sparc64/boot/Makefile
+++ b/arch/sparc64/boot/Makefile
@@ -1,4 +1,3 @@
1# $Id: Makefile,v 1.4 1997/12/15 20:08:56 ecd Exp $
2# Makefile for the Sparc64 boot stuff. 1# Makefile for the Sparc64 boot stuff.
3# 2#
4# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 3# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/boot/piggyback.c b/arch/sparc64/boot/piggyback.c
index 36f907408c60..de364bfed0bb 100644
--- a/arch/sparc64/boot/piggyback.c
+++ b/arch/sparc64/boot/piggyback.c
@@ -1,4 +1,4 @@
1/* $Id: piggyback.c,v 1.2 2000/09/19 14:34:39 anton Exp $ 1/*
2 Simple utility to make a single-image install kernel with initial ramdisk 2 Simple utility to make a single-image install kernel with initial ramdisk
3 for Sparc64 tftpbooting without need to set up nfs. 3 for Sparc64 tftpbooting without need to set up nfs.
4 4
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index aff93c9d13f4..76eb832527f2 100644
--- a/arch/sparc64/defconfig
+++ b/arch/sparc64/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.25 3# Linux kernel version: 2.6.26-rc2
4# Sat Apr 26 03:11:06 2008 4# Fri May 16 13:36:07 2008
5# 5#
6CONFIG_SPARC=y 6CONFIG_SPARC=y
7CONFIG_SPARC64=y 7CONFIG_SPARC64=y
@@ -74,6 +74,7 @@ CONFIG_SYSCTL=y
74# CONFIG_EMBEDDED is not set 74# CONFIG_EMBEDDED is not set
75CONFIG_UID16=y 75CONFIG_UID16=y
76CONFIG_SYSCTL_SYSCALL=y 76CONFIG_SYSCTL_SYSCALL=y
77CONFIG_SYSCTL_SYSCALL_CHECK=y
77CONFIG_KALLSYMS=y 78CONFIG_KALLSYMS=y
78# CONFIG_KALLSYMS_ALL is not set 79# CONFIG_KALLSYMS_ALL is not set
79# CONFIG_KALLSYMS_EXTRA_PASS is not set 80# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -103,12 +104,14 @@ CONFIG_KPROBES=y
103CONFIG_KRETPROBES=y 104CONFIG_KRETPROBES=y
104CONFIG_HAVE_KPROBES=y 105CONFIG_HAVE_KPROBES=y
105CONFIG_HAVE_KRETPROBES=y 106CONFIG_HAVE_KRETPROBES=y
107# CONFIG_HAVE_DMA_ATTRS is not set
106CONFIG_PROC_PAGE_MONITOR=y 108CONFIG_PROC_PAGE_MONITOR=y
107CONFIG_SLABINFO=y 109CONFIG_SLABINFO=y
108CONFIG_RT_MUTEXES=y 110CONFIG_RT_MUTEXES=y
109# CONFIG_TINY_SHMEM is not set 111# CONFIG_TINY_SHMEM is not set
110CONFIG_BASE_SMALL=0 112CONFIG_BASE_SMALL=0
111CONFIG_MODULES=y 113CONFIG_MODULES=y
114# CONFIG_MODULE_FORCE_LOAD is not set
112CONFIG_MODULE_UNLOAD=y 115CONFIG_MODULE_UNLOAD=y
113CONFIG_MODULE_FORCE_UNLOAD=y 116CONFIG_MODULE_FORCE_UNLOAD=y
114CONFIG_MODVERSIONS=y 117CONFIG_MODVERSIONS=y
@@ -170,6 +173,7 @@ CONFIG_HAVE_MEMORY_PRESENT=y
170CONFIG_SPARSEMEM_EXTREME=y 173CONFIG_SPARSEMEM_EXTREME=y
171CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y 174CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
172CONFIG_SPARSEMEM_VMEMMAP=y 175CONFIG_SPARSEMEM_VMEMMAP=y
176CONFIG_PAGEFLAGS_EXTENDED=y
173CONFIG_SPLIT_PTLOCK_CPUS=4 177CONFIG_SPLIT_PTLOCK_CPUS=4
174CONFIG_MIGRATION=y 178CONFIG_MIGRATION=y
175CONFIG_RESOURCES_64BIT=y 179CONFIG_RESOURCES_64BIT=y
@@ -402,7 +406,6 @@ CONFIG_IDEPCI_PCIBUS_ORDER=y
402CONFIG_BLK_DEV_IDEDMA_PCI=y 406CONFIG_BLK_DEV_IDEDMA_PCI=y
403# CONFIG_BLK_DEV_AEC62XX is not set 407# CONFIG_BLK_DEV_AEC62XX is not set
404CONFIG_BLK_DEV_ALI15X3=y 408CONFIG_BLK_DEV_ALI15X3=y
405# CONFIG_WDC_ALI15X3 is not set
406# CONFIG_BLK_DEV_AMD74XX is not set 409# CONFIG_BLK_DEV_AMD74XX is not set
407# CONFIG_BLK_DEV_CMD64X is not set 410# CONFIG_BLK_DEV_CMD64X is not set
408# CONFIG_BLK_DEV_TRIFLEX is not set 411# CONFIG_BLK_DEV_TRIFLEX is not set
@@ -609,6 +612,7 @@ CONFIG_NIU=m
609# CONFIG_MLX4_CORE is not set 612# CONFIG_MLX4_CORE is not set
610# CONFIG_TEHUTI is not set 613# CONFIG_TEHUTI is not set
611# CONFIG_BNX2X is not set 614# CONFIG_BNX2X is not set
615# CONFIG_SFC is not set
612# CONFIG_TR is not set 616# CONFIG_TR is not set
613 617
614# 618#
@@ -717,6 +721,7 @@ CONFIG_VT=y
717CONFIG_VT_CONSOLE=y 721CONFIG_VT_CONSOLE=y
718CONFIG_HW_CONSOLE=y 722CONFIG_HW_CONSOLE=y
719# CONFIG_VT_HW_CONSOLE_BINDING is not set 723# CONFIG_VT_HW_CONSOLE_BINDING is not set
724# CONFIG_DEVKMEM is not set
720# CONFIG_SERIAL_NONSTANDARD is not set 725# CONFIG_SERIAL_NONSTANDARD is not set
721# CONFIG_NOZOMI is not set 726# CONFIG_NOZOMI is not set
722 727
@@ -793,12 +798,7 @@ CONFIG_I2C_ALGOBIT=y
793# CONFIG_I2C_DEBUG_ALGO is not set 798# CONFIG_I2C_DEBUG_ALGO is not set
794# CONFIG_I2C_DEBUG_BUS is not set 799# CONFIG_I2C_DEBUG_BUS is not set
795# CONFIG_I2C_DEBUG_CHIP is not set 800# CONFIG_I2C_DEBUG_CHIP is not set
796
797#
798# SPI support
799#
800# CONFIG_SPI is not set 801# CONFIG_SPI is not set
801# CONFIG_SPI_MASTER is not set
802# CONFIG_W1 is not set 802# CONFIG_W1 is not set
803# CONFIG_POWER_SUPPLY is not set 803# CONFIG_POWER_SUPPLY is not set
804CONFIG_HWMON=y 804CONFIG_HWMON=y
@@ -873,8 +873,17 @@ CONFIG_SSB_POSSIBLE=y
873# 873#
874# Multimedia devices 874# Multimedia devices
875# 875#
876
877#
878# Multimedia core support
879#
876# CONFIG_VIDEO_DEV is not set 880# CONFIG_VIDEO_DEV is not set
877# CONFIG_DVB_CORE is not set 881# CONFIG_DVB_CORE is not set
882# CONFIG_VIDEO_MEDIA is not set
883
884#
885# Multimedia drivers
886#
878# CONFIG_DAB is not set 887# CONFIG_DAB is not set
879 888
880# 889#
@@ -893,8 +902,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y
893# CONFIG_FB_SYS_FILLRECT is not set 902# CONFIG_FB_SYS_FILLRECT is not set
894# CONFIG_FB_SYS_COPYAREA is not set 903# CONFIG_FB_SYS_COPYAREA is not set
895# CONFIG_FB_SYS_IMAGEBLIT is not set 904# CONFIG_FB_SYS_IMAGEBLIT is not set
905# CONFIG_FB_FOREIGN_ENDIAN is not set
896# CONFIG_FB_SYS_FOPS is not set 906# CONFIG_FB_SYS_FOPS is not set
897CONFIG_FB_DEFERRED_IO=y
898# CONFIG_FB_SVGALIB is not set 907# CONFIG_FB_SVGALIB is not set
899# CONFIG_FB_MACMODES is not set 908# CONFIG_FB_MACMODES is not set
900# CONFIG_FB_BACKLIGHT is not set 909# CONFIG_FB_BACKLIGHT is not set
@@ -1100,6 +1109,10 @@ CONFIG_SND_SUN_CS4231=m
1100# 1109#
1101 1110
1102# 1111#
1112# SoC Audio for the Texas Instruments OMAP
1113#
1114
1115#
1103# Open Sound System 1116# Open Sound System
1104# 1117#
1105# CONFIG_SOUND_PRIME is not set 1118# CONFIG_SOUND_PRIME is not set
@@ -1135,10 +1148,12 @@ CONFIG_USB_DEVICEFS=y
1135# 1148#
1136# USB Host Controller Drivers 1149# USB Host Controller Drivers
1137# 1150#
1151# CONFIG_USB_C67X00_HCD is not set
1138CONFIG_USB_EHCI_HCD=m 1152CONFIG_USB_EHCI_HCD=m
1139# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 1153# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
1140# CONFIG_USB_EHCI_TT_NEWSCHED is not set 1154# CONFIG_USB_EHCI_TT_NEWSCHED is not set
1141# CONFIG_USB_ISP116X_HCD is not set 1155# CONFIG_USB_ISP116X_HCD is not set
1156# CONFIG_USB_ISP1760_HCD is not set
1142CONFIG_USB_OHCI_HCD=y 1157CONFIG_USB_OHCI_HCD=y
1143# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set 1158# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
1144# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set 1159# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
@@ -1173,6 +1188,7 @@ CONFIG_USB_STORAGE=m
1173# CONFIG_USB_STORAGE_ALAUDA is not set 1188# CONFIG_USB_STORAGE_ALAUDA is not set
1174# CONFIG_USB_STORAGE_ONETOUCH is not set 1189# CONFIG_USB_STORAGE_ONETOUCH is not set
1175# CONFIG_USB_STORAGE_KARMA is not set 1190# CONFIG_USB_STORAGE_KARMA is not set
1191# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
1176# CONFIG_USB_LIBUSUAL is not set 1192# CONFIG_USB_LIBUSUAL is not set
1177 1193
1178# 1194#
@@ -1214,6 +1230,7 @@ CONFIG_USB_STORAGE=m
1214# CONFIG_MMC is not set 1230# CONFIG_MMC is not set
1215# CONFIG_MEMSTICK is not set 1231# CONFIG_MEMSTICK is not set
1216# CONFIG_NEW_LEDS is not set 1232# CONFIG_NEW_LEDS is not set
1233# CONFIG_ACCESSIBILITY is not set
1217# CONFIG_INFINIBAND is not set 1234# CONFIG_INFINIBAND is not set
1218# CONFIG_RTC_CLASS is not set 1235# CONFIG_RTC_CLASS is not set
1219# CONFIG_UIO is not set 1236# CONFIG_UIO is not set
@@ -1367,6 +1384,7 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1367CONFIG_PRINTK_TIME=y 1384CONFIG_PRINTK_TIME=y
1368# CONFIG_ENABLE_WARN_DEPRECATED is not set 1385# CONFIG_ENABLE_WARN_DEPRECATED is not set
1369CONFIG_ENABLE_MUST_CHECK=y 1386CONFIG_ENABLE_MUST_CHECK=y
1387CONFIG_FRAME_WARN=2048
1370CONFIG_MAGIC_SYSRQ=y 1388CONFIG_MAGIC_SYSRQ=y
1371# CONFIG_UNUSED_SYMBOLS is not set 1389# CONFIG_UNUSED_SYMBOLS is not set
1372CONFIG_DEBUG_FS=y 1390CONFIG_DEBUG_FS=y
@@ -1377,6 +1395,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1377# CONFIG_SCHED_DEBUG is not set 1395# CONFIG_SCHED_DEBUG is not set
1378CONFIG_SCHEDSTATS=y 1396CONFIG_SCHEDSTATS=y
1379# CONFIG_TIMER_STATS is not set 1397# CONFIG_TIMER_STATS is not set
1398# CONFIG_DEBUG_OBJECTS is not set
1380# CONFIG_SLUB_DEBUG_ON is not set 1399# CONFIG_SLUB_DEBUG_ON is not set
1381# CONFIG_SLUB_STATS is not set 1400# CONFIG_SLUB_STATS is not set
1382# CONFIG_DEBUG_RT_MUTEXES is not set 1401# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1402,6 +1421,8 @@ CONFIG_DEBUG_BUGVERBOSE=y
1402# CONFIG_LKDTM is not set 1421# CONFIG_LKDTM is not set
1403# CONFIG_FAULT_INJECTION is not set 1422# CONFIG_FAULT_INJECTION is not set
1404# CONFIG_SAMPLES is not set 1423# CONFIG_SAMPLES is not set
1424CONFIG_HAVE_ARCH_KGDB=y
1425# CONFIG_KGDB is not set
1405# CONFIG_DEBUG_STACK_USAGE is not set 1426# CONFIG_DEBUG_STACK_USAGE is not set
1406# CONFIG_DEBUG_DCFLUSH is not set 1427# CONFIG_DEBUG_DCFLUSH is not set
1407# CONFIG_STACK_DEBUG is not set 1428# CONFIG_STACK_DEBUG is not set
@@ -1503,6 +1524,7 @@ CONFIG_CRYPTO_HW=y
1503# Library routines 1524# Library routines
1504# 1525#
1505CONFIG_BITREVERSE=y 1526CONFIG_BITREVERSE=y
1527# CONFIG_GENERIC_FIND_FIRST_BIT is not set
1506CONFIG_CRC_CCITT=m 1528CONFIG_CRC_CCITT=m
1507CONFIG_CRC16=m 1529CONFIG_CRC16=m
1508# CONFIG_CRC_ITU_T is not set 1530# CONFIG_CRC_ITU_T is not set
diff --git a/arch/sparc64/kernel/dtlb_prot.S b/arch/sparc64/kernel/dtlb_prot.S
index e0a920162604..b2c2c5be281c 100644
--- a/arch/sparc64/kernel/dtlb_prot.S
+++ b/arch/sparc64/kernel/dtlb_prot.S
@@ -1,4 +1,4 @@
1/* $Id: dtlb_prot.S,v 1.22 2001/04/11 23:40:32 davem Exp $ 1/*
2 * dtlb_prot.S: DTLB protection trap strategy. 2 * dtlb_prot.S: DTLB protection trap strategy.
3 * This is included directly into the trap table. 3 * This is included directly into the trap table.
4 * 4 *
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
index bc2632274840..c49d0388b793 100644
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -1,4 +1,4 @@
1/* $Id: ebus.c,v 1.64 2001/11/08 04:41:33 davem Exp $ 1/*
2 * ebus.c: PCI to EBus bridge device. 2 * ebus.c: PCI to EBus bridge device.
3 * 3 *
4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S
index f25e1da3fd03..29ce489bc188 100644
--- a/arch/sparc64/kernel/etrap.S
+++ b/arch/sparc64/kernel/etrap.S
@@ -1,4 +1,4 @@
1/* $Id: etrap.S,v 1.46 2002/02/09 19:49:30 davem Exp $ 1/*
2 * etrap.S: Preparing for entry into the kernel on Sparc V9. 2 * etrap.S: Preparing for entry into the kernel on Sparc V9.
3 * 3 *
4 * Copyright (C) 1996, 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/kernel/idprom.c b/arch/sparc64/kernel/idprom.c
index 3b6789e09a72..5b45a808c621 100644
--- a/arch/sparc64/kernel/idprom.c
+++ b/arch/sparc64/kernel/idprom.c
@@ -1,4 +1,4 @@
1/* $Id: idprom.c,v 1.3 1999/08/31 06:54:53 davem Exp $ 1/*
2 * idprom.c: Routines to load the idprom into kernel addresses and 2 * idprom.c: Routines to load the idprom into kernel addresses and
3 * interpret the data contained within. 3 * interpret the data contained within.
4 * 4 *
diff --git a/arch/sparc64/kernel/init_task.c b/arch/sparc64/kernel/init_task.c
index 90007cf88bac..d2b312381c19 100644
--- a/arch/sparc64/kernel/init_task.c
+++ b/arch/sparc64/kernel/init_task.c
@@ -10,7 +10,6 @@
10#include <asm/processor.h> 10#include <asm/processor.h>
11 11
12static struct fs_struct init_fs = INIT_FS; 12static struct fs_struct init_fs = INIT_FS;
13static struct files_struct init_files = INIT_FILES;
14static struct signal_struct init_signals = INIT_SIGNALS(init_signals); 13static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
15static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); 14static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
16struct mm_struct init_mm = INIT_MM(init_mm); 15struct mm_struct init_mm = INIT_MM(init_mm);
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index 4129c0449856..2084f81a76e1 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -1,6 +1,6 @@
1/* arch/sparc64/kernel/process.c 1/* arch/sparc64/kernel/process.c
2 * 2 *
3 * Copyright (C) 1995, 1996 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1995, 1996, 2008 David S. Miller (davem@davemloft.net)
4 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
5 * Copyright (C) 1997, 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 5 * Copyright (C) 1997, 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
6 */ 6 */
@@ -30,6 +30,7 @@
30#include <linux/init.h> 30#include <linux/init.h>
31#include <linux/cpu.h> 31#include <linux/cpu.h>
32#include <linux/elfcore.h> 32#include <linux/elfcore.h>
33#include <linux/sysrq.h>
33 34
34#include <asm/oplib.h> 35#include <asm/oplib.h>
35#include <asm/uaccess.h> 36#include <asm/uaccess.h>
@@ -49,6 +50,8 @@
49#include <asm/sstate.h> 50#include <asm/sstate.h>
50#include <asm/reboot.h> 51#include <asm/reboot.h>
51#include <asm/syscalls.h> 52#include <asm/syscalls.h>
53#include <asm/irq_regs.h>
54#include <asm/smp.h>
52 55
53/* #define VERBOSE_SHOWREGS */ 56/* #define VERBOSE_SHOWREGS */
54 57
@@ -298,6 +301,118 @@ void show_regs(struct pt_regs *regs)
298#endif 301#endif
299} 302}
300 303
304#ifdef CONFIG_MAGIC_SYSRQ
305struct global_reg_snapshot global_reg_snapshot[NR_CPUS];
306static DEFINE_SPINLOCK(global_reg_snapshot_lock);
307
308static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs,
309 int this_cpu)
310{
311 flushw_all();
312
313 global_reg_snapshot[this_cpu].tstate = regs->tstate;
314 global_reg_snapshot[this_cpu].tpc = regs->tpc;
315 global_reg_snapshot[this_cpu].tnpc = regs->tnpc;
316 global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7];
317
318 if (regs->tstate & TSTATE_PRIV) {
319 struct reg_window *rw;
320
321 rw = (struct reg_window *)
322 (regs->u_regs[UREG_FP] + STACK_BIAS);
323 global_reg_snapshot[this_cpu].i7 = rw->ins[6];
324 } else
325 global_reg_snapshot[this_cpu].i7 = 0;
326
327 global_reg_snapshot[this_cpu].thread = tp;
328}
329
330/* In order to avoid hangs we do not try to synchronize with the
331 * global register dump client cpus. The last store they make is to
332 * the thread pointer, so do a short poll waiting for that to become
333 * non-NULL.
334 */
335static void __global_reg_poll(struct global_reg_snapshot *gp)
336{
337 int limit = 0;
338
339 while (!gp->thread && ++limit < 100) {
340 barrier();
341 udelay(1);
342 }
343}
344
345static void sysrq_handle_globreg(int key, struct tty_struct *tty)
346{
347 struct thread_info *tp = current_thread_info();
348 struct pt_regs *regs = get_irq_regs();
349#ifdef CONFIG_KALLSYMS
350 char buffer[KSYM_SYMBOL_LEN];
351#endif
352 unsigned long flags;
353 int this_cpu, cpu;
354
355 if (!regs)
356 regs = tp->kregs;
357
358 spin_lock_irqsave(&global_reg_snapshot_lock, flags);
359
360 memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot));
361
362 this_cpu = raw_smp_processor_id();
363
364 __global_reg_self(tp, regs, this_cpu);
365
366 smp_fetch_global_regs();
367
368 for_each_online_cpu(cpu) {
369 struct global_reg_snapshot *gp = &global_reg_snapshot[cpu];
370 struct thread_info *tp;
371
372 __global_reg_poll(gp);
373
374 tp = gp->thread;
375 printk("%c CPU[%3d]: TSTATE[%016lx] TPC[%016lx] TNPC[%016lx] TASK[%s:%d]\n",
376 (cpu == this_cpu ? '*' : ' '), cpu,
377 gp->tstate, gp->tpc, gp->tnpc,
378 ((tp && tp->task) ? tp->task->comm : "NULL"),
379 ((tp && tp->task) ? tp->task->pid : -1));
380#ifdef CONFIG_KALLSYMS
381 if (gp->tstate & TSTATE_PRIV) {
382 sprint_symbol(buffer, gp->tpc);
383 printk(" TPC[%s] ", buffer);
384 sprint_symbol(buffer, gp->o7);
385 printk("O7[%s] ", buffer);
386 sprint_symbol(buffer, gp->i7);
387 printk("I7[%s]\n", buffer);
388 } else
389#endif
390 {
391 printk(" TPC[%lx] O7[%lx] I7[%lx]\n",
392 gp->tpc, gp->o7, gp->i7);
393 }
394 }
395
396 memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot));
397
398 spin_unlock_irqrestore(&global_reg_snapshot_lock, flags);
399}
400
401static struct sysrq_key_op sparc_globalreg_op = {
402 .handler = sysrq_handle_globreg,
403 .help_msg = "Globalregs",
404 .action_msg = "Show Global CPU Regs",
405};
406
407static int __init sparc_globreg_init(void)
408{
409 return register_sysrq_key('y', &sparc_globalreg_op);
410}
411
412core_initcall(sparc_globreg_init);
413
414#endif
415
301unsigned long thread_saved_pc(struct task_struct *tsk) 416unsigned long thread_saved_pc(struct task_struct *tsk)
302{ 417{
303 struct thread_info *ti = task_thread_info(tsk); 418 struct thread_info *ti = task_thread_info(tsk);
@@ -542,20 +657,39 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
542 struct task_struct *p, struct pt_regs *regs) 657 struct task_struct *p, struct pt_regs *regs)
543{ 658{
544 struct thread_info *t = task_thread_info(p); 659 struct thread_info *t = task_thread_info(p);
660 struct sparc_stackf *parent_sf;
661 unsigned long child_stack_sz;
545 char *child_trap_frame; 662 char *child_trap_frame;
663 int kernel_thread;
546 664
547 /* Calculate offset to stack_frame & pt_regs */ 665 kernel_thread = (regs->tstate & TSTATE_PRIV) ? 1 : 0;
548 child_trap_frame = task_stack_page(p) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ)); 666 parent_sf = ((struct sparc_stackf *) regs) - 1;
549 memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ));
550 667
551 t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) | 668 /* Calculate offset to stack_frame & pt_regs */
669 child_stack_sz = ((STACKFRAME_SZ + TRACEREG_SZ) +
670 (kernel_thread ? STACKFRAME_SZ : 0));
671 child_trap_frame = (task_stack_page(p) +
672 (THREAD_SIZE - child_stack_sz));
673 memcpy(child_trap_frame, parent_sf, child_stack_sz);
674
675 t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) |
676 (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) |
552 (((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT); 677 (((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT);
553 t->new_child = 1; 678 t->new_child = 1;
554 t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS; 679 t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS;
555 t->kregs = (struct pt_regs *)(child_trap_frame+sizeof(struct sparc_stackf)); 680 t->kregs = (struct pt_regs *) (child_trap_frame +
681 sizeof(struct sparc_stackf));
556 t->fpsaved[0] = 0; 682 t->fpsaved[0] = 0;
557 683
558 if (regs->tstate & TSTATE_PRIV) { 684 if (kernel_thread) {
685 struct sparc_stackf *child_sf = (struct sparc_stackf *)
686 (child_trap_frame + (STACKFRAME_SZ + TRACEREG_SZ));
687
688 /* Zero terminate the stack backtrace. */
689 child_sf->fp = NULL;
690 t->kregs->u_regs[UREG_FP] =
691 ((unsigned long) child_sf) - STACK_BIAS;
692
559 /* Special case, if we are spawning a kernel thread from 693 /* Special case, if we are spawning a kernel thread from
560 * a userspace task (via KMOD, NFS, or similar) we must 694 * a userspace task (via KMOD, NFS, or similar) we must
561 * disable performance counters in the child because the 695 * disable performance counters in the child because the
@@ -566,12 +700,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
566 t->pcr_reg = 0; 700 t->pcr_reg = 0;
567 t->flags &= ~_TIF_PERFCTR; 701 t->flags &= ~_TIF_PERFCTR;
568 } 702 }
569 t->kregs->u_regs[UREG_FP] = t->ksp;
570 t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT); 703 t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT);
571 flush_register_windows();
572 memcpy((void *)(t->ksp + STACK_BIAS),
573 (void *)(regs->u_regs[UREG_FP] + STACK_BIAS),
574 sizeof(struct sparc_stackf));
575 t->kregs->u_regs[UREG_G6] = (unsigned long) t; 704 t->kregs->u_regs[UREG_G6] = (unsigned long) t;
576 t->kregs->u_regs[UREG_G4] = (unsigned long) t->task; 705 t->kregs->u_regs[UREG_G4] = (unsigned long) t->task;
577 } else { 706 } else {
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S
index b9b785fd8b46..c6fc695fe1fe 100644
--- a/arch/sparc64/kernel/rtrap.S
+++ b/arch/sparc64/kernel/rtrap.S
@@ -1,4 +1,4 @@
1/* $Id: rtrap.S,v 1.61 2002/02/09 19:49:31 davem Exp $ 1/*
2 * rtrap.S: Preparing for return from trap on Sparc V9. 2 * rtrap.S: Preparing for return from trap on Sparc V9.
3 * 3 *
4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
@@ -46,7 +46,7 @@ __handle_user_windows:
46 wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate 46 wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
47 ldx [%g6 + TI_FLAGS], %l0 47 ldx [%g6 + TI_FLAGS], %l0
48 48
491: andcc %l0, (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK), %g0 491: andcc %l0, _TIF_SIGPENDING, %g0
50 be,pt %xcc, __handle_user_windows_continue 50 be,pt %xcc, __handle_user_windows_continue
51 nop 51 nop
52 mov %l5, %o1 52 mov %l5, %o1
@@ -86,7 +86,7 @@ __handle_perfctrs:
86 wrpr %g0, RTRAP_PSTATE, %pstate 86 wrpr %g0, RTRAP_PSTATE, %pstate
87 wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate 87 wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate
88 ldx [%g6 + TI_FLAGS], %l0 88 ldx [%g6 + TI_FLAGS], %l0
891: andcc %l0, (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK), %g0 891: andcc %l0, _TIF_SIGPENDING, %g0
90 90
91 be,pt %xcc, __handle_perfctrs_continue 91 be,pt %xcc, __handle_perfctrs_continue
92 sethi %hi(TSTATE_PEF), %o0 92 sethi %hi(TSTATE_PEF), %o0
@@ -195,7 +195,7 @@ __handle_preemption_continue:
195 andcc %l1, %o0, %g0 195 andcc %l1, %o0, %g0
196 andcc %l0, _TIF_NEED_RESCHED, %g0 196 andcc %l0, _TIF_NEED_RESCHED, %g0
197 bne,pn %xcc, __handle_preemption 197 bne,pn %xcc, __handle_preemption
198 andcc %l0, (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK), %g0 198 andcc %l0, _TIF_SIGPENDING, %g0
199 bne,pn %xcc, __handle_signal 199 bne,pn %xcc, __handle_signal
200__handle_signal_continue: 200__handle_signal_continue:
201 ldub [%g6 + TI_WSAVED], %o2 201 ldub [%g6 + TI_WSAVED], %o2
@@ -363,6 +363,7 @@ kern_rtt: rdpr %canrestore, %g1
363 brz,pn %g1, kern_rtt_fill 363 brz,pn %g1, kern_rtt_fill
364 nop 364 nop
365kern_rtt_restore: 365kern_rtt_restore:
366 stw %g0, [%sp + PTREGS_OFF + PT_V9_MAGIC]
366 restore 367 restore
367 retry 368 retry
368 369
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c
index fa2827c4a3ad..e33a8a660e9e 100644
--- a/arch/sparc64/kernel/sbus.c
+++ b/arch/sparc64/kernel/sbus.c
@@ -1,4 +1,4 @@
1/* $Id: sbus.c,v 1.19 2002/01/23 11:27:32 davem Exp $ 1/*
2 * sbus.c: UltraSparc SBUS controller support. 2 * sbus.c: UltraSparc SBUS controller support.
3 * 3 *
4 * Copyright (C) 1999 David S. Miller (davem@redhat.com) 4 * Copyright (C) 1999 David S. Miller (davem@redhat.com)
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index da5e6ee0c661..c8b03a4f68bf 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -1,4 +1,4 @@
1/* $Id: setup.c,v 1.72 2002/02/09 19:49:30 davem Exp $ 1/*
2 * linux/arch/sparc64/kernel/setup.c 2 * linux/arch/sparc64/kernel/setup.c
3 * 3 *
4 * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c
index 2378482c2aab..9667e96fd513 100644
--- a/arch/sparc64/kernel/signal.c
+++ b/arch/sparc64/kernel/signal.c
@@ -1,4 +1,4 @@
1/* $Id: signal.c,v 1.60 2002/02/09 19:49:31 davem Exp $ 1/*
2 * arch/sparc64/kernel/signal.c 2 * arch/sparc64/kernel/signal.c
3 * 3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Copyright (C) 1991, 1992 Linus Torvalds
@@ -247,7 +247,9 @@ static long _sigpause_common(old_sigset_t set)
247 247
248 current->state = TASK_INTERRUPTIBLE; 248 current->state = TASK_INTERRUPTIBLE;
249 schedule(); 249 schedule();
250 set_thread_flag(TIF_RESTORE_SIGMASK); 250
251 set_restore_sigmask();
252
251 return -ERESTARTNOHAND; 253 return -ERESTARTNOHAND;
252} 254}
253 255
@@ -537,7 +539,7 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
537 } else 539 } else
538 restart_syscall = 0; 540 restart_syscall = 0;
539 541
540 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 542 if (current_thread_info()->status & TS_RESTORE_SIGMASK)
541 oldset = &current->saved_sigmask; 543 oldset = &current->saved_sigmask;
542 else 544 else
543 oldset = &current->blocked; 545 oldset = &current->blocked;
@@ -566,13 +568,12 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
566 syscall_restart(orig_i0, regs, &ka.sa); 568 syscall_restart(orig_i0, regs, &ka.sa);
567 handle_signal(signr, &ka, &info, oldset, regs); 569 handle_signal(signr, &ka, &info, oldset, regs);
568 570
569 /* a signal was successfully delivered; the saved 571 /* A signal was successfully delivered; the saved
570 * sigmask will have been stored in the signal frame, 572 * sigmask will have been stored in the signal frame,
571 * and will be restored by sigreturn, so we can simply 573 * and will be restored by sigreturn, so we can simply
572 * clear the TIF_RESTORE_SIGMASK flag. 574 * clear the TS_RESTORE_SIGMASK flag.
573 */ 575 */
574 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 576 current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
575 clear_thread_flag(TIF_RESTORE_SIGMASK);
576 return; 577 return;
577 } 578 }
578 if (restart_syscall && 579 if (restart_syscall &&
@@ -591,17 +592,17 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0)
591 regs->tnpc -= 4; 592 regs->tnpc -= 4;
592 } 593 }
593 594
594 /* if there's no signal to deliver, we just put the saved sigmask 595 /* If there's no signal to deliver, we just put the saved sigmask
595 * back 596 * back
596 */ 597 */
597 if (test_thread_flag(TIF_RESTORE_SIGMASK)) { 598 if (current_thread_info()->status & TS_RESTORE_SIGMASK) {
598 clear_thread_flag(TIF_RESTORE_SIGMASK); 599 current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
599 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL); 600 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
600 } 601 }
601} 602}
602 603
603void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long thread_info_flags) 604void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long thread_info_flags)
604{ 605{
605 if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) 606 if (thread_info_flags & _TIF_SIGPENDING)
606 do_signal(regs, orig_i0); 607 do_signal(regs, orig_i0);
607} 608}
diff --git a/arch/sparc64/kernel/signal32.c b/arch/sparc64/kernel/signal32.c
index 3f19e9af3d1b..97cdd1bf4a10 100644
--- a/arch/sparc64/kernel/signal32.c
+++ b/arch/sparc64/kernel/signal32.c
@@ -788,13 +788,12 @@ void do_signal32(sigset_t *oldset, struct pt_regs * regs,
788 syscall_restart32(orig_i0, regs, &ka.sa); 788 syscall_restart32(orig_i0, regs, &ka.sa);
789 handle_signal32(signr, &ka, &info, oldset, regs); 789 handle_signal32(signr, &ka, &info, oldset, regs);
790 790
791 /* a signal was successfully delivered; the saved 791 /* A signal was successfully delivered; the saved
792 * sigmask will have been stored in the signal frame, 792 * sigmask will have been stored in the signal frame,
793 * and will be restored by sigreturn, so we can simply 793 * and will be restored by sigreturn, so we can simply
794 * clear the TIF_RESTORE_SIGMASK flag. 794 * clear the TS_RESTORE_SIGMASK flag.
795 */ 795 */
796 if (test_thread_flag(TIF_RESTORE_SIGMASK)) 796 current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
797 clear_thread_flag(TIF_RESTORE_SIGMASK);
798 return; 797 return;
799 } 798 }
800 if (restart_syscall && 799 if (restart_syscall &&
@@ -813,11 +812,11 @@ void do_signal32(sigset_t *oldset, struct pt_regs * regs,
813 regs->tnpc -= 4; 812 regs->tnpc -= 4;
814 } 813 }
815 814
816 /* if there's no signal to deliver, we just put the saved sigmask 815 /* If there's no signal to deliver, we just put the saved sigmask
817 * back 816 * back
818 */ 817 */
819 if (test_thread_flag(TIF_RESTORE_SIGMASK)) { 818 if (current_thread_info()->status & TS_RESTORE_SIGMASK) {
820 clear_thread_flag(TIF_RESTORE_SIGMASK); 819 current_thread_info()->status &= ~TS_RESTORE_SIGMASK;
821 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL); 820 sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
822 } 821 }
823} 822}
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 0d6403a630ac..fa63c68a1819 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -900,6 +900,9 @@ extern unsigned long xcall_flush_tlb_mm;
900extern unsigned long xcall_flush_tlb_pending; 900extern unsigned long xcall_flush_tlb_pending;
901extern unsigned long xcall_flush_tlb_kernel_range; 901extern unsigned long xcall_flush_tlb_kernel_range;
902extern unsigned long xcall_report_regs; 902extern unsigned long xcall_report_regs;
903#ifdef CONFIG_MAGIC_SYSRQ
904extern unsigned long xcall_fetch_glob_regs;
905#endif
903extern unsigned long xcall_receive_signal; 906extern unsigned long xcall_receive_signal;
904extern unsigned long xcall_new_mmu_context_version; 907extern unsigned long xcall_new_mmu_context_version;
905#ifdef CONFIG_KGDB 908#ifdef CONFIG_KGDB
@@ -1080,6 +1083,13 @@ void smp_report_regs(void)
1080 smp_cross_call(&xcall_report_regs, 0, 0, 0); 1083 smp_cross_call(&xcall_report_regs, 0, 0, 0);
1081} 1084}
1082 1085
1086#ifdef CONFIG_MAGIC_SYSRQ
1087void smp_fetch_global_regs(void)
1088{
1089 smp_cross_call(&xcall_fetch_glob_regs, 0, 0, 0);
1090}
1091#endif
1092
1083/* We know that the window frames of the user have been flushed 1093/* We know that the window frames of the user have been flushed
1084 * to the stack before we get here because all callers of us 1094 * to the stack before we get here because all callers of us
1085 * are flush_tlb_*() routines, and these run after flush_cache_*() 1095 * are flush_tlb_*() routines, and these run after flush_cache_*()
diff --git a/arch/sparc64/kernel/stacktrace.c b/arch/sparc64/kernel/stacktrace.c
index 01b52f561af4..c73ce3f4197e 100644
--- a/arch/sparc64/kernel/stacktrace.c
+++ b/arch/sparc64/kernel/stacktrace.c
@@ -19,7 +19,7 @@ void save_stack_trace(struct stack_trace *trace)
19 fp = ksp + STACK_BIAS; 19 fp = ksp + STACK_BIAS;
20 thread_base = (unsigned long) tp; 20 thread_base = (unsigned long) tp;
21 do { 21 do {
22 struct reg_window *rw; 22 struct sparc_stackf *sf;
23 struct pt_regs *regs; 23 struct pt_regs *regs;
24 unsigned long pc; 24 unsigned long pc;
25 25
@@ -28,15 +28,17 @@ void save_stack_trace(struct stack_trace *trace)
28 fp >= (thread_base + THREAD_SIZE)) 28 fp >= (thread_base + THREAD_SIZE))
29 break; 29 break;
30 30
31 rw = (struct reg_window *) fp; 31 sf = (struct sparc_stackf *) fp;
32 regs = (struct pt_regs *) (rw + 1); 32 regs = (struct pt_regs *) (sf + 1);
33 33
34 if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { 34 if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) {
35 if (!(regs->tstate & TSTATE_PRIV))
36 break;
35 pc = regs->tpc; 37 pc = regs->tpc;
36 fp = regs->u_regs[UREG_I6] + STACK_BIAS; 38 fp = regs->u_regs[UREG_I6] + STACK_BIAS;
37 } else { 39 } else {
38 pc = rw->ins[7]; 40 pc = sf->callers_pc;
39 fp = rw->ins[6] + STACK_BIAS; 41 fp = (unsigned long)sf->fp + STACK_BIAS;
40 } 42 }
41 43
42 if (trace->skip > 0) 44 if (trace->skip > 0)
diff --git a/arch/sparc64/kernel/starfire.c b/arch/sparc64/kernel/starfire.c
index b930fee7708a..7461581b3bb9 100644
--- a/arch/sparc64/kernel/starfire.c
+++ b/arch/sparc64/kernel/starfire.c
@@ -1,4 +1,4 @@
1/* $Id: starfire.c,v 1.10 2001/04/14 21:13:45 davem Exp $ 1/*
2 * starfire.c: Starfire/E10000 support. 2 * starfire.c: Starfire/E10000 support.
3 * 3 *
4 * Copyright (C) 1998 David S. Miller (davem@redhat.com) 4 * Copyright (C) 1998 David S. Miller (davem@redhat.com)
diff --git a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S
index 010a737908ee..ade18ba0c686 100644
--- a/arch/sparc64/kernel/sys32.S
+++ b/arch/sparc64/kernel/sys32.S
@@ -1,4 +1,4 @@
1/* $Id: sys32.S,v 1.12 2000/03/24 04:17:37 davem Exp $ 1/*
2 * sys32.S: I-cache tricks for 32-bit compatibility layer simple 2 * sys32.S: I-cache tricks for 32-bit compatibility layer simple
3 * conversions. 3 * conversions.
4 * 4 *
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index 0dbc941f130e..ac1bff58c1ac 100644
--- a/arch/sparc64/kernel/sys_sparc.c
+++ b/arch/sparc64/kernel/sys_sparc.c
@@ -542,8 +542,7 @@ asmlinkage long sparc64_personality(unsigned long personality)
542 return ret; 542 return ret;
543} 543}
544 544
545int sparc64_mmap_check(unsigned long addr, unsigned long len, 545int sparc64_mmap_check(unsigned long addr, unsigned long len)
546 unsigned long flags)
547{ 546{
548 if (test_thread_flag(TIF_32BIT)) { 547 if (test_thread_flag(TIF_32BIT)) {
549 if (len >= STACK_TOP32) 548 if (len >= STACK_TOP32)
@@ -609,46 +608,19 @@ asmlinkage unsigned long sys64_mremap(unsigned long addr,
609 unsigned long old_len, unsigned long new_len, 608 unsigned long old_len, unsigned long new_len,
610 unsigned long flags, unsigned long new_addr) 609 unsigned long flags, unsigned long new_addr)
611{ 610{
612 struct vm_area_struct *vma;
613 unsigned long ret = -EINVAL; 611 unsigned long ret = -EINVAL;
614 612
615 if (test_thread_flag(TIF_32BIT)) 613 if (test_thread_flag(TIF_32BIT))
616 goto out; 614 goto out;
617 if (unlikely(new_len >= VA_EXCLUDE_START)) 615 if (unlikely(new_len >= VA_EXCLUDE_START))
618 goto out; 616 goto out;
619 if (unlikely(invalid_64bit_range(addr, old_len))) 617 if (unlikely(sparc64_mmap_check(addr, old_len)))
618 goto out;
619 if (unlikely(sparc64_mmap_check(new_addr, new_len)))
620 goto out; 620 goto out;
621 621
622 down_write(&current->mm->mmap_sem); 622 down_write(&current->mm->mmap_sem);
623 if (flags & MREMAP_FIXED) {
624 if (invalid_64bit_range(new_addr, new_len))
625 goto out_sem;
626 } else if (invalid_64bit_range(addr, new_len)) {
627 unsigned long map_flags = 0;
628 struct file *file = NULL;
629
630 ret = -ENOMEM;
631 if (!(flags & MREMAP_MAYMOVE))
632 goto out_sem;
633
634 vma = find_vma(current->mm, addr);
635 if (vma) {
636 if (vma->vm_flags & VM_SHARED)
637 map_flags |= MAP_SHARED;
638 file = vma->vm_file;
639 }
640
641 /* MREMAP_FIXED checked above. */
642 new_addr = get_unmapped_area(file, addr, new_len,
643 vma ? vma->vm_pgoff : 0,
644 map_flags);
645 ret = new_addr;
646 if (new_addr & ~PAGE_MASK)
647 goto out_sem;
648 flags |= MREMAP_FIXED;
649 }
650 ret = do_mremap(addr, old_len, new_len, flags, new_addr); 623 ret = do_mremap(addr, old_len, new_len, flags, new_addr);
651out_sem:
652 up_write(&current->mm->mmap_sem); 624 up_write(&current->mm->mmap_sem);
653out: 625out:
654 return ret; 626 return ret;
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 1aa4288125f2..ba5bd626b39e 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -867,44 +867,15 @@ asmlinkage unsigned long sys32_mremap(unsigned long addr,
867 unsigned long old_len, unsigned long new_len, 867 unsigned long old_len, unsigned long new_len,
868 unsigned long flags, u32 __new_addr) 868 unsigned long flags, u32 __new_addr)
869{ 869{
870 struct vm_area_struct *vma;
871 unsigned long ret = -EINVAL; 870 unsigned long ret = -EINVAL;
872 unsigned long new_addr = __new_addr; 871 unsigned long new_addr = __new_addr;
873 872
874 if (old_len > STACK_TOP32 || new_len > STACK_TOP32) 873 if (unlikely(sparc64_mmap_check(addr, old_len)))
875 goto out; 874 goto out;
876 if (addr > STACK_TOP32 - old_len) 875 if (unlikely(sparc64_mmap_check(new_addr, new_len)))
877 goto out; 876 goto out;
878 down_write(&current->mm->mmap_sem); 877 down_write(&current->mm->mmap_sem);
879 if (flags & MREMAP_FIXED) {
880 if (new_addr > STACK_TOP32 - new_len)
881 goto out_sem;
882 } else if (addr > STACK_TOP32 - new_len) {
883 unsigned long map_flags = 0;
884 struct file *file = NULL;
885
886 ret = -ENOMEM;
887 if (!(flags & MREMAP_MAYMOVE))
888 goto out_sem;
889
890 vma = find_vma(current->mm, addr);
891 if (vma) {
892 if (vma->vm_flags & VM_SHARED)
893 map_flags |= MAP_SHARED;
894 file = vma->vm_file;
895 }
896
897 /* MREMAP_FIXED checked above. */
898 new_addr = get_unmapped_area(file, addr, new_len,
899 vma ? vma->vm_pgoff : 0,
900 map_flags);
901 ret = new_addr;
902 if (new_addr & ~PAGE_MASK)
903 goto out_sem;
904 flags |= MREMAP_FIXED;
905 }
906 ret = do_mremap(addr, old_len, new_len, flags, new_addr); 878 ret = do_mremap(addr, old_len, new_len, flags, new_addr);
907out_sem:
908 up_write(&current->mm->mmap_sem); 879 up_write(&current->mm->mmap_sem);
909out: 880out:
910 return ret; 881 return ret;
diff --git a/arch/sparc64/kernel/trampoline.S b/arch/sparc64/kernel/trampoline.S
index 56ff55211341..704a3afcfd06 100644
--- a/arch/sparc64/kernel/trampoline.S
+++ b/arch/sparc64/kernel/trampoline.S
@@ -1,4 +1,4 @@
1/* $Id: trampoline.S,v 1.26 2002/02/09 19:49:30 davem Exp $ 1/*
2 * trampoline.S: Jump start slave processors on sparc64. 2 * trampoline.S: Jump start slave processors on sparc64.
3 * 3 *
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index d9b8d46707d1..369749262653 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -2116,7 +2116,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
2116 printk("\n"); 2116 printk("\n");
2117#endif 2117#endif
2118 do { 2118 do {
2119 struct reg_window *rw; 2119 struct sparc_stackf *sf;
2120 struct pt_regs *regs; 2120 struct pt_regs *regs;
2121 unsigned long pc; 2121 unsigned long pc;
2122 2122
@@ -2124,15 +2124,17 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
2124 if (fp < (thread_base + sizeof(struct thread_info)) || 2124 if (fp < (thread_base + sizeof(struct thread_info)) ||
2125 fp >= (thread_base + THREAD_SIZE)) 2125 fp >= (thread_base + THREAD_SIZE))
2126 break; 2126 break;
2127 rw = (struct reg_window *)fp; 2127 sf = (struct sparc_stackf *) fp;
2128 regs = (struct pt_regs *) (rw + 1); 2128 regs = (struct pt_regs *) (sf + 1);
2129 2129
2130 if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) { 2130 if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) {
2131 if (!(regs->tstate & TSTATE_PRIV))
2132 break;
2131 pc = regs->tpc; 2133 pc = regs->tpc;
2132 fp = regs->u_regs[UREG_I6] + STACK_BIAS; 2134 fp = regs->u_regs[UREG_I6] + STACK_BIAS;
2133 } else { 2135 } else {
2134 pc = rw->ins[7]; 2136 pc = sf->callers_pc;
2135 fp = rw->ins[6] + STACK_BIAS; 2137 fp = (unsigned long)sf->fp + STACK_BIAS;
2136 } 2138 }
2137 2139
2138 printk(" [%016lx] ", pc); 2140 printk(" [%016lx] ", pc);
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c
index 1a511e9f0d3e..afa7fc4f5193 100644
--- a/arch/sparc64/kernel/unaligned.c
+++ b/arch/sparc64/kernel/unaligned.c
@@ -1,4 +1,4 @@
1/* $Id: unaligned.c,v 1.24 2002/02/09 19:49:31 davem Exp $ 1/*
2 * unaligned.c: Unaligned load/store trap handling with special 2 * unaligned.c: Unaligned load/store trap handling with special
3 * cases for the kernel to do them more quickly. 3 * cases for the kernel to do them more quickly.
4 * 4 *
diff --git a/arch/sparc64/lib/PeeCeeI.c b/arch/sparc64/lib/PeeCeeI.c
index 3c6cfbb20360..8b313f11bc8d 100644
--- a/arch/sparc64/lib/PeeCeeI.c
+++ b/arch/sparc64/lib/PeeCeeI.c
@@ -1,4 +1,4 @@
1/* $Id: PeeCeeI.c,v 1.4 1999/09/06 01:17:35 davem Exp $ 1/*
2 * PeeCeeI.c: The emerging standard... 2 * PeeCeeI.c: The emerging standard...
3 * 3 *
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/lib/VISsave.S b/arch/sparc64/lib/VISsave.S
index a0ded5c5aa5c..b320ae9e2e2e 100644
--- a/arch/sparc64/lib/VISsave.S
+++ b/arch/sparc64/lib/VISsave.S
@@ -1,4 +1,4 @@
1/* $Id: VISsave.S,v 1.6 2002/02/09 19:49:30 davem Exp $ 1/*
2 * VISsave.S: Code for saving FPU register state for 2 * VISsave.S: Code for saving FPU register state for
3 * VIS routines. One should not call this directly, 3 * VIS routines. One should not call this directly,
4 * but use macros provided in <asm/visasm.h>. 4 * but use macros provided in <asm/visasm.h>.
diff --git a/arch/sparc64/lib/memcmp.S b/arch/sparc64/lib/memcmp.S
index c90ad96c51b9..d3fdaa898566 100644
--- a/arch/sparc64/lib/memcmp.S
+++ b/arch/sparc64/lib/memcmp.S
@@ -1,4 +1,4 @@
1/* $Id: memcmp.S,v 1.3 2000/03/23 07:51:08 davem Exp $ 1/*
2 * Sparc64 optimized memcmp code. 2 * Sparc64 optimized memcmp code.
3 * 3 *
4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/arch/sparc64/lib/memscan.S b/arch/sparc64/lib/memscan.S
index 5e72d4911417..5686dfa5dc15 100644
--- a/arch/sparc64/lib/memscan.S
+++ b/arch/sparc64/lib/memscan.S
@@ -1,4 +1,4 @@
1/* $Id: memscan.S,v 1.3 2000/01/31 04:59:10 davem Exp $ 1/*
2 * memscan.S: Optimized memscan for Sparc64. 2 * memscan.S: Optimized memscan for Sparc64.
3 * 3 *
4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz) 4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
diff --git a/arch/sparc64/lib/strncmp.S b/arch/sparc64/lib/strncmp.S
index 6f14f53dbabe..980e83751556 100644
--- a/arch/sparc64/lib/strncmp.S
+++ b/arch/sparc64/lib/strncmp.S
@@ -1,4 +1,4 @@
1/* $Id: strncmp.S,v 1.2 1997/03/11 17:51:44 jj Exp $ 1/*
2 * Sparc64 optimized strncmp code. 2 * Sparc64 optimized strncmp code.
3 * 3 *
4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/arch/sparc64/lib/strncpy_from_user.S b/arch/sparc64/lib/strncpy_from_user.S
index b2f499f79427..511c8f136f95 100644
--- a/arch/sparc64/lib/strncpy_from_user.S
+++ b/arch/sparc64/lib/strncpy_from_user.S
@@ -1,4 +1,4 @@
1/* $Id: strncpy_from_user.S,v 1.6 1999/05/25 16:53:05 jj Exp $ 1/*
2 * strncpy_from_user.S: Sparc64 strncpy from userspace. 2 * strncpy_from_user.S: Sparc64 strncpy from userspace.
3 * 3 *
4 * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz) 4 * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz)
diff --git a/arch/sparc64/math-emu/math.c b/arch/sparc64/math-emu/math.c
index 6ee496c2864a..add053e0f3b3 100644
--- a/arch/sparc64/math-emu/math.c
+++ b/arch/sparc64/math-emu/math.c
@@ -1,4 +1,4 @@
1/* $Id: math.c,v 1.11 1999/12/20 05:02:25 davem Exp $ 1/*
2 * arch/sparc64/math-emu/math.c 2 * arch/sparc64/math-emu/math.c
3 * 3 *
4 * Copyright (C) 1997,1999 Jakub Jelinek (jj@ultra.linux.cz) 4 * Copyright (C) 1997,1999 Jakub Jelinek (jj@ultra.linux.cz)
diff --git a/arch/sparc64/math-emu/sfp-util.h b/arch/sparc64/math-emu/sfp-util.h
index 31e474738cf6..425d3cf01af4 100644
--- a/arch/sparc64/math-emu/sfp-util.h
+++ b/arch/sparc64/math-emu/sfp-util.h
@@ -1,4 +1,4 @@
1/* $Id: sfp-util.h,v 1.5 2001/06/10 06:48:46 davem Exp $ 1/*
2 * arch/sparc64/math-emu/sfp-util.h 2 * arch/sparc64/math-emu/sfp-util.h
3 * 3 *
4 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) 4 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz)
diff --git a/arch/sparc64/mm/Makefile b/arch/sparc64/mm/Makefile
index e415bf942bcd..68d04c0370f4 100644
--- a/arch/sparc64/mm/Makefile
+++ b/arch/sparc64/mm/Makefile
@@ -1,4 +1,3 @@
1# $Id: Makefile,v 1.8 2000/12/14 22:57:25 davem Exp $
2# Makefile for the linux Sparc64-specific parts of the memory manager. 1# Makefile for the linux Sparc64-specific parts of the memory manager.
3# 2#
4 3
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c
index 2650d0d33ac2..236f4d228d2b 100644
--- a/arch/sparc64/mm/fault.c
+++ b/arch/sparc64/mm/fault.c
@@ -1,4 +1,4 @@
1/* $Id: fault.c,v 1.59 2002/02/09 19:49:31 davem Exp $ 1/*
2 * arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc. 2 * arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc.
3 * 3 *
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c
index af9d81db0b38..f362c2037013 100644
--- a/arch/sparc64/mm/generic.c
+++ b/arch/sparc64/mm/generic.c
@@ -1,4 +1,4 @@
1/* $Id: generic.c,v 1.18 2001/12/21 04:56:15 davem Exp $ 1/*
2 * generic.c: Generic Sparc mm routines that are not dependent upon 2 * generic.c: Generic Sparc mm routines that are not dependent upon
3 * MMU type but are Sparc specific. 3 * MMU type but are Sparc specific.
4 * 4 *
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index ec3e2c72302a..84898c44dd4d 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -1,4 +1,4 @@
1/* $Id: init.c,v 1.209 2002/02/09 19:49:31 davem Exp $ 1/*
2 * arch/sparc64/mm/init.c 2 * arch/sparc64/mm/init.c
3 * 3 *
4 * Copyright (C) 1996-1999 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996-1999 David S. Miller (davem@caip.rutgers.edu)
@@ -610,8 +610,6 @@ static void __init remap_kernel(void)
610 610
611static void __init inherit_prom_mappings(void) 611static void __init inherit_prom_mappings(void)
612{ 612{
613 read_obp_translations();
614
615 /* Now fixup OBP's idea about where we really are mapped. */ 613 /* Now fixup OBP's idea about where we really are mapped. */
616 printk("Remapping the kernel... "); 614 printk("Remapping the kernel... ");
617 remap_kernel(); 615 remap_kernel();
@@ -770,7 +768,7 @@ static void __init find_ramdisk(unsigned long phys_base)
770 initrd_start = ramdisk_image; 768 initrd_start = ramdisk_image;
771 initrd_end = ramdisk_image + sparc_ramdisk_size; 769 initrd_end = ramdisk_image + sparc_ramdisk_size;
772 770
773 lmb_reserve(initrd_start, initrd_end); 771 lmb_reserve(initrd_start, sparc_ramdisk_size);
774 772
775 initrd_start += PAGE_OFFSET; 773 initrd_start += PAGE_OFFSET;
776 initrd_end += PAGE_OFFSET; 774 initrd_end += PAGE_OFFSET;
@@ -1747,7 +1745,17 @@ void __init paging_init(void)
1747 1745
1748 lmb_init(); 1746 lmb_init();
1749 1747
1750 /* Find available physical memory... */ 1748 /* Find available physical memory...
1749 *
1750 * Read it twice in order to work around a bug in openfirmware.
1751 * The call to grab this table itself can cause openfirmware to
1752 * allocate memory, which in turn can take away some space from
1753 * the list of available memory. Reading it twice makes sure
1754 * we really do get the final value.
1755 */
1756 read_obp_translations();
1757 read_obp_memory("reg", &pall[0], &pall_ents);
1758 read_obp_memory("available", &pavail[0], &pavail_ents);
1751 read_obp_memory("available", &pavail[0], &pavail_ents); 1759 read_obp_memory("available", &pavail[0], &pavail_ents);
1752 1760
1753 phys_base = 0xffffffffffffffffUL; 1761 phys_base = 0xffffffffffffffffUL;
@@ -1788,8 +1796,6 @@ void __init paging_init(void)
1788 1796
1789 inherit_prom_mappings(); 1797 inherit_prom_mappings();
1790 1798
1791 read_obp_memory("reg", &pall[0], &pall_ents);
1792
1793 init_kpte_bitmap(); 1799 init_kpte_bitmap();
1794 1800
1795 /* Ok, we can use our TLB miss and window trap handlers safely. */ 1801 /* Ok, we can use our TLB miss and window trap handlers safely. */
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S
index 796e005dad8b..9bb2d90a9df6 100644
--- a/arch/sparc64/mm/ultra.S
+++ b/arch/sparc64/mm/ultra.S
@@ -1,7 +1,7 @@
1/* $Id: ultra.S,v 1.72 2002/02/09 19:49:31 davem Exp $ 1/*
2 * ultra.S: Don't expand these all over the place... 2 * ultra.S: Don't expand these all over the place...
3 * 3 *
4 * Copyright (C) 1997, 2000 David S. Miller (davem@redhat.com) 4 * Copyright (C) 1997, 2000, 2008 David S. Miller (davem@davemloft.net)
5 */ 5 */
6 6
7#include <asm/asi.h> 7#include <asm/asi.h>
@@ -15,6 +15,7 @@
15#include <asm/thread_info.h> 15#include <asm/thread_info.h>
16#include <asm/cacheflush.h> 16#include <asm/cacheflush.h>
17#include <asm/hypervisor.h> 17#include <asm/hypervisor.h>
18#include <asm/cpudata.h>
18 19
19 /* Basically, most of the Spitfire vs. Cheetah madness 20 /* Basically, most of the Spitfire vs. Cheetah madness
20 * has to do with the fact that Cheetah does not support 21 * has to do with the fact that Cheetah does not support
@@ -514,6 +515,32 @@ xcall_report_regs:
514 b rtrap_xcall 515 b rtrap_xcall
515 ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 516 ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
516 517
518#ifdef CONFIG_MAGIC_SYSRQ
519 .globl xcall_fetch_glob_regs
520xcall_fetch_glob_regs:
521 sethi %hi(global_reg_snapshot), %g1
522 or %g1, %lo(global_reg_snapshot), %g1
523 __GET_CPUID(%g2)
524 sllx %g2, 6, %g3
525 add %g1, %g3, %g1
526 rdpr %tstate, %g7
527 stx %g7, [%g1 + GR_SNAP_TSTATE]
528 rdpr %tpc, %g7
529 stx %g7, [%g1 + GR_SNAP_TPC]
530 rdpr %tnpc, %g7
531 stx %g7, [%g1 + GR_SNAP_TNPC]
532 stx %o7, [%g1 + GR_SNAP_O7]
533 stx %i7, [%g1 + GR_SNAP_I7]
534 sethi %hi(trap_block), %g7
535 or %g7, %lo(trap_block), %g7
536 sllx %g2, TRAP_BLOCK_SZ_SHIFT, %g2
537 add %g7, %g2, %g7
538 ldx [%g7 + TRAP_PER_CPU_THREAD], %g3
539 membar #StoreStore
540 stx %g3, [%g1 + GR_SNAP_THREAD]
541 retry
542#endif /* CONFIG_MAGIC_SYSRQ */
543
517#ifdef DCACHE_ALIASING_POSSIBLE 544#ifdef DCACHE_ALIASING_POSSIBLE
518 .align 32 545 .align 32
519 .globl xcall_flush_dcache_page_cheetah 546 .globl xcall_flush_dcache_page_cheetah
diff --git a/arch/sparc64/prom/Makefile b/arch/sparc64/prom/Makefile
index 3d33ed27bc27..8c94483ca54d 100644
--- a/arch/sparc64/prom/Makefile
+++ b/arch/sparc64/prom/Makefile
@@ -1,4 +1,3 @@
1# $Id: Makefile,v 1.7 2000/12/14 22:57:25 davem Exp $
2# Makefile for the Sun Boot PROM interface library under 1# Makefile for the Sun Boot PROM interface library under
3# Linux. 2# Linux.
4# 3#
diff --git a/arch/sparc64/prom/bootstr.c b/arch/sparc64/prom/bootstr.c
index a7278614e99d..ab9ccc63b388 100644
--- a/arch/sparc64/prom/bootstr.c
+++ b/arch/sparc64/prom/bootstr.c
@@ -1,4 +1,4 @@
1/* $Id: bootstr.c,v 1.6 1999/08/31 06:55:01 davem Exp $ 1/*
2 * bootstr.c: Boot string/argument acquisition from the PROM. 2 * bootstr.c: Boot string/argument acquisition from the PROM.
3 * 3 *
4 * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/prom/devops.c b/arch/sparc64/prom/devops.c
index 4641839eb39a..9dbd803e46e1 100644
--- a/arch/sparc64/prom/devops.c
+++ b/arch/sparc64/prom/devops.c
@@ -1,4 +1,4 @@
1/* $Id: devops.c,v 1.3 1997/10/29 07:43:28 ecd Exp $ 1/*
2 * devops.c: Device operations using the PROM. 2 * devops.c: Device operations using the PROM.
3 * 3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/prom/init.c b/arch/sparc64/prom/init.c
index 87e7c7ea0ee6..7b00f89490a4 100644
--- a/arch/sparc64/prom/init.c
+++ b/arch/sparc64/prom/init.c
@@ -1,4 +1,4 @@
1/* $Id: init.c,v 1.10 1999/09/21 14:35:59 davem Exp $ 1/*
2 * init.c: Initialize internal variables used by the PROM 2 * init.c: Initialize internal variables used by the PROM
3 * library functions. 3 * library functions.
4 * 4 *
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c
index 47a877a15abd..9b0c0760901e 100644
--- a/arch/sparc64/prom/misc.c
+++ b/arch/sparc64/prom/misc.c
@@ -1,4 +1,4 @@
1/* $Id: misc.c,v 1.20 2001/09/21 03:17:07 kanoj Exp $ 1/*
2 * misc.c: Miscellaneous prom functions that don't belong 2 * misc.c: Miscellaneous prom functions that don't belong
3 * anywhere else. 3 * anywhere else.
4 * 4 *
diff --git a/arch/sparc64/prom/p1275.c b/arch/sparc64/prom/p1275.c
index 7fcccc0e19cf..4b7c937bba61 100644
--- a/arch/sparc64/prom/p1275.c
+++ b/arch/sparc64/prom/p1275.c
@@ -1,4 +1,4 @@
1/* $Id: p1275.c,v 1.22 2001/10/18 09:40:00 davem Exp $ 1/*
2 * p1275.c: Sun IEEE 1275 PROM low level interface routines 2 * p1275.c: Sun IEEE 1275 PROM low level interface routines
3 * 3 *
4 * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/arch/sparc64/prom/tree.c b/arch/sparc64/prom/tree.c
index a99ccd7fb1b0..281aea44790b 100644
--- a/arch/sparc64/prom/tree.c
+++ b/arch/sparc64/prom/tree.c
@@ -1,4 +1,4 @@
1/* $Id: tree.c,v 1.10 1998/01/10 22:39:00 ecd Exp $ 1/*
2 * tree.c: Basic device tree traversal/scanning for the Linux 2 * tree.c: Basic device tree traversal/scanning for the Linux
3 * prom library. 3 * prom library.
4 * 4 *