Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1630786pxm; Thu, 3 Mar 2022 23:54:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdiP9W9KnN47Fl++L+C85oLCOyUFBZmsxHvSqAsAjg69n0KlW7qpTz/70mHku6jqBOBl8D X-Received: by 2002:a63:6cc2:0:b0:37c:68f9:9664 with SMTP id h185-20020a636cc2000000b0037c68f99664mr4277519pgc.26.1646380462724; Thu, 03 Mar 2022 23:54:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646380462; cv=none; d=google.com; s=arc-20160816; b=PCsdll1js5qQb680Mh+s8DyyeADpAbuq8hOH0r3IYFVRI+UCKCmmjjyfPSbXfj2bcu BriIf4Cr8w6Uf6B8relwk0NG8M3IWGnFaZ+cbeHe7mGFst5htS8B5/N9yoIUXcwYj1qg Q2i2kp8nSayRC2dthxAWKQ468Iik5k2HLg+GIqwy1JmdKgfoEEmCUdSMwDvYSI9hXqZ8 fX8689ZiYSPhhM+yUPc0272QRUNeCEQ6jOAk/0+P0ltMcqs0KGm1Fr5ZPwgr0mcEFFai uRJr1nbNoHVlRN8owlTu/sMxkCFSX/e0NqPVoTspWtuXdsl5xDB8hjwE5yWAftOGwdba JuTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr; bh=A+RpFOlEuJHnJX/RXvQgZnIYOIQdsuYlk0HZClr17QI=; b=PAv39RNtOWZ0W65rYsWDDxPv9VcKfSo4VTrewYjPPBl80Ac7wUnK6ozdPeP3bYxPRZ 5JDXGPATao1mfnoKNYo8uunthFS77NOJV/l74tsCeIxQDHemnyu6a8gZsjlQW1x8stlz saQKbxmIzbQfC1WTzMxeVdeMHrKhH6UCtvz/2Jrk50n2sP0T9WJgsn8aFACTU8rFQkIk SQNxRqfddTGSOwmUrZ2XaezI6iOf4szK9TThgTr3bUKLglObj8EKDWPxKxDz8ei3dRI5 o2a0VHLcVlxBx5YHQLlRvO1D0L8s+r3wGA5i7+k0Tg35WKFBEtHR/X7AGS5BvnRHsmhB mf5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y64-20020a638a43000000b0037d108f47e2si532101pgd.771.2022.03.03.23.54.08; Thu, 03 Mar 2022 23:54:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238495AbiCDGrl (ORCPT + 99 others); Fri, 4 Mar 2022 01:47:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbiCDGri (ORCPT ); Fri, 4 Mar 2022 01:47:38 -0500 X-Greylist: delayed 63 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 03 Mar 2022 22:46:50 PST Received: from esa11.hc1455-7.c3s2.iphmx.com (esa11.hc1455-7.c3s2.iphmx.com [207.54.90.137]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D186418CC23; Thu, 3 Mar 2022 22:46:50 -0800 (PST) IronPort-SDR: EI5VdwU71qwp/hTU6E1u7csQh7X91ZB0CD35wA/uIVwTF/ebimlljlEUodpEXU9vMbJIj7Ea3K /M0czsdvdvhu3gzIrIga/f3b7gpxr07384+d1uIlSrBDrEjJGhAQ7tsGwAvP46JZM/S/m2lk/I Gi7t6ceLeAohYJnk6iutItdztg0KS8hPtjBlMGgSX8eu55BiNrl53kLnH2oNv7kqVJK8jfA9Xr 00H14hynqsqZyzTID70LRBiaL1Mhex9MFeInNm9orYqM+MKAbzN9MjQMOx5LzZHttPBNE6UI3V Ah8oeaTmS1da8Jj7xhb4N8Xo X-IronPort-AV: E=McAfee;i="6200,9189,10275"; a="44623340" X-IronPort-AV: E=Sophos;i="5.90,154,1643641200"; d="scan'208";a="44623340" Received: from unknown (HELO yto-r2.gw.nic.fujitsu.com) ([218.44.52.218]) by esa11.hc1455-7.c3s2.iphmx.com with ESMTP; 04 Mar 2022 15:45:44 +0900 Received: from yto-m1.gw.nic.fujitsu.com (yto-nat-yto-m1.gw.nic.fujitsu.com [192.168.83.64]) by yto-r2.gw.nic.fujitsu.com (Postfix) with ESMTP id 630A8C68A4; Fri, 4 Mar 2022 15:45:44 +0900 (JST) Received: from yto-om2.fujitsu.com (yto-om2.o.css.fujitsu.com [10.128.89.163]) by yto-m1.gw.nic.fujitsu.com (Postfix) with ESMTP id A9E14CFBC0; Fri, 4 Mar 2022 15:45:43 +0900 (JST) Received: from cn-r05-10.example.com (n3235113.np.ts.nmh.cs.fujitsu.co.jp [10.123.235.113]) by yto-om2.fujitsu.com (Postfix) with ESMTP id 7D372403884F7; Fri, 4 Mar 2022 15:45:42 +0900 (JST) From: Hitomi Hasegawa To: linux-arm-kernel@lists.infradead.org, soc@kernel.org, linux-serial@vger.kernel.org, sumit.garg@linaro.org Cc: arnd@arndb.de, olof@lixom.net, catalin.marinas@arm.com, will@kernel.org, gregkh@linuxfoundation.org, jirislaby@kernel.org, jason.wessel@windriver.com, daniel.thompson@linaro.org, dianders@chromium.org, linux-kernel@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net, peterz@infradead.org, hasegawa-hitomi@fujitsu.com Subject: [PATCH v2 0/2] soc: fujitsu: Add A64FX diagnostic interrupt driver Date: Fri, 4 Mar 2022 15:43:22 +0900 Message-Id: <20220304064324.331217-1-hasegawa-hitomi@fujitsu.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The interrupt is set using pseudo-NMI if it is available. Arm has a diagnostic interrupt feature called "Arm Generic Diagnostic Dump and Reset device", but the A64FX does not support this feature and instead has its own device definition. This patch series includes ones created by Sumit.[1] I tested on FX700: $ echo 1 > /proc/sys/kernel/sysrq $ echo HARDLOCKUP > /sys/kernel/debug/provoke-crash/DIRECT [ 124.712351] lkdtm: Performing direct entry HARDLOCKUP [ 147.232096] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: : : Send the "chassis power diag" command from the management server using ipmitool, the following message is shown: [ 206.061770] sysrq: Trigger a crash [ 206.061779] Kernel panic - not syncing: sysrq triggered crash : : Changes in V2: - Include Sumit's patch. - The handler calls handle_sysrq() to use the sysrq feature to cause a panic. - request_nmi() and request_irq() now use the same handler, and the function name of the handler has also changed. - Use readl()/writel() instead of readl_relaxed()/writel_relaxed(). V1: https://lore.kernel.org/linux-arm-kernel/20220218092010.1327309-1-hasegawa-hitomi@fujitsu.com/ [1] https://lore.kernel.org/all/20220228135408.1452882-1-sumit.garg@linaro.org/ Sumit Garg (1): tty/sysrq: Make sysrq handler NMI aware Hitomi Hasegawa (1): soc: fujitsu: Add A64FX diagnostic interrupt driver MAINTAINERS | 5 + drivers/soc/Kconfig | 1 + drivers/soc/Makefile | 1 + drivers/soc/fujitsu/Kconfig | 13 +++ drivers/soc/fujitsu/Makefile | 3 + drivers/soc/fujitsu/a64fx-diag.c | 151 +++++++++++++++++++++++++++++++ drivers/tty/sysrq.c | 45 ++++++++- include/linux/sysrq.h | 1 + kernel/debug/debug_core.c | 1 + 9 files changed, 220 insertions(+), 1 deletion(-) create mode 100644 drivers/soc/fujitsu/Kconfig create mode 100644 drivers/soc/fujitsu/Makefile create mode 100644 drivers/soc/fujitsu/a64fx-diag.c -- 2.27.0