Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2806092ybt; Mon, 22 Jun 2020 07:30:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzN3iANzDRJ25IR9/hN9ULKutPZNgWwseG8W4gGdDIwk2lYUeLFJqKpOx5S1euJtaQ67EKh X-Received: by 2002:a05:6402:7d4:: with SMTP id u20mr16895001edy.30.1592836218446; Mon, 22 Jun 2020 07:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592836218; cv=none; d=google.com; s=arc-20160816; b=L0YQqnIJLtTFtM993aZ7sw8irtxbIs2tnisHLqCio8KqNLTL2W0np5GdHIaXp/Kwyz WeMTCZO3Oj/CXHL+lK8vpbPhYtiDtAaa17R7IyMVelCmDCd2IK5p8AV5aO1y976hAIYC 5ydfoCoSO5tYgLBMjxscEEX7l4lvoQjSpLE2bUfqEDiZwZ1xcZ+Fj+YvXy5Fe8ywVYUs hmi0pm8OP2cWNjycOh3MnoUeKWPRaB1g6ZCtTUIidHSHJGxezoqFX09ItxUOnyVHzxMx DJp+ctm+anF7W2Yu6/iBuQcB6suubOiehGUmHjDra2oQywaCUEFBqJpRROqyeKil/+T4 CbgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=3GI1uGL8qRj0UWsRg1f35/N6knURd5cco/VjWV8guxI=; b=fmFAhuwybOJLH8u5dzcwXnKTVcZ3nR/3SRfrW8BaPrvvDWBdFf3Jz36ovQ/bW8B9q2 vljjQVA896UYAkwWJdvkxFBgEBENNNQ0UA9U6hiOe+BFxTJw4OwnrTxpYiKt9YC2llNq FaQnsy/KIRMSpbvoNBN4lF7G+yE/gnxKMtMdEoAeuRWM5IlA7Z5I9/Re5+yKe8Y6nsNb t58DGs8WHGK/ltAmsV0q+PTFHcSU8780UWPeMHKDzqkwQyQylHrrBCEJNAlJ/UVfTa6f NrdhZdvaLASWsJ4v+ChBvvYAaAvfC6GhpzoD8rC2m+AHAMY1plXOhihTpM2SYogUL2TK zkHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CcQ+0S6+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b23si1484364ejb.465.2020.06.22.07.29.55; Mon, 22 Jun 2020 07:30:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CcQ+0S6+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729155AbgFVO1X (ORCPT + 99 others); Mon, 22 Jun 2020 10:27:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729515AbgFVO1U (ORCPT ); Mon, 22 Jun 2020 10:27:20 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47E1EC061795 for ; Mon, 22 Jun 2020 07:27:20 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id n2so7632386pld.13 for ; Mon, 22 Jun 2020 07:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=3GI1uGL8qRj0UWsRg1f35/N6knURd5cco/VjWV8guxI=; b=CcQ+0S6+v97SJO9VqZ1l3zquEMKhBkbcW/mJDEWfKfhOwMPLFJd8tfH+lqmbqz5SEH wJe2AxmAsInK6RWKkFdunWoh0OZpYUei2rkv+4VsjH18jzdmSoWWbzfI+3TeuZ2ZcTZc DyDiyAcuwI0MJxW/DCAxav6ctw9GQsLe3aQLlmFsco10yy1oVcIx4uoPm4LQBQR08cYt jSe7oExrAEuFqb52wL+qT6kK4ZPX7LVJXEgB3s+gcBG7h5j7YuCyw5Fg5/chnvLQfeXB 4tYZ8jGawHQD9UufmWlaYnikek7LGVN/3/uxEjH+L1Pl74VKof4oz54ibaDXG0nahoMO nwoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3GI1uGL8qRj0UWsRg1f35/N6knURd5cco/VjWV8guxI=; b=iwhPp6rc18nanE9dM9eqtwv8LjmylF5PkiNMut+LqRxPCZgTExn7tgjtXAkYmdwaiF AYQUzZM8lpnQGSFOWwpY3FTyLVCMSBJ6gHNb+Wrbo3/0lDCLccq/HedKKQM57Rvpwk3Q Rj15e4kslb0my5DXSA6eGYh5Gn0U58KjJRT5LRsngmhmHk9Au8n2nNetZv+dlmxOQ5u8 aWoE9m2FO2UzplwTo0V3seCT6YbR7TLwAcngPK40wdGDh6au1XDguuKeEdf+f/vvS/ko hfzECvyrXFtXcpKtXBP3P++m3HX17CZV7VGq4hPs9v7mNF9rtmcypi0vqZ/IPBsIwLLb rkig== X-Gm-Message-State: AOAM533Lyu3qtvDJc/B4N1kOnrlvHmkk5obqHKCEXEkoNUoJcbKmHDmu l2Y6vfz1a79JAoeknf1h35R2mg== X-Received: by 2002:a17:90a:acf:: with SMTP id r15mr19289807pje.171.1592836039745; Mon, 22 Jun 2020 07:27:19 -0700 (PDT) Received: from localhost.localdomain ([117.252.67.186]) by smtp.gmail.com with ESMTPSA id d6sm14547939pjh.5.2020.06.22.07.27.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2020 07:27:18 -0700 (PDT) From: Sumit Garg To: kgdb-bugreport@lists.sourceforge.net, linux-serial@vger.kernel.org Cc: gregkh@linuxfoundation.org, daniel.thompson@linaro.org, jason.wessel@windriver.com, dianders@chromium.org, jslaby@suse.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, Sumit Garg Subject: [PATCH 0/7] Enable support for kgdb NMI console feature Date: Mon, 22 Jun 2020 19:56:17 +0530 Message-Id: <1592835984-28613-1-git-send-email-sumit.garg@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This work is derived from Daniel's prior work here [1]. It has been rebased (tag: kgdb-5.8-rc1 + console hardening patch-set[2]), reworked to use serial RX interrupt as NMI (pseudo NMI on aarch64) in order to drop into debugger and tested on Developerbox (using amba-pl011). - Patch #1 is more of a fix required for NMI console to replace kgdb IO console. - Patches #2 to #6 adds an architecture agnostic fallback mechanism to enable kgdb NMI console using serial RX interrupt as NMI. - Patch #7 is an optimization patch that gets rid of inefficient timer based tasklet and rather uses irq_work. Usage of kgdb NMI console: - Enable "CONFIG_SERIAL_KGDB_NMI". - Kernel cmdline modification for Developerbox: console=ttyNMI0 kgdboc=ttyAMA0 [1] https://git.linaro.org/people/daniel.thompson/linux.git/log/?h=kgdb/polled_request_irq [2] https://lkml.org/lkml/2020/6/4/294 Daniel Thompson (5): tty: serial: Add poll_get_irq() to the polling interface kgdb: Add request_nmi() to the io ops table for kgdboc serial: kgdb_nmi: Add support for interrupt based fallback serial: 8250: Implement poll_get_irq() interface serial: kgdb_nmi: Replace hrtimer with irq_work ping Sumit Garg (2): serial: kgdb_nmi: Allow NMI console to replace kgdb IO console serial: amba-pl011: Implement poll_get_irq() interface drivers/tty/serial/8250/8250_port.c | 16 ++++++ drivers/tty/serial/amba-pl011.c | 12 +++++ drivers/tty/serial/kgdb_nmi.c | 100 ++++++++++++++++++++++++------------ drivers/tty/serial/kgdboc.c | 35 +++++++++++++ drivers/tty/serial/serial_core.c | 18 +++++++ include/linux/kgdb.h | 7 +++ include/linux/serial_core.h | 1 + include/linux/tty_driver.h | 1 + 8 files changed, 158 insertions(+), 32 deletions(-) -- 2.7.4