From patchwork Tue Apr 29 14:30:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 29360 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f198.google.com (mail-pd0-f198.google.com [209.85.192.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 92308202FE for ; Tue, 29 Apr 2014 14:31:24 +0000 (UTC) Received: by mail-pd0-f198.google.com with SMTP id y13sf1089241pdi.9 for ; Tue, 29 Apr 2014 07:31:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=W1b2nMozffb+T0cK+EH5XvQpKN4jb2ta3v3j/nLkqDo=; b=IIKqsLnZobrjhqncil/Xw/LXD4RX5eug0g/D78SzLS6dgEIkm8qKUz8nYdYThCELZP rKMGFWVgDJUwIJ4TTavZfwXt0IvSM3nBQFkhI4LjJdAAB59bF4ftXGeuqvW41fBz5hKk uroWYdTcNWNVz357nAkv1P98bGUGVNx9LUUTagx6XJUhnv0x5mbk2vHB/aKJRqNkd45v V3hyrKRhw/4JaofC7c/SNeCTAAbY/LJWD5Nh8FwBr8E3IJ+dreLpo19JYIvfIzTioSd+ 1Ka/gI4eiLbxYVZ29NowafCBcQd8aOzkrcEh+BQmAPOcasrf47qsEC11zA809b8V1yzY sOeA== X-Gm-Message-State: ALoCoQngGZs1zn/VZdfMiFztZLr2c4g9eNXfF0uIr+ZmKurTJES0y9UBhlDobHHKoxK1P75SBo2Q X-Received: by 10.66.102.3 with SMTP id fk3mr15025942pab.17.1398781872749; Tue, 29 Apr 2014 07:31:12 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.8 with SMTP id j8ls106460qge.45.gmail; Tue, 29 Apr 2014 07:31:12 -0700 (PDT) X-Received: by 10.52.189.193 with SMTP id gk1mr25450286vdc.12.1398781872615; Tue, 29 Apr 2014 07:31:12 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id xv15si4553158veb.44.2014.04.29.07.31.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 07:31:12 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id jy13so360919veb.2 for ; Tue, 29 Apr 2014 07:31:12 -0700 (PDT) X-Received: by 10.58.243.72 with SMTP id ww8mr463574vec.49.1398781872555; Tue, 29 Apr 2014 07:31:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp202444vcb; Tue, 29 Apr 2014 07:31:12 -0700 (PDT) X-Received: by 10.180.91.197 with SMTP id cg5mr529929wib.35.1398781871737; Tue, 29 Apr 2014 07:31:11 -0700 (PDT) Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by mx.google.com with ESMTPS id 1si8273904wjz.203.2014.04.29.07.31.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 07:31:11 -0700 (PDT) Received-SPF: none (google.com: daniel.thompson@linaro.org does not designate permitted sender hosts) client-ip=74.125.82.49; Received: by mail-wg0-f49.google.com with SMTP id x13so311194wgg.20 for ; Tue, 29 Apr 2014 07:31:11 -0700 (PDT) X-Received: by 10.194.243.3 with SMTP id wu3mr24747639wjc.29.1398781871253; Tue, 29 Apr 2014 07:31:11 -0700 (PDT) Received: from sundance.lan (cpc4-aztw19-0-0-cust157.18-1.cable.virginm.net. [82.33.25.158]) by mx.google.com with ESMTPSA id uc3sm5389589wib.10.2014.04.29.07.31.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Apr 2014 07:31:10 -0700 (PDT) From: Daniel Thompson To: Cc: patches@linaro.org, linaro-kernel@lists.linaro.org, Daniel Thompson Subject: [PATCH 2/3] kdb: Implement interrupts command Date: Tue, 29 Apr 2014 15:30:39 +0100 Message-Id: <1398781841-15152-3-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1398781841-15152-1-git-send-email-daniel.thompson@linaro.org> References: <1398781841-15152-1-git-send-email-daniel.thompson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.thompson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The contents of /proc/interrupts is useful to diagnose problems during boot up or when the system becomes unresponsive (or at least it can be if failure is causes by interrupt problems). This command is also seen in out-of-tree debug systems such as Android's FIQ debugger. This change allows the file to be displayed from kdb. Signed-off-by: Daniel Thompson --- fs/proc/interrupts.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fs/proc/interrupts.c b/fs/proc/interrupts.c index a352d57..1f8eeaf 100644 --- a/fs/proc/interrupts.c +++ b/fs/proc/interrupts.c @@ -4,6 +4,7 @@ #include #include #include +#include /* * /proc/interrupts @@ -45,9 +46,18 @@ static const struct file_operations proc_interrupts_operations = { .release = seq_release, }; +#ifdef CONFIG_KGDB_KDB +static int kdb_interrupts(int argc, const char **argv) +{ + return kdb_print_seq_file(&int_seq_ops); +} +#endif + static int __init proc_interrupts_init(void) { proc_create("interrupts", 0, NULL, &proc_interrupts_operations); + kdb_register("interrupts", kdb_interrupts, "", + "Show /proc/interrupts", 3); return 0; } fs_initcall(proc_interrupts_init);