Received: by 2002:a05:6a10:144:0:0:0:0 with SMTP id 4csp435050pxw; Fri, 8 Apr 2022 11:07:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4THa4WDTmGvz8nL0R32tiNOLNfYbexj1Pt2iTxZe5iN1JMk72hNno/U9t95j7pQ054pCX X-Received: by 2002:a05:6402:35d1:b0:419:7f2e:cdb7 with SMTP id z17-20020a05640235d100b004197f2ecdb7mr21153810edc.152.1649441259298; Fri, 08 Apr 2022 11:07:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649441259; cv=none; d=google.com; s=arc-20160816; b=V1QVr6PH7gE39rG8vQVzDsySJdDrv46CvGoNmZIR3/7405j3Mj//azEi45mEcyjGbk eVy9fzXsz5SW4+oa3FRTR8aIlqO3gW6ftWDTWlQi7iSJyzIT4++NeBkLDkoMV4WDmv/a d3U8JEiCjrqkxlxApnI4eK5i7v7of4HmnZWCnoiY/8/TPGQ3wJw5ZYGijLSOH+LAFIG0 C71euaOFOeKu4VOp/5ddfE+FrdzXIkItCrWLCDkWdKNmuFcDl0x0k5f2jz+lOqRtoMV2 AZDydUW9QDUXw4A8ep44DWcmG6uKP/HTHSkVUkzqF/k/GGVaOhiXHv7vqrDRtio9ImJi OzSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pDC9L0lcr1QHf8qfh13ooZQp7CHb5z3+opmiIbCpO5g=; b=pQdLTkUgnY7Uxtve1+hhijPIpu5WqQTNW1i9rmnKpVd80P7TXXIy1u2Ada2arIO1fb FI/P9//DGXDUrrGwSTTwY36owA+msKgXOlHFQWLkbPPG+g2ZHPl/2J83kK51yvvYt0CC U3melAjzawsqo7VsjjQQuJwuGIiRgXpRTiVrelmWpQCCLiIISG7YTwRe9EBporr/spwv ReG16bANhCpjtbid8zBaZlfpFHyT2gSNl7+Z3Sz+Zr2ZGVYK4jstpHurGO6QnPI7RqGC GMZK74Ey2iFP6yHpQh8tV85k+v7ZYRcBg9VAid3EdTrzILcYhzOFRl/waNVQmfDF7fjm nXxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jmrr9ES2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c15-20020a170906528f00b006df76385baesi1518595ejm.78.2022.04.08.11.07.14; Fri, 08 Apr 2022 11:07:39 -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; dkim=pass header.i=@linaro.org header.s=google header.b=jmrr9ES2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236283AbiDHNe4 (ORCPT + 99 others); Fri, 8 Apr 2022 09:34:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232120AbiDHNex (ORCPT ); Fri, 8 Apr 2022 09:34:53 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B91E1E814D for ; Fri, 8 Apr 2022 06:32:50 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id m41-20020a05600c3b2900b0038eab72923aso333684wms.0 for ; Fri, 08 Apr 2022 06:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pDC9L0lcr1QHf8qfh13ooZQp7CHb5z3+opmiIbCpO5g=; b=jmrr9ES2B8XWO03NQZzQI4F2KKQwsDwVsKRsbWp63khlAKSkmi9C+eilQOfzSCKath b3no7GA5N4PEoy7SBC5oRO6EjCTlned/SX99tuyEsBpExUCpvQy48bLQ5u/Ei8+f7+70 JjoSwIq3ChdypUMSjHJMZXtPDo6LBN4VWGLzEibGOseVKZTsmd8rOjKDQID9fcDLqQLJ NDZUZYPMPUPPbnyc0e1+Kc+f3IMnC7PXOXkmbrtOHF4HITAHh0MbxX93nNvzfRQLYfBj JRUU1LkEyrPi6gVeOgj1vX501pObHoK8SRG8vDH2evWMkgLQFKGNabXNKtnXXbfryVtb 7B1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pDC9L0lcr1QHf8qfh13ooZQp7CHb5z3+opmiIbCpO5g=; b=i2CJOED3d9oFbJqSSo2oPfpgstlJ4VrQeu96xl58xh41f2VLk7isOyi+xzXLnv3ZlF N4rizCozUzRQxr4bh36LuESKhjamrebLKQIuuTedYv7n7jXI+XI6E9HWvYn+r6mM3OF2 ZE1wf/VTTGTOuuDYZIEuU//aEMHM9fGbvSode5q1AAbPF17xn0EVwTX4vjQOx4a8v3T3 8FPjMYXRZmsCB30EhYOyIlxCB1CGpyYyrVQ5YpEbbtLkqwBI7V9VwUrQcDz6XOsxW4pI ULAF9HK7pVKk5rLRDERxYmZjF2RgXuN55uBQ7u8qGG+XhOpNLkX0/kmb2VVd9ACfJCHx QgIQ== X-Gm-Message-State: AOAM531IYz6TzFwZxjgrKOfE5GE6LJgBhfoRddv2fyECCpAxtqAGjc7a sE2CkfCYvgPmbGAQPBcunT8Gww== X-Received: by 2002:a05:600c:34c5:b0:38c:30e3:1e6c with SMTP id d5-20020a05600c34c500b0038c30e31e6cmr17255479wmq.144.1649424768622; Fri, 08 Apr 2022 06:32:48 -0700 (PDT) Received: from maple.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id v26-20020a1cf71a000000b0038ea373273bsm1707695wmh.47.2022.04.08.06.32.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Apr 2022 06:32:48 -0700 (PDT) Date: Fri, 8 Apr 2022 14:32:46 +0100 From: Daniel Thompson To: Arnd Bergmann Cc: Greg KH , Hitomi Hasegawa , Linux ARM , SoC Team , "open list:SERIAL DRIVERS" , Sumit Garg , Olof Johansson , Catalin Marinas , Will Deacon , Jiri Slaby , Jason Wessel , Doug Anderson , Linux Kernel Mailing List , kgdb-bugreport@lists.sourceforge.net, Peter Zijlstra , Mike Travis Subject: Re: [PATCH v3 1/1] soc: fujitsu: Add A64FX diagnostic interrupt driver Message-ID: <20220408133246.fyw5554lgli4olvg@maple.lan> References: <20220331092235.3000787-1-hasegawa-hitomi@fujitsu.com> <20220331092235.3000787-2-hasegawa-hitomi@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Thu, Mar 31, 2022 at 05:44:55PM +0200, Arnd Bergmann wrote: > On Thu, Mar 31, 2022 at 1:49 PM Greg KH wrote: > > > + > > > +static irqreturn_t a64fx_diag_handler(int irq, void *dev_id) > > > +{ > > > + handle_sysrq('c'); > > > > > > Why is this calling this sysrq call? From an interrupt? Why? > > > > And you are hard-coding "c", are you sure? > > This is an actual sysrq driver in the traditional sense, where you can send > a single interrupt to the machine from the outside over a side channel. > > I suggested sysrq instead of just panic() to make it a bit more flexible. > Unfortunately there is no additional data, so it comes down to always > sending the same character. > > It would be possible to make that character configurable with a module > parameter or something like that, but I'm not sure that is an improvement. > Maybe you have another idea for this. Given the interrupt can be dismissed then offering non-fatal actions in response the chassis command seems reasonable. There is some prior art for this sort of feature. AFAICT SGI UV has a similar mechanism that can send an NMI-with-no-side-channel to the kernel. The corresponding driver offers a range of actions using a module parameter: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/platform/uv/uv_nmi.c#n180 I don't think a hardcoded 'c' makes any sense. With a hardcoded argument it is just obfuscation. However it is certainly seems attractive to be able to reuse handle_sysrq() to provide a more powerful set of actions. Daniel.