Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1078348rda; Mon, 23 Oct 2023 01:29:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNbD6lIl/Q5G43bobzEx2PP2u81aRLfPIS7oYZPcHY8M4Mnu4TIjBdbEEdKMJ3GNbWwS6f X-Received: by 2002:a05:6a20:3caa:b0:15a:f4e:620d with SMTP id b42-20020a056a203caa00b0015a0f4e620dmr11253098pzj.4.1698049791585; Mon, 23 Oct 2023 01:29:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698049791; cv=none; d=google.com; s=arc-20160816; b=EUJTmr1eHIxb/lbga/7AWfOwjZGTcVO4rpwyGk9m0vGsbAg9RNYoezi5CI4ArW/GwO wvzeWI6b/i0MoNiH+669jyefDvxQR71AkygAgp6JoMkMABWy/gPDx6923pTqSFMUQNkK FkybSQoFCXdAsM4YoyDMUOIrWrLb8yW953uFDQuuUXwxTItTEvP7U5aFTkIgepwy94Xt zVGhzP1xBEv/pxUPym/h8VkanUCE3TuPP+8pLINGB4QsNysNG/9bcrbGkWAGKLYNduUS nVoLO2cfTYI7ArXwodifdAZiYia9+BX4Bph5VpIs/rum0EQFuOEPU17akih1nmOfgZd7 Qq3A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yC7lpeLF6zJ2U1K9d3gKHK6RO2c15uLNrRvH89Y0oYM=; fh=O4eOVhHjKTyaSORSQqoF+Vv6GYDagG+8LotEUwhRqvg=; b=ZgtVVAcdYOmLoQNI8jHd77YoR4B1mDcO8eUm8u0N+47kXlQAdGdFM9kenYNVu1t7rJ zJ72KLhIOfJZWKDQVVWJsyLBEwJhRtaHqvOktV4qIk6eO4CRprkLLLbXf6Zs8kp8uHwg oh4M3cFD/xkPHEKqa25D/6GygsCVdxGa+hE3c+spPVcx13A7PyAWHMM6uRIKZTKIbj+A BIy0PyhMbRDRibghQKl+alYcJqokRrlbVDKfn3EApoYXkYRd7/X6OH9AF9pRHw2Zk/yB CbulAsTtThWZzlkyaNVbhbdMrOYfyWfzqbK5IbrLJz2gTgVvazFzmDyjN17OsEGPkyug WrcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=EgA7QFti; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id g2-20020a056a000b8200b006bc57f9ef16si6174456pfj.169.2023.10.23.01.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 01:29:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=EgA7QFti; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id AF0AE806237F; Mon, 23 Oct 2023 01:29:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229936AbjJWI33 (ORCPT + 99 others); Mon, 23 Oct 2023 04:29:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbjJWI32 (ORCPT ); Mon, 23 Oct 2023 04:29:28 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CD21DD for ; Mon, 23 Oct 2023 01:29:27 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6bd32d1a040so3015102b3a.3 for ; Mon, 23 Oct 2023 01:29:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1698049767; x=1698654567; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yC7lpeLF6zJ2U1K9d3gKHK6RO2c15uLNrRvH89Y0oYM=; b=EgA7QFtiTyRVdMGiCGCgsrhZUC5LD1B6etQWLWgwXgHdvjpSJa+aWvlsQ/7yM+0Q8C +xy6om9MYlRelRiI9CAkL+Uk0NMl9Er5BenQHs6PXthbl4v5P2mKEbSdtBu5G+uGVgo2 HqruKzYqnjweoAZG0ghGoeQ3gCanp4xy/KTRr7qjxyMVO/OW2EfR4Y5H1siQliUPBYkh 70HLB8D7mR14EJrWIKLU8BrEwEwsYlIVVq+SWqmpjj8NY9PEL85qnyECZAjMWOnjx68U Qrkzla17YSfr7nqGYOl2jlD6hjOTLuZfZkhTggK1qzfcEdT2HyMIcU3G9Yz6xZLpcPUS tuQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698049767; x=1698654567; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yC7lpeLF6zJ2U1K9d3gKHK6RO2c15uLNrRvH89Y0oYM=; b=jTzG76B4VveQz8c0/JkfMw3bHZzHfdtrYYGXtgd7GH2wnYbUhV2O9Vw531l7MijM0H FkStwogxVXG6GgGJ9rPY/ZtBaQXdjpeZO8zvKsaWvcRDymbqrbXRGJ+K1Fp3nwrMazvG 00OefDb9cJFi8Rd3QCKGFQiY0zthzL9TKYnO1cy5ljzM9slkDmhg8Y5HhWsmVTKvTlyl reei8S2pnIGg1/9BlVQc8hRJZFknFT5BDgIo3ZJqjp1Chx6vibHQeO2/O/gNbMLM9wYF VbDFFrwjY9sWynpMQtUlGc3YMl+FCexxcnNxnoGvBQJm+Og+80MrzDhhvMfiraBfAoSR I7oQ== X-Gm-Message-State: AOJu0YysldadpmPuQyXdK9UPUuu8J0GipwmA8oAqcrHqPYSS0WWbGt6p iZQy83Hzubfgfa4+HYalgHDUjg== X-Received: by 2002:a05:6a20:a108:b0:14c:daa9:5e22 with SMTP id q8-20020a056a20a10800b0014cdaa95e22mr10514808pzk.45.1698049766796; Mon, 23 Oct 2023 01:29:26 -0700 (PDT) Received: from J9GPGXL7NT.bytedance.net ([203.208.167.147]) by smtp.gmail.com with ESMTPSA id d15-20020a170903230f00b001b8b07bc600sm5415805plh.186.2023.10.23.01.29.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 23 Oct 2023 01:29:26 -0700 (PDT) From: Xu Lu To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, tglx@linutronix.de, maz@kernel.org, anup@brainfault.org, atishp@atishpatra.org Cc: dengliang.1214@bytedance.com, liyu.yukiteru@bytedance.com, sunjiadong.lff@bytedance.com, xieyongji@bytedance.com, lihangjing@bytedance.com, chaiwen.cc@bytedance.com, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Xu Lu Subject: [RFC 01/12] riscv: Introduce CONFIG_RISCV_PSEUDO_NMI Date: Mon, 23 Oct 2023 16:29:00 +0800 Message-Id: <20231023082911.23242-2-luxu.kernel@bytedance.com> X-Mailer: git-send-email 2.39.3 (Apple Git-145) In-Reply-To: <20231023082911.23242-1-luxu.kernel@bytedance.com> References: <20231023082911.23242-1-luxu.kernel@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 23 Oct 2023 01:29:49 -0700 (PDT) This commit introduces a new config RISCV_PSEUDO_NMI to control whether enabling the pseudo NMI feature on RISC-V. Signed-off-by: Xu Lu --- arch/riscv/Kconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index d607ab0f7c6d..487e4293f31e 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -669,6 +669,16 @@ config RISCV_BOOT_SPINWAIT If unsure what to do here, say N. +config RISCV_PSEUDO_NMI + bool "Support for NMI-like interrupts" + depends on !RISCV_M_MODE + default n + help + Adds support for mimicking Non-Maskable Interrupts through the use of + CSR_IE register. + + If unsure, say N. + config ARCH_SUPPORTS_KEXEC def_bool MMU -- 2.20.1