The patch titled Subject: sparc32: make show_stack() acquire %fp if @_ksp is not specified has been added to the -mm tree. Its filename is sparc32-make-show_stack-acquire-%fp-if-_ksp-is-not-specified.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Tejun Heo <tj@xxxxxxxxxx> Subject: sparc32: make show_stack() acquire %fp if @_ksp is not specified show_stack(current or NULL, NULL) is used by arch-independent code to dump backtrace of the current task; however, sparc32 show_stack() doesn't implement it and wouldn't print any backtrace when NULL @_ksp is specfied. Make show_stack() acquire and use %fp if @tsk is NULL or current and @_ksp is NULL. This makes %fp fetching in dump_stack() unnecessary. Make it use NULL for @_ksp instead. Only compile tested. Signed-off-by: Tejun Heo <tj@xxxxxxxxxx> Acked-by: David S. Miller <davem@xxxxxxxxxxxxx> Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx> Cc: Fengguang Wu <fengguang.wu@xxxxxxxxx> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Cc: Jesper Nilsson <jesper.nilsson@xxxxxxxx> Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Mike Frysinger <vapier@xxxxxxxxxx> Cc: Vineet Gupta <vgupta@xxxxxxxxxxxx> Cc: Sam Ravnborg <sam@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/sparc/kernel/process_32.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff -puN arch/sparc/kernel/process_32.c~sparc32-make-show_stack-acquire-%fp-if-_ksp-is-not-specified arch/sparc/kernel/process_32.c --- a/arch/sparc/kernel/process_32.c~sparc32-make-show_stack-acquire-%fp-if-_ksp-is-not-specified +++ a/arch/sparc/kernel/process_32.c @@ -153,11 +153,13 @@ void show_stack(struct task_struct *tsk, struct reg_window32 *rw; int count = 0; - if (tsk != NULL) - task_base = (unsigned long) task_stack_page(tsk); - else - task_base = (unsigned long) current_thread_info(); + if (!tsk) + tsk = current; + if (tsk == current && !_ksp) + __asm__ __volatile__("mov %%fp, %0" : "=r" (_ksp)); + + task_base = (unsigned long) task_stack_page(tsk); fp = (unsigned long) _ksp; do { /* Bogus frame pointer? */ @@ -175,11 +177,7 @@ void show_stack(struct task_struct *tsk, void dump_stack(void) { - unsigned long *ksp; - - __asm__ __volatile__("mov %%fp, %0" - : "=r" (ksp)); - show_stack(current, ksp); + show_stack(current, NULL); } EXPORT_SYMBOL(dump_stack); _ Patches currently in -mm which might be from tj@xxxxxxxxxx are origin.patch linux-next.patch thinkpad-acpi-kill-hotkey_thread_mutex.patch block-restore-proc-partitions-to-not-display-non-partitionable-removable-devices.patch memblock-add-assertion-for-zero-allocation-alignment.patch memcg-do-not-check-for-do_swap_account-in-mem_cgroup_readwritereset.patch kernel-cpusetc-use-register_hotmemory_notifier.patch rpmsg-fix-error-return-code-in-rpmsg_probe.patch x86-dont-show-trace-beyond-show_stacknull-null.patch sparc32-make-show_stack-acquire-%fp-if-_ksp-is-not-specified.patch dump_stack-consolidate-dump_stack-implementations-and-unify-their-behaviors.patch dmi-morph-dmi_dump_ids-into-dmi_format_ids-which-formats-into-a-buffer.patch dump_stack-implement-arch-specific-hardware-description-in-task-dumps.patch dump_stack-unify-debug-information-printed-by-show_regs.patch arc-print-fatal-signals-reduce-duplicated-information.patch rtc-add-devm_rtc_device_registerunregister.patch rtc-use-struct-device-as-the-first-argument-for-devm_rtc_device_register.patch usermodehelper-export-_exec-and-_setup-functions.patch usermodehelper-export-_exec-and-_setup-functions-fix.patch kmod-split-call-to-call_usermodehelper_fns.patch keys-split-call-to-call_usermodehelper_fns.patch coredump-remove-trailling-whitespaces.patch split-remaining-calls-to-call_usermodehelper_fns.patch kmod-remove-call_usermodehelper_fns.patch coredump-only-sigkill-should-interrupt-the-coredumping-task.patch coredump-ensure-that-sigkill-always-kills-the-dumping-thread.patch coredump-sanitize-the-setting-of-signal-group_exit_code.patch coredump-introduce-dump_interrupted.patch coredump-factor-out-the-setting-of-pf_dumpcore.patch coredump-change-wait_for_dump_helpers-to-use-wait_event_interruptible.patch exec-do-not-abuse-cred_guard_mutex-in-threadgroup_lock.patch idr-introduce-idr_alloc_cyclic.patch drivers-infiniband-hw-amso1100-convert-to-using-idr_alloc_cyclic.patch drivers-infiniband-hw-mlx4-convert-to-using-idr_alloc_cyclic.patch nfsd-convert-nfs4_alloc_stid-to-use-idr_alloc_cyclic.patch inotify-convert-inotify_add_to_idr-to-use-idr_alloc_cyclic.patch sctp-convert-sctp_assoc_set_id-to-use-idr_alloc_cyclic.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html