From patchwork Sat May 2 14:35:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 1281684 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=soleen.com header.i=@soleen.com header.a=rsa-sha256 header.s=google header.b=YPDkpBkS; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 49Ds9s3HKQz9sSs for ; Sun, 3 May 2020 00:36:01 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728070AbgEBOgA (ORCPT ); Sat, 2 May 2020 10:36:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728025AbgEBOf7 (ORCPT ); Sat, 2 May 2020 10:35:59 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8267DC061A0C for ; Sat, 2 May 2020 07:35:59 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id e17so10224301qtp.7 for ; Sat, 02 May 2020 07:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=8KYvEz9EDAOCfmZdGdMbfD1WMIectx5I39k172/4mro=; b=YPDkpBkSZ4j6hI6CqxnpZANdrpJKDkyon3A6Zf3EpRqHhsl1uV+0JpQxVwVz3IHNf/ 0Ltm8o1w/Jef/c1upzBsx08W8aKeC61mvNDa3w44kn8ZFpQwnYZSPIZhGjZG9+9b9HPU Z2wC1rjvImEhI5ip1ZQRf/X7jqERcChc25UMVgvU4xBx0Mx3vsyFzLjS2Z7+egKG0Maq Hww/fFICU8SHXa3J5fwZgKH+eyj/RScR69Tz75wK4WS18GMXCiMLR7o2xNzfiWSjAFGD zwtbYfdPZVpF/QAndsFXx0xnz89cdzXh9+eycVPL1t3jzkHu/pKWFS8dIMs8EHKBqSdD LZsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=8KYvEz9EDAOCfmZdGdMbfD1WMIectx5I39k172/4mro=; b=WKAPqIwYShyibObQQ2NgMeqe6+NheGdMhN2up/T9OuEeUQHdZ8mKI9CLjjbm4ICdKg iDkcjXF0koD5LcqeZcPCXhT//x4lA25kT4XZb5yDx6byeLlKV6tN6IjB/CEpYXcV5CAN vGnpw5VbDebZhfejIcSTK0qBgY5xM7eWgVOWUBlyYdp+uo3ERdtx3w+1gguwzJlv/fxB Eo6t0Jywmnv2eEZlYjrEGE4kek9AtD5TQoy8D25XQ+w3Z9O3i35vmDhRBdCwPYzi3wk7 qLvliBIvEkk4sqdm2l4e3Y2XHRKf1BPRGbX4G2JURzTwnEsUHybLV1rAdoM5q90i/LVR FPdA== X-Gm-Message-State: AGi0PuZoHwtArhHJK6M1VDiJfr0mFlDstO9EDycLQc527ByoY4CVttvw i783kU0KVCkxV4PxQ+hs8Ub2Sg== X-Google-Smtp-Source: APiQypKhbAlfJ3NEVQP2KSTrFaDwZOCnIkdiyU4Th81p08h8YwZlst1Jnat37JdJwJh3RNHRrjQzRw== X-Received: by 2002:ac8:39a2:: with SMTP id v31mr8669445qte.373.1588430158626; Sat, 02 May 2020 07:35:58 -0700 (PDT) Received: from localhost.localdomain (c-73-69-118-222.hsd1.nh.comcast.net. [73.69.118.222]) by smtp.gmail.com with ESMTPSA id d23sm5156894qkj.26.2020.05.02.07.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 May 2020 07:35:57 -0700 (PDT) From: Pavel Tatashin To: pasha.tatashin@soleen.com, jmorris@namei.org, sashal@kernel.org, linux-kernel@vger.kernel.org, pmladek@suse.com, sergey.senozhatsky@gmail.com, rostedt@goodmis.org, keescook@chromium.org, anton@enomsg.org, ccross@android.com, tony.luck@intel.com, robh+dt@kernel.org, devicetree@vger.kernel.org Subject: [PATCH v1 0/3] allow ramoops to collect all kmesg_dump events Date: Sat, 2 May 2020 10:35:52 -0400 Message-Id: <20200502143555.543636-1-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Currently, ramoops is capable to collect dmesg buffer only during panic and oops events. However, it is desirable for shutdown performance analysis reasons to optionally allow collecting dmesg buffers during other events as well: reboot, kexec, emergency reboot etc. How to quickly test: virtme-run --mods=auto --kdir --mods=auto --kdir . \ -a memmap=1G$8G -a ramoops.mem_address=0x200000000 \ -a ramoops.mem_size=0x100000 -a ramoops.record_size=32768 \ -a ramoops.dump_all=1 -a quiet --qemu-opts -m 8G .. # reboot -f After VM is back: # mount -t pstore pstore /mnt # head /mnt/dmesg-ramoops-0 Restart#1 Part1 ... Pavel Tatashin (3): printk: honor the max_reason field in kmsg_dumper pstore/ram: allow to dump kmesg during regular reboot ramoops: add dump_all optional field to ramoops DT node .../bindings/reserved-memory/ramoops.txt | 3 ++ fs/pstore/platform.c | 6 ++- fs/pstore/ram.c | 38 +++++++++++++------ include/linux/kmsg_dump.h | 1 + include/linux/pstore.h | 1 + include/linux/pstore_ram.h | 1 + kernel/printk/printk.c | 16 ++++---- 7 files changed, 46 insertions(+), 20 deletions(-)