Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6672198iob; Wed, 11 May 2022 02:49:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKaBz2zVtK0amKJFBDIe7H5DwXzoosmmK0R/yNUXA8mSiTVytHTGteBv9cYBqRxmb5cp0l X-Received: by 2002:a63:184c:0:b0:3c5:fd55:1e9e with SMTP id 12-20020a63184c000000b003c5fd551e9emr19908408pgy.315.1652262598140; Wed, 11 May 2022 02:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652262598; cv=none; d=google.com; s=arc-20160816; b=aidBiP8UIARpW+fc9vtEcb4XuvtcFtzrlOkXgZli7rispa/nvnoG9GAj1rlgice3Bx 2Py+MHprk/0QG10aIT3eTMmlvFt6jFEAmjC/zTM3HQcZqDx9/izPRz9oY2UsMi0pkxNa a0B58gH0nLFUwRjSBLbTVPglZITXakIE9y9400oYITxulYTxvwPBwIQFZ6lTzb2ALw6i sz7Uutudv0v0Fnf95qvWcBJWEb/+WqvIDIT3LYkTqJM0e1D+TUFqvDbGiSlzoO+zX+3A eMgXAHzJmhD2EhMInuHn7CFxVrGzjW2VSJSXGM2kq8toZ8hqL56GEY+GSpXoCTSGK2Vb EUHg== 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; bh=c5rEu+JhhuuapOkOryoKi9v1Sylz5z9zap4h2C5HrVs=; b=dvb5hvwQ0FLs5ajm8MPHJOJpjIUaAaP3DB6V+EMgmiencewaBQIYWjy2SGYWFG3Y58 XtJARiNNvXxXofD1A33YaGdTQ9BX2mkuhYgk7NXQ6ENUAVaRu2Pr7ZJUTimFAO26dDYC XmhgTSwwCGsH8l8gT6sZxeiXlLg+32KUUE3Ei/4+HyY+tQeFvk6nyXGFyIxpdUhHZLpz lC6JRVR82SdJ1BDvCN3uAFbitd4bjyX3KkP1HQ7Wk3I/oQRNrjj/vNLQ8KwHZqRRhEqx HMgzSuSEjMxjOG8l760qtC9ClEJSF/XNvvmLekCr5wdZ42LkrHH1iGedsxjgScmsWxpx otTw== 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 c9-20020a63ea09000000b003c627110b5bsi2331038pgi.810.2022.05.11.02.49.46; Wed, 11 May 2022 02:49:58 -0700 (PDT) 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 S241476AbiEKGW4 (ORCPT + 99 others); Wed, 11 May 2022 02:22:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237612AbiEKGWu (ORCPT ); Wed, 11 May 2022 02:22:50 -0400 X-Greylist: delayed 65 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 10 May 2022 23:22:49 PDT 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 A7B911CA040; Tue, 10 May 2022 23:22:49 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6400,9594,10343"; a="51935716" X-IronPort-AV: E=Sophos;i="5.91,216,1647270000"; d="scan'208";a="51935716" Received: from unknown (HELO yto-r1.gw.nic.fujitsu.com) ([218.44.52.217]) by esa11.hc1455-7.c3s2.iphmx.com with ESMTP; 11 May 2022 15:21:41 +0900 Received: from yto-m3.gw.nic.fujitsu.com (yto-nat-yto-m3.gw.nic.fujitsu.com [192.168.83.66]) by yto-r1.gw.nic.fujitsu.com (Postfix) with ESMTP id 4038DE5BA6; Wed, 11 May 2022 15:21:40 +0900 (JST) Received: from oym-om1.fujitsu.com (oym-om1.o.css.fujitsu.com [10.85.58.161]) by yto-m3.gw.nic.fujitsu.com (Postfix) with ESMTP id 76BD2140E1; Wed, 11 May 2022 15:21:39 +0900 (JST) Received: from cn-r05-10.example.com (n3235113.np.ts.nmh.cs.fujitsu.co.jp [10.123.235.113]) by oym-om1.fujitsu.com (Postfix) with ESMTP id 4078940487F9C; Wed, 11 May 2022 15:21:39 +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 v4 0/1] soc: fujitsu: Add A64FX diagnostic interrupt driver Date: Wed, 11 May 2022 15:21:12 +0900 Message-Id: <20220511062113.2645747-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. I tested on FX700: $ echo 1 > /proc/sys/kernel/sysrq $ echo HARDLOCKUP > /sys/kernel/debug/provoke-crash/DIRECT : : Send the "chassis power diag" command from the management server using ipmitool, the following message is shown: [ 123.272342] Kernel panic - not syncing: a64fx_diag: interrupt received : : Changes in V4: - Call the panic function instead of sysrq. Prepare a handler for each NMI/IRQ and call nmi_panic()/panic() respectively (as in v1). - Fixing other issues raised by Greg. 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(). V3: https://lore.kernel.org/linux-arm-kernel/20220331092235.3000787-1-hasegawa-hitomi@fujitsu.com/ 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 | 155 +++++++++++++++++++++++++++++++ 6 files changed, 178 insertions(+) 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