aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/defconfig2
-rw-r--r--arch/i386/kernel/entry.S32
-rw-r--r--arch/i386/kernel/traps.c83
-rw-r--r--arch/s390/defconfig47
-rw-r--r--arch/s390/hypfs/hypfs_diag.c4
-rw-r--r--arch/s390/kernel/ipl.c59
-rw-r--r--arch/s390/kernel/reipl.S6
-rw-r--r--arch/s390/kernel/reipl64.S5
-rw-r--r--arch/s390/kernel/reset.S42
-rw-r--r--arch/x86_64/Makefile2
-rw-r--r--arch/x86_64/defconfig2
-rw-r--r--arch/x86_64/kernel/entry.S33
-rw-r--r--arch/x86_64/kernel/traps.c84
-rw-r--r--arch/x86_64/kernel/vmlinux.lds.S2
14 files changed, 101 insertions, 302 deletions
diff --git a/arch/i386/defconfig b/arch/i386/defconfig
index 3265208e5899..e075ff05c46d 100644
--- a/arch/i386/defconfig
+++ b/arch/i386/defconfig
@@ -1493,8 +1493,6 @@ CONFIG_DEBUG_BUGVERBOSE=y
1493# CONFIG_DEBUG_VM is not set 1493# CONFIG_DEBUG_VM is not set
1494# CONFIG_DEBUG_LIST is not set 1494# CONFIG_DEBUG_LIST is not set
1495# CONFIG_FRAME_POINTER is not set 1495# CONFIG_FRAME_POINTER is not set
1496CONFIG_UNWIND_INFO=y
1497CONFIG_STACK_UNWIND=y
1498# CONFIG_FORCED_INLINING is not set 1496# CONFIG_FORCED_INLINING is not set
1499# CONFIG_HEADERS_CHECK is not set 1497# CONFIG_HEADERS_CHECK is not set
1500# CONFIG_RCU_TORTURE_TEST is not set 1498# CONFIG_RCU_TORTURE_TEST is not set
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index de34b7fed3c1..06461b8b715d 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -979,38 +979,6 @@ ENTRY(spurious_interrupt_bug)
979 jmp error_code 979 jmp error_code
980 CFI_ENDPROC 980 CFI_ENDPROC
981 981
982#ifdef CONFIG_STACK_UNWIND
983ENTRY(arch_unwind_init_running)
984 CFI_STARTPROC
985 movl 4(%esp), %edx
986 movl (%esp), %ecx
987 leal 4(%esp), %eax
988 movl %ebx, PT_EBX(%edx)
989 xorl %ebx, %ebx
990 movl %ebx, PT_ECX(%edx)
991 movl %ebx, PT_EDX(%edx)
992 movl %esi, PT_ESI(%edx)
993 movl %edi, PT_EDI(%edx)
994 movl %ebp, PT_EBP(%edx)
995 movl %ebx, PT_EAX(%edx)
996 movl $__USER_DS, PT_DS(%edx)
997 movl $__USER_DS, PT_ES(%edx)
998 movl $0, PT_GS(%edx)
999 movl %ebx, PT_ORIG_EAX(%edx)
1000 movl %ecx, PT_EIP(%edx)
1001 movl 12(%esp), %ecx
1002 movl $__KERNEL_CS, PT_CS(%edx)
1003 movl %ebx, PT_EFLAGS(%edx)
1004 movl %eax, PT_OLDESP(%edx)
1005 movl 8(%esp), %eax
1006 movl %ecx, 8(%esp)
1007 movl PT_EBX(%edx), %ebx
1008 movl $__KERNEL_DS, PT_OLDSS(%edx)
1009 jmpl *%eax
1010 CFI_ENDPROC
1011ENDPROC(arch_unwind_init_running)
1012#endif
1013
1014ENTRY(kernel_thread_helper) 982ENTRY(kernel_thread_helper)
1015 pushl $0 # fake return address for unwinder 983 pushl $0 # fake return address for unwinder
1016 CFI_STARTPROC 984 CFI_STARTPROC
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 2b30dbf8d117..0efad8aeb41a 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -94,11 +94,6 @@ asmlinkage void spurious_interrupt_bug(void);
94asmlinkage void machine_check(void); 94asmlinkage void machine_check(void);
95 95
96int kstack_depth_to_print = 24; 96int kstack_depth_to_print = 24;
97#ifdef CONFIG_STACK_UNWIND
98static int call_trace = 1;
99#else
100#define call_trace (-1)
101#endif
102ATOMIC_NOTIFIER_HEAD(i386die_chain); 97ATOMIC_NOTIFIER_HEAD(i386die_chain);
103 98
104int register_die_notifier(struct notifier_block *nb) 99int register_die_notifier(struct notifier_block *nb)
@@ -152,33 +147,6 @@ static inline unsigned long print_context_stack(struct thread_info *tinfo,
152 return ebp; 147 return ebp;
153} 148}
154 149
155struct ops_and_data {
156 struct stacktrace_ops *ops;
157 void *data;
158};
159
160static asmlinkage int
161dump_trace_unwind(struct unwind_frame_info *info, void *data)
162{
163 struct ops_and_data *oad = (struct ops_and_data *)data;
164 int n = 0;
165 unsigned long sp = UNW_SP(info);
166
167 if (arch_unw_user_mode(info))
168 return -1;
169 while (unwind(info) == 0 && UNW_PC(info)) {
170 n++;
171 oad->ops->address(oad->data, UNW_PC(info));
172 if (arch_unw_user_mode(info))
173 break;
174 if ((sp & ~(PAGE_SIZE - 1)) == (UNW_SP(info) & ~(PAGE_SIZE - 1))
175 && sp > UNW_SP(info))
176 break;
177 sp = UNW_SP(info);
178 }
179 return n;
180}
181
182#define MSG(msg) ops->warning(data, msg) 150#define MSG(msg) ops->warning(data, msg)
183 151
184void dump_trace(struct task_struct *task, struct pt_regs *regs, 152void dump_trace(struct task_struct *task, struct pt_regs *regs,
@@ -190,41 +158,6 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
190 if (!task) 158 if (!task)
191 task = current; 159 task = current;
192 160
193 if (call_trace >= 0) {
194 int unw_ret = 0;
195 struct unwind_frame_info info;
196 struct ops_and_data oad = { .ops = ops, .data = data };
197
198 if (regs) {
199 if (unwind_init_frame_info(&info, task, regs) == 0)
200 unw_ret = dump_trace_unwind(&info, &oad);
201 } else if (task == current)
202 unw_ret = unwind_init_running(&info, dump_trace_unwind,
203 &oad);
204 else {
205 if (unwind_init_blocked(&info, task) == 0)
206 unw_ret = dump_trace_unwind(&info, &oad);
207 }
208 if (unw_ret > 0) {
209 if (call_trace == 1 && !arch_unw_user_mode(&info)) {
210 ops->warning_symbol(data,
211 "DWARF2 unwinder stuck at %s",
212 UNW_PC(&info));
213 if (UNW_SP(&info) >= PAGE_OFFSET) {
214 MSG("Leftover inexact backtrace:");
215 stack = (void *)UNW_SP(&info);
216 if (!stack)
217 return;
218 ebp = UNW_FP(&info);
219 } else
220 MSG("Full inexact backtrace again:");
221 } else if (call_trace >= 1)
222 return;
223 else
224 MSG("Full inexact backtrace again:");
225 } else
226 MSG("Inexact backtrace:");
227 }
228 if (!stack) { 161 if (!stack) {
229 unsigned long dummy; 162 unsigned long dummy;
230 stack = &dummy; 163 stack = &dummy;
@@ -1258,19 +1191,3 @@ static int __init kstack_setup(char *s)
1258 return 1; 1191 return 1;
1259} 1192}
1260__setup("kstack=", kstack_setup); 1193__setup("kstack=", kstack_setup);
1261
1262#ifdef CONFIG_STACK_UNWIND
1263static int __init call_trace_setup(char *s)
1264{
1265 if (strcmp(s, "old") == 0)
1266 call_trace = -1;
1267 else if (strcmp(s, "both") == 0)
1268 call_trace = 0;
1269 else if (strcmp(s, "newfallback") == 0)
1270 call_trace = 1;
1271 else if (strcmp(s, "new") == 2)
1272 call_trace = 2;
1273 return 1;
1274}
1275__setup("call_trace=", call_trace_setup);
1276#endif
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index a6ec919ba83f..5368cf4a350e 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/defconfig
@@ -1,14 +1,15 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc2 3# Linux kernel version: 2.6.20-rc1
4# Wed Oct 18 17:11:10 2006 4# Fri Dec 15 16:52:28 2006
5# 5#
6CONFIG_MMU=y 6CONFIG_MMU=y
7CONFIG_LOCKDEP_SUPPORT=y 7CONFIG_LOCKDEP_SUPPORT=y
8CONFIG_STACKTRACE_SUPPORT=y 8CONFIG_STACKTRACE_SUPPORT=y
9CONFIG_RWSEM_XCHGADD_ALGORITHM=y 9CONFIG_RWSEM_XCHGADD_ALGORITHM=y
10# CONFIG_ARCH_HAS_ILOG2_U32 is not set
11# CONFIG_ARCH_HAS_ILOG2_U64 is not set
10CONFIG_GENERIC_HWEIGHT=y 12CONFIG_GENERIC_HWEIGHT=y
11CONFIG_GENERIC_CALIBRATE_DELAY=y
12CONFIG_GENERIC_TIME=y 13CONFIG_GENERIC_TIME=y
13CONFIG_S390=y 14CONFIG_S390=y
14CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 15CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -37,12 +38,13 @@ CONFIG_AUDIT=y
37CONFIG_IKCONFIG=y 38CONFIG_IKCONFIG=y
38CONFIG_IKCONFIG_PROC=y 39CONFIG_IKCONFIG_PROC=y
39# CONFIG_CPUSETS is not set 40# CONFIG_CPUSETS is not set
41CONFIG_SYSFS_DEPRECATED=y
40# CONFIG_RELAY is not set 42# CONFIG_RELAY is not set
41CONFIG_INITRAMFS_SOURCE="" 43CONFIG_INITRAMFS_SOURCE=""
42# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 44# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
43CONFIG_SYSCTL=y 45CONFIG_SYSCTL=y
44# CONFIG_EMBEDDED is not set 46# CONFIG_EMBEDDED is not set
45# CONFIG_SYSCTL_SYSCALL is not set 47CONFIG_SYSCTL_SYSCALL=y
46CONFIG_KALLSYMS=y 48CONFIG_KALLSYMS=y
47# CONFIG_KALLSYMS_ALL is not set 49# CONFIG_KALLSYMS_ALL is not set
48# CONFIG_KALLSYMS_EXTRA_PASS is not set 50# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -119,6 +121,7 @@ CONFIG_PACK_STACK=y
119CONFIG_CHECK_STACK=y 121CONFIG_CHECK_STACK=y
120CONFIG_STACK_GUARD=256 122CONFIG_STACK_GUARD=256
121# CONFIG_WARN_STACK is not set 123# CONFIG_WARN_STACK is not set
124CONFIG_ARCH_POPULATES_NODE_MAP=y
122CONFIG_SELECT_MEMORY_MODEL=y 125CONFIG_SELECT_MEMORY_MODEL=y
123CONFIG_FLATMEM_MANUAL=y 126CONFIG_FLATMEM_MANUAL=y
124# CONFIG_DISCONTIGMEM_MANUAL is not set 127# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -128,6 +131,7 @@ CONFIG_FLAT_NODE_MEM_MAP=y
128# CONFIG_SPARSEMEM_STATIC is not set 131# CONFIG_SPARSEMEM_STATIC is not set
129CONFIG_SPLIT_PTLOCK_CPUS=4 132CONFIG_SPLIT_PTLOCK_CPUS=4
130CONFIG_RESOURCES_64BIT=y 133CONFIG_RESOURCES_64BIT=y
134CONFIG_HOLES_IN_ZONE=y
131 135
132# 136#
133# I/O subsystem configuration 137# I/O subsystem configuration
@@ -196,6 +200,7 @@ CONFIG_INET_TCP_DIAG=y
196# CONFIG_TCP_CONG_ADVANCED is not set 200# CONFIG_TCP_CONG_ADVANCED is not set
197CONFIG_TCP_CONG_CUBIC=y 201CONFIG_TCP_CONG_CUBIC=y
198CONFIG_DEFAULT_TCP_CONG="cubic" 202CONFIG_DEFAULT_TCP_CONG="cubic"
203# CONFIG_TCP_MD5SIG is not set
199CONFIG_IPV6=y 204CONFIG_IPV6=y
200# CONFIG_IPV6_PRIVACY is not set 205# CONFIG_IPV6_PRIVACY is not set
201# CONFIG_IPV6_ROUTER_PREF is not set 206# CONFIG_IPV6_ROUTER_PREF is not set
@@ -211,7 +216,6 @@ CONFIG_INET6_XFRM_MODE_BEET=y
211# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 216# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
212CONFIG_IPV6_SIT=y 217CONFIG_IPV6_SIT=y
213# CONFIG_IPV6_TUNNEL is not set 218# CONFIG_IPV6_TUNNEL is not set
214# CONFIG_IPV6_SUBTREES is not set
215# CONFIG_IPV6_MULTIPLE_TABLES is not set 219# CONFIG_IPV6_MULTIPLE_TABLES is not set
216# CONFIG_NETWORK_SECMARK is not set 220# CONFIG_NETWORK_SECMARK is not set
217# CONFIG_NETFILTER is not set 221# CONFIG_NETFILTER is not set
@@ -246,6 +250,7 @@ CONFIG_IPV6_SIT=y
246# QoS and/or fair queueing 250# QoS and/or fair queueing
247# 251#
248CONFIG_NET_SCHED=y 252CONFIG_NET_SCHED=y
253CONFIG_NET_SCH_FIFO=y
249CONFIG_NET_SCH_CLK_JIFFIES=y 254CONFIG_NET_SCH_CLK_JIFFIES=y
250# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set 255# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
251# CONFIG_NET_SCH_CLK_CPU is not set 256# CONFIG_NET_SCH_CLK_CPU is not set
@@ -277,6 +282,7 @@ CONFIG_NET_CLS_ROUTE=y
277CONFIG_NET_CLS_FW=m 282CONFIG_NET_CLS_FW=m
278CONFIG_NET_CLS_U32=m 283CONFIG_NET_CLS_U32=m
279# CONFIG_CLS_U32_PERF is not set 284# CONFIG_CLS_U32_PERF is not set
285CONFIG_CLS_U32_MARK=y
280CONFIG_NET_CLS_RSVP=m 286CONFIG_NET_CLS_RSVP=m
281CONFIG_NET_CLS_RSVP6=m 287CONFIG_NET_CLS_RSVP6=m
282# CONFIG_NET_EMATCH is not set 288# CONFIG_NET_EMATCH is not set
@@ -315,6 +321,7 @@ CONFIG_SYS_HYPERVISOR=y
315# 321#
316# CONFIG_RAID_ATTRS is not set 322# CONFIG_RAID_ATTRS is not set
317CONFIG_SCSI=y 323CONFIG_SCSI=y
324# CONFIG_SCSI_TGT is not set
318CONFIG_SCSI_NETLINK=y 325CONFIG_SCSI_NETLINK=y
319CONFIG_SCSI_PROC_FS=y 326CONFIG_SCSI_PROC_FS=y
320 327
@@ -335,6 +342,7 @@ CONFIG_CHR_DEV_SG=y
335CONFIG_SCSI_MULTI_LUN=y 342CONFIG_SCSI_MULTI_LUN=y
336CONFIG_SCSI_CONSTANTS=y 343CONFIG_SCSI_CONSTANTS=y
337CONFIG_SCSI_LOGGING=y 344CONFIG_SCSI_LOGGING=y
345CONFIG_SCSI_SCAN_ASYNC=y
338 346
339# 347#
340# SCSI Transports 348# SCSI Transports
@@ -546,6 +554,7 @@ CONFIG_DNOTIFY=y
546# CONFIG_AUTOFS_FS is not set 554# CONFIG_AUTOFS_FS is not set
547# CONFIG_AUTOFS4_FS is not set 555# CONFIG_AUTOFS4_FS is not set
548# CONFIG_FUSE_FS is not set 556# CONFIG_FUSE_FS is not set
557CONFIG_GENERIC_ACL=y
549 558
550# 559#
551# CD-ROM/DVD Filesystems 560# CD-ROM/DVD Filesystems
@@ -571,7 +580,7 @@ CONFIG_TMPFS=y
571CONFIG_TMPFS_POSIX_ACL=y 580CONFIG_TMPFS_POSIX_ACL=y
572# CONFIG_HUGETLB_PAGE is not set 581# CONFIG_HUGETLB_PAGE is not set
573CONFIG_RAMFS=y 582CONFIG_RAMFS=y
574# CONFIG_CONFIGFS_FS is not set 583CONFIG_CONFIGFS_FS=m
575 584
576# 585#
577# Miscellaneous filesystems 586# Miscellaneous filesystems
@@ -616,7 +625,6 @@ CONFIG_SUNRPC=y
616# CONFIG_CODA_FS is not set 625# CONFIG_CODA_FS is not set
617# CONFIG_AFS_FS is not set 626# CONFIG_AFS_FS is not set
618# CONFIG_9P_FS is not set 627# CONFIG_9P_FS is not set
619CONFIG_GENERIC_ACL=y
620 628
621# 629#
622# Partition Types 630# Partition Types
@@ -646,6 +654,14 @@ CONFIG_MSDOS_PARTITION=y
646# CONFIG_NLS is not set 654# CONFIG_NLS is not set
647 655
648# 656#
657# Distributed Lock Manager
658#
659CONFIG_DLM=m
660CONFIG_DLM_TCP=y
661# CONFIG_DLM_SCTP is not set
662# CONFIG_DLM_DEBUG is not set
663
664#
649# Instrumentation Support 665# Instrumentation Support
650# 666#
651 667
@@ -663,6 +679,8 @@ CONFIG_TRACE_IRQFLAGS_SUPPORT=y
663CONFIG_ENABLE_MUST_CHECK=y 679CONFIG_ENABLE_MUST_CHECK=y
664CONFIG_MAGIC_SYSRQ=y 680CONFIG_MAGIC_SYSRQ=y
665# CONFIG_UNUSED_SYMBOLS is not set 681# CONFIG_UNUSED_SYMBOLS is not set
682CONFIG_DEBUG_FS=y
683CONFIG_HEADERS_CHECK=y
666CONFIG_DEBUG_KERNEL=y 684CONFIG_DEBUG_KERNEL=y
667CONFIG_LOG_BUF_SHIFT=17 685CONFIG_LOG_BUF_SHIFT=17
668# CONFIG_SCHEDSTATS is not set 686# CONFIG_SCHEDSTATS is not set
@@ -679,13 +697,11 @@ CONFIG_DEBUG_SPINLOCK_SLEEP=y
679# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 697# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
680# CONFIG_DEBUG_KOBJECT is not set 698# CONFIG_DEBUG_KOBJECT is not set
681# CONFIG_DEBUG_INFO is not set 699# CONFIG_DEBUG_INFO is not set
682CONFIG_DEBUG_FS=y
683# CONFIG_DEBUG_VM is not set 700# CONFIG_DEBUG_VM is not set
684# CONFIG_DEBUG_LIST is not set 701# CONFIG_DEBUG_LIST is not set
685# CONFIG_FRAME_POINTER is not set 702# CONFIG_FRAME_POINTER is not set
686# CONFIG_UNWIND_INFO is not set 703# CONFIG_UNWIND_INFO is not set
687CONFIG_FORCED_INLINING=y 704CONFIG_FORCED_INLINING=y
688CONFIG_HEADERS_CHECK=y
689# CONFIG_RCU_TORTURE_TEST is not set 705# CONFIG_RCU_TORTURE_TEST is not set
690# CONFIG_LKDTM is not set 706# CONFIG_LKDTM is not set
691 707
@@ -699,10 +715,11 @@ CONFIG_HEADERS_CHECK=y
699# Cryptographic options 715# Cryptographic options
700# 716#
701CONFIG_CRYPTO=y 717CONFIG_CRYPTO=y
702CONFIG_CRYPTO_ALGAPI=m 718CONFIG_CRYPTO_ALGAPI=y
703CONFIG_CRYPTO_BLKCIPHER=m 719CONFIG_CRYPTO_BLKCIPHER=y
704CONFIG_CRYPTO_MANAGER=m 720CONFIG_CRYPTO_MANAGER=y
705# CONFIG_CRYPTO_HMAC is not set 721# CONFIG_CRYPTO_HMAC is not set
722# CONFIG_CRYPTO_XCBC is not set
706# CONFIG_CRYPTO_NULL is not set 723# CONFIG_CRYPTO_NULL is not set
707# CONFIG_CRYPTO_MD4 is not set 724# CONFIG_CRYPTO_MD4 is not set
708# CONFIG_CRYPTO_MD5 is not set 725# CONFIG_CRYPTO_MD5 is not set
@@ -713,8 +730,10 @@ CONFIG_CRYPTO_MANAGER=m
713# CONFIG_CRYPTO_SHA512 is not set 730# CONFIG_CRYPTO_SHA512 is not set
714# CONFIG_CRYPTO_WP512 is not set 731# CONFIG_CRYPTO_WP512 is not set
715# CONFIG_CRYPTO_TGR192 is not set 732# CONFIG_CRYPTO_TGR192 is not set
733# CONFIG_CRYPTO_GF128MUL is not set
716CONFIG_CRYPTO_ECB=m 734CONFIG_CRYPTO_ECB=m
717CONFIG_CRYPTO_CBC=m 735CONFIG_CRYPTO_CBC=y
736# CONFIG_CRYPTO_LRW is not set
718# CONFIG_CRYPTO_DES is not set 737# CONFIG_CRYPTO_DES is not set
719# CONFIG_CRYPTO_DES_S390 is not set 738# CONFIG_CRYPTO_DES_S390 is not set
720# CONFIG_CRYPTO_BLOWFISH is not set 739# CONFIG_CRYPTO_BLOWFISH is not set
@@ -740,8 +759,10 @@ CONFIG_CRYPTO_CBC=m
740# 759#
741# Library routines 760# Library routines
742# 761#
762CONFIG_BITREVERSE=m
743# CONFIG_CRC_CCITT is not set 763# CONFIG_CRC_CCITT is not set
744# CONFIG_CRC16 is not set 764# CONFIG_CRC16 is not set
745CONFIG_CRC32=m 765CONFIG_CRC32=m
746# CONFIG_LIBCRC32C is not set 766# CONFIG_LIBCRC32C is not set
747CONFIG_PLIST=y 767CONFIG_PLIST=y
768CONFIG_IOMAP_COPY=y
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c
index 443fa377d9ff..2782cf9da5b4 100644
--- a/arch/s390/hypfs/hypfs_diag.c
+++ b/arch/s390/hypfs/hypfs_diag.c
@@ -379,7 +379,7 @@ static void *diag204_alloc_vbuf(int pages)
379static void *diag204_alloc_rbuf(void) 379static void *diag204_alloc_rbuf(void)
380{ 380{
381 diag204_buf = (void*)__get_free_pages(GFP_KERNEL,0); 381 diag204_buf = (void*)__get_free_pages(GFP_KERNEL,0);
382 if (diag204_buf) 382 if (!diag204_buf)
383 return ERR_PTR(-ENOMEM); 383 return ERR_PTR(-ENOMEM);
384 diag204_buf_pages = 1; 384 diag204_buf_pages = 1;
385 return diag204_buf; 385 return diag204_buf;
@@ -521,7 +521,7 @@ __init int hypfs_diag_init(void)
521 } 521 }
522 rc = diag224_get_name_table(); 522 rc = diag224_get_name_table();
523 if (rc) { 523 if (rc) {
524 diag224_delete_name_table(); 524 diag204_free_buffer();
525 printk(KERN_ERR "hypfs: could not get name table.\n"); 525 printk(KERN_ERR "hypfs: could not get name table.\n");
526 } 526 }
527 return rc; 527 return rc;
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index a36bea1188d9..9e9972e8a52b 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -609,42 +609,12 @@ static ssize_t on_panic_store(struct subsystem *subsys, const char *buf,
609static struct subsys_attribute on_panic_attr = 609static struct subsys_attribute on_panic_attr =
610 __ATTR(on_panic, 0644, on_panic_show, on_panic_store); 610 __ATTR(on_panic, 0644, on_panic_show, on_panic_store);
611 611
612static void print_fcp_block(struct ipl_parameter_block *fcp_block)
613{
614 printk(KERN_EMERG "wwpn: %016llx\n",
615 (unsigned long long)fcp_block->ipl_info.fcp.wwpn);
616 printk(KERN_EMERG "lun: %016llx\n",
617 (unsigned long long)fcp_block->ipl_info.fcp.lun);
618 printk(KERN_EMERG "bootprog: %lld\n",
619 (unsigned long long)fcp_block->ipl_info.fcp.bootprog);
620 printk(KERN_EMERG "br_lba: %lld\n",
621 (unsigned long long)fcp_block->ipl_info.fcp.br_lba);
622 printk(KERN_EMERG "device: %llx\n",
623 (unsigned long long)fcp_block->ipl_info.fcp.devno);
624 printk(KERN_EMERG "opt: %x\n", fcp_block->ipl_info.fcp.opt);
625}
626
627void do_reipl(void) 612void do_reipl(void)
628{ 613{
629 struct ccw_dev_id devid; 614 struct ccw_dev_id devid;
630 static char buf[100]; 615 static char buf[100];
631 char loadparm[LOADPARM_LEN + 1]; 616 char loadparm[LOADPARM_LEN + 1];
632 617
633 switch (reipl_type) {
634 case IPL_TYPE_CCW:
635 reipl_get_ascii_loadparm(loadparm);
636 printk(KERN_EMERG "reboot on ccw device: 0.0.%04x\n",
637 reipl_block_ccw->ipl_info.ccw.devno);
638 printk(KERN_EMERG "loadparm = '%s'\n", loadparm);
639 break;
640 case IPL_TYPE_FCP:
641 printk(KERN_EMERG "reboot on fcp device:\n");
642 print_fcp_block(reipl_block_fcp);
643 break;
644 default:
645 break;
646 }
647
648 switch (reipl_method) { 618 switch (reipl_method) {
649 case IPL_METHOD_CCW_CIO: 619 case IPL_METHOD_CCW_CIO:
650 devid.devno = reipl_block_ccw->ipl_info.ccw.devno; 620 devid.devno = reipl_block_ccw->ipl_info.ccw.devno;
@@ -654,6 +624,7 @@ void do_reipl(void)
654 reipl_ccw_dev(&devid); 624 reipl_ccw_dev(&devid);
655 break; 625 break;
656 case IPL_METHOD_CCW_VM: 626 case IPL_METHOD_CCW_VM:
627 reipl_get_ascii_loadparm(loadparm);
657 if (strlen(loadparm) == 0) 628 if (strlen(loadparm) == 0)
658 sprintf(buf, "IPL %X", 629 sprintf(buf, "IPL %X",
659 reipl_block_ccw->ipl_info.ccw.devno); 630 reipl_block_ccw->ipl_info.ccw.devno);
@@ -683,7 +654,6 @@ void do_reipl(void)
683 diag308(DIAG308_IPL, NULL); 654 diag308(DIAG308_IPL, NULL);
684 break; 655 break;
685 } 656 }
686 printk(KERN_EMERG "reboot failed!\n");
687 signal_processor(smp_processor_id(), sigp_stop_and_store_status); 657 signal_processor(smp_processor_id(), sigp_stop_and_store_status);
688} 658}
689 659
@@ -692,19 +662,6 @@ static void do_dump(void)
692 struct ccw_dev_id devid; 662 struct ccw_dev_id devid;
693 static char buf[100]; 663 static char buf[100];
694 664
695 switch (dump_type) {
696 case IPL_TYPE_CCW:
697 printk(KERN_EMERG "Automatic dump on ccw device: 0.0.%04x\n",
698 dump_block_ccw->ipl_info.ccw.devno);
699 break;
700 case IPL_TYPE_FCP:
701 printk(KERN_EMERG "Automatic dump on fcp device:\n");
702 print_fcp_block(dump_block_fcp);
703 break;
704 default:
705 return;
706 }
707
708 switch (dump_method) { 665 switch (dump_method) {
709 case IPL_METHOD_CCW_CIO: 666 case IPL_METHOD_CCW_CIO:
710 smp_send_stop(); 667 smp_send_stop();
@@ -1037,15 +994,21 @@ static void do_reset_calls(void)
1037} 994}
1038 995
1039extern void reset_mcck_handler(void); 996extern void reset_mcck_handler(void);
997extern void reset_pgm_handler(void);
998extern __u32 dump_prefix_page;
1040 999
1041void s390_reset_system(void) 1000void s390_reset_system(void)
1042{ 1001{
1043 struct _lowcore *lc; 1002 struct _lowcore *lc;
1044 1003
1045 /* Stack for interrupt/machine check handler */
1046 lc = (struct _lowcore *)(unsigned long) store_prefix(); 1004 lc = (struct _lowcore *)(unsigned long) store_prefix();
1005
1006 /* Stack for interrupt/machine check handler */
1047 lc->panic_stack = S390_lowcore.panic_stack; 1007 lc->panic_stack = S390_lowcore.panic_stack;
1048 1008
1009 /* Save prefix page address for dump case */
1010 dump_prefix_page = (unsigned long) lc;
1011
1049 /* Disable prefixing */ 1012 /* Disable prefixing */
1050 set_prefix(0); 1013 set_prefix(0);
1051 1014
@@ -1056,5 +1019,11 @@ void s390_reset_system(void)
1056 S390_lowcore.mcck_new_psw.mask = PSW_KERNEL_BITS & ~PSW_MASK_MCHECK; 1019 S390_lowcore.mcck_new_psw.mask = PSW_KERNEL_BITS & ~PSW_MASK_MCHECK;
1057 S390_lowcore.mcck_new_psw.addr = 1020 S390_lowcore.mcck_new_psw.addr =
1058 PSW_ADDR_AMODE | (unsigned long) &reset_mcck_handler; 1021 PSW_ADDR_AMODE | (unsigned long) &reset_mcck_handler;
1022
1023 /* Set new program check handler */
1024 S390_lowcore.program_new_psw.mask = PSW_KERNEL_BITS & ~PSW_MASK_MCHECK;
1025 S390_lowcore.program_new_psw.addr =
1026 PSW_ADDR_AMODE | (unsigned long) &reset_pgm_handler;
1027
1059 do_reset_calls(); 1028 do_reset_calls();
1060} 1029}
diff --git a/arch/s390/kernel/reipl.S b/arch/s390/kernel/reipl.S
index f9434d42ce9f..c3f4d9b95083 100644
--- a/arch/s390/kernel/reipl.S
+++ b/arch/s390/kernel/reipl.S
@@ -16,7 +16,7 @@ do_reipl_asm: basr %r13,0
16 stm %r0,%r15,__LC_GPREGS_SAVE_AREA 16 stm %r0,%r15,__LC_GPREGS_SAVE_AREA
17 stctl %c0,%c15,__LC_CREGS_SAVE_AREA 17 stctl %c0,%c15,__LC_CREGS_SAVE_AREA
18 stam %a0,%a15,__LC_AREGS_SAVE_AREA 18 stam %a0,%a15,__LC_AREGS_SAVE_AREA
19 stpx __LC_PREFIX_SAVE_AREA 19 mvc __LC_PREFIX_SAVE_AREA(4),dump_prefix_page-.Lpg0(%r13)
20 stckc .Lclkcmp-.Lpg0(%r13) 20 stckc .Lclkcmp-.Lpg0(%r13)
21 mvc __LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13) 21 mvc __LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13)
22 stpt __LC_CPU_TIMER_SAVE_AREA 22 stpt __LC_CPU_TIMER_SAVE_AREA
@@ -79,3 +79,7 @@ do_reipl_asm: basr %r13,0
79 .long 0x00000000,0x00000000 79 .long 0x00000000,0x00000000
80 .long 0x00000000,0x00000000 80 .long 0x00000000,0x00000000
81 .long 0x00000000,0x00000000 81 .long 0x00000000,0x00000000
82 .globl dump_prefix_page
83dump_prefix_page:
84 .long 0x00000000
85
diff --git a/arch/s390/kernel/reipl64.S b/arch/s390/kernel/reipl64.S
index f18ef260ca23..dbb3eed38865 100644
--- a/arch/s390/kernel/reipl64.S
+++ b/arch/s390/kernel/reipl64.S
@@ -20,7 +20,7 @@ do_reipl_asm: basr %r13,0
20 stg %r0,__LC_GPREGS_SAVE_AREA-0x1000+8(%r1) 20 stg %r0,__LC_GPREGS_SAVE_AREA-0x1000+8(%r1)
21 stctg %c0,%c15,__LC_CREGS_SAVE_AREA-0x1000(%r1) 21 stctg %c0,%c15,__LC_CREGS_SAVE_AREA-0x1000(%r1)
22 stam %a0,%a15,__LC_AREGS_SAVE_AREA-0x1000(%r1) 22 stam %a0,%a15,__LC_AREGS_SAVE_AREA-0x1000(%r1)
23 stpx __LC_PREFIX_SAVE_AREA-0x1000(%r1) 23 mvc __LC_PREFIX_SAVE_AREA-0x1000(4,%r1),dump_prefix_page-.Lpg0(%r13)
24 stfpc __LC_FP_CREG_SAVE_AREA-0x1000(%r1) 24 stfpc __LC_FP_CREG_SAVE_AREA-0x1000(%r1)
25 stckc .Lclkcmp-.Lpg0(%r13) 25 stckc .Lclkcmp-.Lpg0(%r13)
26 mvc __LC_CLOCK_COMP_SAVE_AREA-0x1000(8,%r1),.Lclkcmp-.Lpg0(%r13) 26 mvc __LC_CLOCK_COMP_SAVE_AREA-0x1000(8,%r1),.Lclkcmp-.Lpg0(%r13)
@@ -103,3 +103,6 @@ do_reipl_asm: basr %r13,0
103 .long 0x00000000,0x00000000 103 .long 0x00000000,0x00000000
104 .long 0x00000000,0x00000000 104 .long 0x00000000,0x00000000
105 .long 0x00000000,0x00000000 105 .long 0x00000000,0x00000000
106 .globl dump_prefix_page
107dump_prefix_page:
108 .long 0x00000000
diff --git a/arch/s390/kernel/reset.S b/arch/s390/kernel/reset.S
index be8688c0665c..8a87355161fa 100644
--- a/arch/s390/kernel/reset.S
+++ b/arch/s390/kernel/reset.S
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (C) IBM Corp. 2006 4 * Copyright (C) IBM Corp. 2006
5 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com> 5 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
6 * Michael Holzheu <holzheu@de.ibm.com>
6 */ 7 */
7 8
8#include <asm/ptrace.h> 9#include <asm/ptrace.h>
@@ -27,6 +28,26 @@ reset_mcck_handler:
27s390_reset_mcck_handler: 28s390_reset_mcck_handler:
28 .quad 0 29 .quad 0
29 30
31 .globl reset_pgm_handler
32reset_pgm_handler:
33 stmg %r0,%r15,__LC_SAVE_AREA
34 basr %r13,0
350: lg %r15,__LC_PANIC_STACK # load panic stack
36 aghi %r15,-STACK_FRAME_OVERHEAD
37 lg %r1,s390_reset_pgm_handler-0b(%r13)
38 ltgr %r1,%r1
39 jz 1f
40 basr %r14,%r1
41 lmg %r0,%r15,__LC_SAVE_AREA
42 lpswe __LC_PGM_OLD_PSW
431: lpswe disabled_wait_psw-0b(%r13)
44 .globl s390_reset_pgm_handler
45s390_reset_pgm_handler:
46 .quad 0
47 .align 8
48disabled_wait_psw:
49 .quad 0x0002000180000000,0x0000000000000000 + reset_pgm_handler
50
30#else /* CONFIG_64BIT */ 51#else /* CONFIG_64BIT */
31 52
32 .globl reset_mcck_handler 53 .globl reset_mcck_handler
@@ -45,4 +66,25 @@ reset_mcck_handler:
45s390_reset_mcck_handler: 66s390_reset_mcck_handler:
46 .long 0 67 .long 0
47 68
69 .globl reset_pgm_handler
70reset_pgm_handler:
71 stm %r0,%r15,__LC_SAVE_AREA
72 basr %r13,0
730: l %r15,__LC_PANIC_STACK # load panic stack
74 ahi %r15,-STACK_FRAME_OVERHEAD
75 l %r1,s390_reset_pgm_handler-0b(%r13)
76 ltr %r1,%r1
77 jz 1f
78 basr %r14,%r1
79 lm %r0,%r15,__LC_SAVE_AREA
80 lpsw __LC_PGM_OLD_PSW
81
821: lpsw disabled_wait_psw-0b(%r13)
83 .globl s390_reset_pgm_handler
84s390_reset_pgm_handler:
85 .long 0
86disabled_wait_psw:
87 .align 8
88 .long 0x000a0000,0x00000000 + reset_pgm_handler
89
48#endif /* CONFIG_64BIT */ 90#endif /* CONFIG_64BIT */
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile
index b471b8550d03..2941a915d4ef 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -45,9 +45,7 @@ cflags-kernel-$(CONFIG_REORDER) += -ffunction-sections
45# actually it makes the kernel smaller too. 45# actually it makes the kernel smaller too.
46cflags-y += -fno-reorder-blocks 46cflags-y += -fno-reorder-blocks
47cflags-y += -Wno-sign-compare 47cflags-y += -Wno-sign-compare
48ifneq ($(CONFIG_UNWIND_INFO),y)
49cflags-y += -fno-asynchronous-unwind-tables 48cflags-y += -fno-asynchronous-unwind-tables
50endif
51ifneq ($(CONFIG_DEBUG_INFO),y) 49ifneq ($(CONFIG_DEBUG_INFO),y)
52# -fweb shrinks the kernel a bit, but the difference is very small 50# -fweb shrinks the kernel a bit, but the difference is very small
53# it also messes up debugging, so don't use it for now. 51# it also messes up debugging, so don't use it for now.
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig
index 1a1c6a1a299b..ac80b1209fc0 100644
--- a/arch/x86_64/defconfig
+++ b/arch/x86_64/defconfig
@@ -1523,8 +1523,6 @@ CONFIG_DEBUG_FS=y
1523# CONFIG_DEBUG_VM is not set 1523# CONFIG_DEBUG_VM is not set
1524# CONFIG_DEBUG_LIST is not set 1524# CONFIG_DEBUG_LIST is not set
1525# CONFIG_FRAME_POINTER is not set 1525# CONFIG_FRAME_POINTER is not set
1526CONFIG_UNWIND_INFO=y
1527CONFIG_STACK_UNWIND=y
1528# CONFIG_FORCED_INLINING is not set 1526# CONFIG_FORCED_INLINING is not set
1529# CONFIG_HEADERS_CHECK is not set 1527# CONFIG_HEADERS_CHECK is not set
1530# CONFIG_RCU_TORTURE_TEST is not set 1528# CONFIG_RCU_TORTURE_TEST is not set
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S
index 601d332c4b79..9f5dac64aa8f 100644
--- a/arch/x86_64/kernel/entry.S
+++ b/arch/x86_64/kernel/entry.S
@@ -1155,36 +1155,3 @@ ENTRY(call_softirq)
1155 ret 1155 ret
1156 CFI_ENDPROC 1156 CFI_ENDPROC
1157ENDPROC(call_softirq) 1157ENDPROC(call_softirq)
1158
1159#ifdef CONFIG_STACK_UNWIND
1160ENTRY(arch_unwind_init_running)
1161 CFI_STARTPROC
1162 movq %r15, R15(%rdi)
1163 movq %r14, R14(%rdi)
1164 xchgq %rsi, %rdx
1165 movq %r13, R13(%rdi)
1166 movq %r12, R12(%rdi)
1167 xorl %eax, %eax
1168 movq %rbp, RBP(%rdi)
1169 movq %rbx, RBX(%rdi)
1170 movq (%rsp), %rcx
1171 movq %rax, R11(%rdi)
1172 movq %rax, R10(%rdi)
1173 movq %rax, R9(%rdi)
1174 movq %rax, R8(%rdi)
1175 movq %rax, RAX(%rdi)
1176 movq %rax, RCX(%rdi)
1177 movq %rax, RDX(%rdi)
1178 movq %rax, RSI(%rdi)
1179 movq %rax, RDI(%rdi)
1180 movq %rax, ORIG_RAX(%rdi)
1181 movq %rcx, RIP(%rdi)
1182 leaq 8(%rsp), %rcx
1183 movq $__KERNEL_CS, CS(%rdi)
1184 movq %rax, EFLAGS(%rdi)
1185 movq %rcx, RSP(%rdi)
1186 movq $__KERNEL_DS, SS(%rdi)
1187 jmpq *%rdx
1188 CFI_ENDPROC
1189ENDPROC(arch_unwind_init_running)
1190#endif
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index b54ccc07f379..1d9eb6db732a 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -110,11 +110,6 @@ static inline void preempt_conditional_cli(struct pt_regs *regs)
110} 110}
111 111
112int kstack_depth_to_print = 12; 112int kstack_depth_to_print = 12;
113#ifdef CONFIG_STACK_UNWIND
114static int call_trace = 1;
115#else
116#define call_trace (-1)
117#endif
118 113
119#ifdef CONFIG_KALLSYMS 114#ifdef CONFIG_KALLSYMS
120void printk_address(unsigned long address) 115void printk_address(unsigned long address)
@@ -217,32 +212,6 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack,
217 return NULL; 212 return NULL;
218} 213}
219 214
220struct ops_and_data {
221 struct stacktrace_ops *ops;
222 void *data;
223};
224
225static int dump_trace_unwind(struct unwind_frame_info *info, void *context)
226{
227 struct ops_and_data *oad = (struct ops_and_data *)context;
228 int n = 0;
229 unsigned long sp = UNW_SP(info);
230
231 if (arch_unw_user_mode(info))
232 return -1;
233 while (unwind(info) == 0 && UNW_PC(info)) {
234 n++;
235 oad->ops->address(oad->data, UNW_PC(info));
236 if (arch_unw_user_mode(info))
237 break;
238 if ((sp & ~(PAGE_SIZE - 1)) == (UNW_SP(info) & ~(PAGE_SIZE - 1))
239 && sp > UNW_SP(info))
240 break;
241 sp = UNW_SP(info);
242 }
243 return n;
244}
245
246#define MSG(txt) ops->warning(data, txt) 215#define MSG(txt) ops->warning(data, txt)
247 216
248/* 217/*
@@ -270,40 +239,6 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
270 if (!tsk) 239 if (!tsk)
271 tsk = current; 240 tsk = current;
272 241
273 if (call_trace >= 0) {
274 int unw_ret = 0;
275 struct unwind_frame_info info;
276 struct ops_and_data oad = { .ops = ops, .data = data };
277
278 if (regs) {
279 if (unwind_init_frame_info(&info, tsk, regs) == 0)
280 unw_ret = dump_trace_unwind(&info, &oad);
281 } else if (tsk == current)
282 unw_ret = unwind_init_running(&info, dump_trace_unwind,
283 &oad);
284 else {
285 if (unwind_init_blocked(&info, tsk) == 0)
286 unw_ret = dump_trace_unwind(&info, &oad);
287 }
288 if (unw_ret > 0) {
289 if (call_trace == 1 && !arch_unw_user_mode(&info)) {
290 ops->warning_symbol(data,
291 "DWARF2 unwinder stuck at %s",
292 UNW_PC(&info));
293 if ((long)UNW_SP(&info) < 0) {
294 MSG("Leftover inexact backtrace:");
295 stack = (unsigned long *)UNW_SP(&info);
296 if (!stack)
297 goto out;
298 } else
299 MSG("Full inexact backtrace again:");
300 } else if (call_trace >= 1)
301 goto out;
302 else
303 MSG("Full inexact backtrace again:");
304 } else
305 MSG("Inexact backtrace:");
306 }
307 if (!stack) { 242 if (!stack) {
308 unsigned long dummy; 243 unsigned long dummy;
309 stack = &dummy; 244 stack = &dummy;
@@ -387,7 +322,6 @@ void dump_trace(struct task_struct *tsk, struct pt_regs *regs,
387 tinfo = current_thread_info(); 322 tinfo = current_thread_info();
388 HANDLE_STACK (valid_stack_ptr(tinfo, stack)); 323 HANDLE_STACK (valid_stack_ptr(tinfo, stack));
389#undef HANDLE_STACK 324#undef HANDLE_STACK
390out:
391 put_cpu(); 325 put_cpu();
392} 326}
393EXPORT_SYMBOL(dump_trace); 327EXPORT_SYMBOL(dump_trace);
@@ -1188,21 +1122,3 @@ static int __init kstack_setup(char *s)
1188 return 0; 1122 return 0;
1189} 1123}
1190early_param("kstack", kstack_setup); 1124early_param("kstack", kstack_setup);
1191
1192#ifdef CONFIG_STACK_UNWIND
1193static int __init call_trace_setup(char *s)
1194{
1195 if (!s)
1196 return -EINVAL;
1197 if (strcmp(s, "old") == 0)
1198 call_trace = -1;
1199 else if (strcmp(s, "both") == 0)
1200 call_trace = 0;
1201 else if (strcmp(s, "newfallback") == 0)
1202 call_trace = 1;
1203 else if (strcmp(s, "new") == 0)
1204 call_trace = 2;
1205 return 0;
1206}
1207early_param("call_trace", call_trace_setup);
1208#endif
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S
index 514be5dd2303..1e54ddf2338d 100644
--- a/arch/x86_64/kernel/vmlinux.lds.S
+++ b/arch/x86_64/kernel/vmlinux.lds.S
@@ -221,9 +221,7 @@ SECTIONS
221 /* Sections to be discarded */ 221 /* Sections to be discarded */
222 /DISCARD/ : { 222 /DISCARD/ : {
223 *(.exitcall.exit) 223 *(.exitcall.exit)
224#ifndef CONFIG_UNWIND_INFO
225 *(.eh_frame) 224 *(.eh_frame)
226#endif
227 } 225 }
228 226
229 STABS_DEBUG 227 STABS_DEBUG