Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp259617pxb; Thu, 31 Mar 2022 04:59:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1IE5ZpoNPdj6S7Xi4cM5vFxiDOWcKOqu4a80BRJd1lK19cti304dKEyi0G1W/6NYSCh5N X-Received: by 2002:a63:1849:0:b0:380:3aee:496a with SMTP id 9-20020a631849000000b003803aee496amr10334939pgy.489.1648727969053; Thu, 31 Mar 2022 04:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648727969; cv=none; d=google.com; s=arc-20160816; b=eviY22Qecq+suZpXCM0vGJjvEPAd5pIzYj2mc0rcLZAwk+bsCNasrL7KyhWdgDi2Tv zHvTNXNS/BM9364huVPRxihhi1lnlkPD2UJWUk/VfiyKy3YA1zuMCLGr389Ea3gOuG8I RxumzrAY+Xs42LyloW+jE69n9wfD4D7MMJKLjKLuzqm+i/zJ0KxAtqJkqr0iIuu69GzB 0X7852rxMrOk7Tn+sChyshuuPqAYFAoZei+zsayvNwudbklQH5p/qfusplDOApuoaoJR LzBRd3wl0SNsApCoJJIgIMtV9us3vefdPcsAI453nFJc5E2yCa4mISN+Jy/d+ohVgRVL wKbw== 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=zMlhShqHtzVWbDj/VZGc5LIrN6f4FYhdEjVwAre8mOA=; b=ml5AU/y8kzRdLUeT0jJrHpn8oGCc6o5xpuHInbXxLRXFd5spKKJJBiePwjgPpQQjrr zUCQBI4Q+KRuxlqFMHpFNj67nUauA9Pjg4r1mqeHMDSeoo8yjQWaS5ZkcntIN3mrVN+V X5EnGPUqARul3f35tsdeS8nCIpzPINR4wVlt/cYdf2VHGYPo4DuVtl11Aey1nIdlLGdi F313sYlOXhTj9SwhX/GzxWSqIghX0py79rw28EQYpCIuF4wGrunLBMPPZgUZQczc2moy YiUIbvf9yMvu/Kgm7nQOOP55+vEqAQWiOb4ZzxG6KTk3eAmKdStFUpC3OjATcCN2+Q8F v1ew== 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 y5-20020a17090322c500b00153b2d164c6si25763227plg.206.2022.03.31.04.59.16; Thu, 31 Mar 2022 04:59:29 -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 S232712AbiCaJ1V (ORCPT + 99 others); Thu, 31 Mar 2022 05:27:21 -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 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 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 -- 2.27.0