From patchwork Tue Jun 5 07:28:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9109 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 77DC023E57 for ; Tue, 5 Jun 2012 07:28:57 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 3FE56A1853E for ; Tue, 5 Jun 2012 07:28:57 +0000 (UTC) Received: by yhpp61 with SMTP id p61so4054277yhp.11 for ; Tue, 05 Jun 2012 00:28:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=LQqJLsYm8taNT5D9NkdxqK7Go0IALHA4E2MIJD/yc34=; b=nUoava+E3xOJcfKrquLRGAIvlrVX03bfqdfVbQ5hFT1DV09eAskynImqe0sehk/Juy mPb5m93KgKW1eUdM1K+xZX/aX6Ev8frNrfxIdCHUY0fTLvuDtsw1Bjc8wEX8OTFaQlZI qYEW4G561bv64eJ2H7w0tGQ2DFglbEeHUbSgtB39Jtmym3JCxIsZHkEsR/JXLZklEQUg l4lOuvNfF/LuZKce3l+E/Ko0y8GfeSEL9vZnTHiM4xv3tQl067GtyccS1gXPBT7Nje0o coFfvECLfCWBBhU5GneN5aa6MMrJiDgCjA29QQ7wDnxGW24smmxjLzT9RT7YMhzZBX/M LMCA== Received: by 10.50.57.167 with SMTP id j7mr1045622igq.53.1338881336535; Tue, 05 Jun 2012 00:28:56 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.24.148 with SMTP id v20csp9131ibb; Tue, 5 Jun 2012 00:28:55 -0700 (PDT) Received: by 10.14.45.15 with SMTP id o15mr6290446eeb.43.1338881334742; Tue, 05 Jun 2012 00:28:54 -0700 (PDT) Received: from eu1sys200aog113.obsmtp.com (eu1sys200aog113.obsmtp.com. [207.126.144.135]) by mx.google.com with SMTP id n6si326688eeh.69.2012.06.05.00.28.49 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jun 2012 00:28:54 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.135 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.135; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.135 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob113.postini.com ([207.126.147.11]) with SMTP ID DSNKT821MY7airs3WgEapQ448v9caqWm6J52@postini.com; Tue, 05 Jun 2012 07:28:54 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 70C193F; Tue, 5 Jun 2012 07:28:27 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id CFE6459; Tue, 5 Jun 2012 04:46:10 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 652CCA8083; Tue, 5 Jun 2012 09:28:43 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 5 Jun 2012 09:28:46 +0200 From: Linus Walleij To: Cc: Aurelien Gerault , Linus Walleij Subject: [PATCH] RFC: ARM: Ensure backtraces console printing in sleep mode Date: Tue, 5 Jun 2012 09:28:41 +0200 Message-ID: <1338881321-10728-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.9.2 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnbyNWbvs/A596sUPJHsP6sxQVTMR2kevo6j2Fee4IWykHFZ0eJ+q3D3dzYzSWCUVHVU99V From: Aurelien Gerault Ensuring that oops & panic messages/backtraces will be printed in console, even if in sleep mode (i.e. when the console is locked). So, unlock the console before printing. Signed-off-by: Aurelien Gerault Signed-off-by: Linus Walleij --- arch/arm/kernel/traps.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 4928d89..42a5057 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -273,6 +274,9 @@ void die(const char *str, struct pt_regs *regs, int err) int ret; enum bug_trap_type bug_type = BUG_TRAP_TYPE_NONE; + /* ensure that backtrace will be printed in console */ + console_unlock(); + oops_enter(); raw_spin_lock_irq(&die_lock);