From patchwork Sat Nov 1 10:11:57 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 6780 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id BC7FCDDE21 for ; Sat, 1 Nov 2008 21:12:18 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from sipsolutions.net (xc.sipsolutions.net [83.246.72.84]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7BAD7DDDEF for ; Sat, 1 Nov 2008 21:12:03 +1100 (EST) Received: by sipsolutions.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1KwDSV-0004uP-CK; Sat, 01 Nov 2008 11:11:55 +0100 Subject: [PATCH] powerpc: allow configuring max stack dump depth From: Johannes Berg To: Paul Mackerras Date: Sat, 01 Nov 2008 11:11:57 +0100 Message-Id: <1225534317.3560.8.camel@johannes.berg> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Cc: linuxppc-dev list X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org On my screen, when something crashes, I only have space for maybe 16 functions of the stack trace before the information above it scrolls off the screen. It's easy to hack the kernel to print out only that much, but it's harder to remember to do it. This patch introduces a config option for it so that I can keep the setting in my config. Signed-off-by: Johannes Berg --- arch/powerpc/Kconfig.debug | 7 +++++++ arch/powerpc/kernel/process.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) --- everything.orig/arch/powerpc/Kconfig.debug 2008-11-01 11:03:29.000000000 +0100 +++ everything/arch/powerpc/Kconfig.debug 2008-11-01 11:05:45.000000000 +0100 @@ -2,6 +2,13 @@ menu "Kernel hacking" source "lib/Kconfig.debug" +config PRINT_STACK_DEPTH + int "Stack depth to print" + default 64 + help + This option allows you to set the stack depth that the kernel + prints out in case your display is too small. + config DEBUG_STACKOVERFLOW bool "Check for stack overflows" depends on DEBUG_KERNEL --- everything.orig/arch/powerpc/kernel/process.c 2008-11-01 11:03:09.000000000 +0100 +++ everything/arch/powerpc/kernel/process.c 2008-11-01 11:03:21.000000000 +0100 @@ -998,7 +998,7 @@ unsigned long get_wchan(struct task_stru return 0; } -static int kstack_depth_to_print = 64; +static int kstack_depth_to_print = CONFIG_PRINT_STACK_DEPTH; void show_stack(struct task_struct *tsk, unsigned long *stack) {