From patchwork Thu Mar 31 09:22:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hitomi Hasegawa X-Patchwork-Id: 555522 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31E1BC433F5 for ; Thu, 31 Mar 2022 09:25:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232207AbiCaJ1T (ORCPT ); Thu, 31 Mar 2022 05:27:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232107AbiCaJ1S (ORCPT ); Thu, 31 Mar 2022 05:27:18 -0400 Received: from esa3.hc1455-7.c3s2.iphmx.com (esa3.hc1455-7.c3s2.iphmx.com [207.54.90.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FA5D1FCD36; Thu, 31 Mar 2022 02:25:30 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6200,9189,10302"; a="68135880" X-IronPort-AV: E=Sophos;i="5.90,224,1643641200"; d="scan'208";a="68135880" Received: from unknown (HELO oym-r4.gw.nic.fujitsu.com) ([210.162.30.92]) by esa3.hc1455-7.c3s2.iphmx.com with ESMTP; 31 Mar 2022 18:25:28 +0900 Received: from oym-m1.gw.nic.fujitsu.com (oym-nat-oym-m1.gw.nic.fujitsu.com [192.168.87.58]) by oym-r4.gw.nic.fujitsu.com (Postfix) with ESMTP id 7B52AE07EA; Thu, 31 Mar 2022 18:25:27 +0900 (JST) Received: from yto-om3.fujitsu.com (yto-om3.o.css.fujitsu.com [10.128.89.164]) by oym-m1.gw.nic.fujitsu.com (Postfix) with ESMTP id A192028715D1; Thu, 31 Mar 2022 18:25:26 +0900 (JST) Received: from cn-r05-10.example.com (n3235113.np.ts.nmh.cs.fujitsu.co.jp [10.123.235.113]) by yto-om3.fujitsu.com (Postfix) with ESMTP id 3B74C400C07B8; Thu, 31 Mar 2022 18:25:26 +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 v3 0/1] soc: fujitsu: Add A64FX diagnostic interrupt driver Date: Thu, 31 Mar 2022 18:22:34 +0900 Message-Id: <20220331092235.3000787-1-hasegawa-hitomi@fujitsu.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 Precedence: bulk List-ID: X-Mailing-List: linux-serial@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 assumes that Sumit's patch has been patched.[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 V3: - Exclude Sumit's patch. - Retest in v5.17. 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(). [1] https://lore.kernel.org/all/20220307110328.2557655-1-sumit.garg@linaro.org/ V2: https://lore.kernel.org/linux-arm-kernel/20220304064324.331217-3-hasegawa-hitomi@fujitsu.com/ V1: https://lore.kernel.org/linux-arm-kernel/20220218092010.1327309-1-hasegawa-hitomi@fujitsu.com/ 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 +++++++++++++++++++++++++++++++ 6 files changed, 174 insertions(+) create mode 100644 drivers/soc/fujitsu/Kconfig create mode 100644 drivers/soc/fujitsu/Makefile create mode 100644 drivers/soc/fujitsu/a64fx-diag.c