mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 08:55:31 +07:00
d75f773c86
%pF and %pf are functionally equivalent to %pS and %ps conversion specifiers. The former are deprecated, therefore switch the current users to use the preferred variant. The changes have been produced by the following command: git grep -l '%p[fF]' | grep -v '^\(tools\|Documentation\)/' | \ while read i; do perl -i -pe 's/%pf/%ps/g; s/%pF/%pS/g;' $i; done And verifying the result. Link: http://lkml.kernel.org/r/20190325193229.23390-1-sakari.ailus@linux.intel.com Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-arm-kernel@lists.infradead.org Cc: sparclinux@vger.kernel.org Cc: linux-um@lists.infradead.org Cc: xen-devel@lists.xenproject.org Cc: linux-acpi@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: drbd-dev@lists.linbit.com Cc: linux-block@vger.kernel.org Cc: linux-mmc@vger.kernel.org Cc: linux-nvdimm@lists.01.org Cc: linux-pci@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: linux-btrfs@vger.kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net Cc: linux-mm@kvack.org Cc: ceph-devel@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: David Sterba <dsterba@suse.com> (for btrfs) Acked-by: Mike Rapoport <rppt@linux.ibm.com> (for mm/memblock.c) Acked-by: Bjorn Helgaas <bhelgaas@google.com> (for drivers/pci) Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Petr Mladek <pmladek@suse.com>
61 lines
1.4 KiB
C
61 lines
1.4 KiB
C
/*
|
|
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
|
* Copyright (C) 2013 Richard Weinberger <richrd@nod.at>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#include <linux/kallsyms.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/module.h>
|
|
#include <linux/sched.h>
|
|
#include <linux/sched/debug.h>
|
|
#include <linux/sched/task_stack.h>
|
|
|
|
#include <asm/sysrq.h>
|
|
#include <asm/stacktrace.h>
|
|
#include <os.h>
|
|
|
|
static void _print_addr(void *data, unsigned long address, int reliable)
|
|
{
|
|
pr_info(" [<%08lx>] %s%pS\n", address, reliable ? "" : "? ",
|
|
(void *)address);
|
|
}
|
|
|
|
static const struct stacktrace_ops stackops = {
|
|
.address = _print_addr
|
|
};
|
|
|
|
void show_stack(struct task_struct *task, unsigned long *stack)
|
|
{
|
|
unsigned long *sp = stack;
|
|
struct pt_regs *segv_regs = current->thread.segv_regs;
|
|
int i;
|
|
|
|
if (!segv_regs && os_is_signal_stack()) {
|
|
pr_err("Received SIGSEGV in SIGSEGV handler,"
|
|
" aborting stack trace!\n");
|
|
return;
|
|
}
|
|
|
|
if (!stack)
|
|
sp = get_stack_pointer(task, segv_regs);
|
|
|
|
pr_info("Stack:\n");
|
|
stack = sp;
|
|
for (i = 0; i < 3 * STACKSLOTS_PER_LINE; i++) {
|
|
if (kstack_end(stack))
|
|
break;
|
|
if (i && ((i % STACKSLOTS_PER_LINE) == 0))
|
|
pr_cont("\n");
|
|
pr_cont(" %08lx", *stack++);
|
|
}
|
|
pr_cont("\n");
|
|
|
|
pr_info("Call Trace:\n");
|
|
dump_trace(current, &stackops, NULL);
|
|
pr_info("\n");
|
|
}
|