Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2360494rwb; Fri, 9 Dec 2022 00:47:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf6e+IR9gu5QX0LBMMqCPrsoi9aPo7sqW+owxtvZsdBLigD4TYIfbjGrG1GwBQc5cjDhPzFN X-Received: by 2002:a17:906:8a4d:b0:78d:f455:b4d1 with SMTP id gx13-20020a1709068a4d00b0078df455b4d1mr3951015ejc.56.1670575662951; Fri, 09 Dec 2022 00:47:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670575662; cv=none; d=google.com; s=arc-20160816; b=LkEmRsEkBJISwI7nqCUTvGwSPK+d8Z3BSFacL7zYUoLIXOwZHDyrde4uUhpnbsMRd7 G1LKfGuzQihyevJ8hwC+plDCGG59Ko1iwVLDdAApQYtzC3RygwXo5P4imyw0qBpDKyhV y4NoAgligHSKkKYiuGFmXLAEFyKOrr6c0zqNkRg9GzqtUXIujZDA9gJ1gLC/rI1JFAD8 I5thO3f6/eyCUn1W48Dgn3dhWF2MVbHChVmr/KhUZaUmX333xphe7FCRy5yLGKoEWUF3 0LOXMeZeuST8zOH6EmLJFkJNc7ymsOtCSktcZsNNqa1bD0pyqUebkIwRsBn9ND4XBvgI 8e+A== 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:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=6bCoV06pFQPpkDGBHm3GEJO2kxMJMmRcWEDJR9ZJTUc=; b=BdGjlqgwHoUXHxoWK5qQZKE8/aLxdECBYI1c56QwtIzt/kHerNB8V7SyrkTYKClPlA rcgTG2Esy1NWrEfCKZZe3NKHMC7BpcyX8Z0rJ8aswHiyfH/+c8u6xatik5pYCq/yDgRm nYnJocDDJkQSbF78LD78J272QTQ1W3LpNW4IfW7z7tV65zOAWbgbRNE7MlmzxNjSlXMP UV7BRk26y8LGFDvsqH45hu5fPjtWVJYnLL+tM4E6/OApGDbYfXhmKT5IFSXWI9U+CEpZ T5YIyJWw9CiBfUgUFnQvYL6no7/nTbIUvTzcmHt0iW1lcMQ4YhGSLLGXxyO3pDfFec2z ribw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="joLlxUe/"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd8-20020a170907968800b007be1d7d1c22si948714ejc.32.2022.12.09.00.47.24; Fri, 09 Dec 2022 00:47:42 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b="joLlxUe/"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229947AbiLIHuC (ORCPT + 73 others); Fri, 9 Dec 2022 02:50:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbiLIHuB (ORCPT ); Fri, 9 Dec 2022 02:50:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3CDD4FF9D; Thu, 8 Dec 2022 23:50:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1AE9062190; Fri, 9 Dec 2022 07:50:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 009B2C433EF; Fri, 9 Dec 2022 07:49:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670572199; bh=mgXmxfO0nJsJ5FTTISHf8DIRyMlAKW/tgC3rR79NvVc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=joLlxUe/NXeFxsP8LAZtung2Dnt3UjWGVOHPVdp5J6eogC97HfpJy8yeNgmMAhYVn RRtD4csXTHtUAo/gw/kXOCjeZp/rbq33WtVnuo+dZhNxHRhuQyycVLgu14ekGq23Io 8jYa2qN7H9BMaQRe7REvhlg5EW5dM/4kZZ1HFEXU90zfOubP557Hp5VsqeM7RCll09 GAOZVYo/cPc/phJ4D6XiKayCyH5H82RHEK4Ba8Y4NTliz6yiySHl6qhJ7rp6Md5yNt cVx2XCgvEHUCHN0JUx5IbIVE5NM5u7eDrbQ8Zv4dxhC7q+VvwHFgdIBieE615/xWp6 9f6coiEY925AA== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Guo Ren Cc: arnd@arndb.de, palmer@rivosinc.com, tglx@linutronix.de, peterz@infradead.org, luto@kernel.org, conor.dooley@microchip.com, heiko@sntech.de, jszhang@kernel.org, lazyparser@gmail.com, falcon@tinylab.org, chenhuacai@kernel.org, apatel@ventanamicro.com, atishp@atishpatra.org, palmer@dabbelt.com, paul.walmsley@sifive.com, mark.rutland@arm.com, zouyipeng@huawei.com, bigeasy@linutronix.de, David.Laight@aculab.com, chenzhongjin@huawei.com, greentime.hu@sifive.com, andy.chiu@sifive.com, ben@decadent.org.uk, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Guo Ren Subject: Re: [PATCH -next V10 09/10] riscv: stack: Support HAVE_SOFTIRQ_ON_OWN_STACK In-Reply-To: References: <20221208025816.138712-1-guoren@kernel.org> <20221208025816.138712-10-guoren@kernel.org> <87o7sew6ey.fsf@all.your.base.are.belong.to.us> Date: Fri, 09 Dec 2022 08:49:52 +0100 Message-ID: <874ju59ftr.fsf@all.your.base.are.belong.to.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Guo Ren writes: > On Thu, Dec 8, 2022 at 6:12 PM Bj=C3=B6rn T=C3=B6pel w= rote: >> >> guoren@kernel.org writes: >> >> > From: Guo Ren >> > >> > Add the HAVE_SOFTIRQ_ON_OWN_STACK feature for the IRQ_STACKS config. T= he >> > irq and softirq use the same independent irq_stack of percpu by time >> > division multiplexing. >> > >> > Tested-by: Jisheng Zhang >> > Signed-off-by: Guo Ren >> > Signed-off-by: Guo Ren >> > --- >> > arch/riscv/Kconfig | 7 ++++--- >> > arch/riscv/kernel/irq.c | 33 +++++++++++++++++++++++++++++++++ >> > 2 files changed, 37 insertions(+), 3 deletions(-) >> > >> > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig >> > index 0a9d4bdc0338..bd4c4ae4cdc9 100644 >> > --- a/arch/riscv/Kconfig >> > +++ b/arch/riscv/Kconfig >> > @@ -447,12 +447,13 @@ config FPU >> > If you don't know what to do here, say Y. >> > >> > config IRQ_STACKS >> > - bool "Independent irq stacks" if EXPERT >> > + bool "Independent irq & softirq stacks" if EXPERT >> > default y >> > select HAVE_IRQ_EXIT_ON_IRQ_STACK >> > + select HAVE_SOFTIRQ_ON_OWN_STACK >> >> HAVE_IRQ_EXIT_ON_IRQ_STACK is used by softirq.c Shouldn't that be >> selected introduced in this patch, instead of the previous one? > This patch depends on the previous one. And the previous one could > work separately. Let me try to be more clear: IRQ_STACKS should be introduced in the previous patch, which adds per-cpu stacks to hardirq. This patch adds per-cpu stacks for softirq, and the softirq related selects: select HAVE_IRQ_EXIT_ON_IRQ_STACK select HAVE_SOFTIRQ_ON_OWN_STACK Hence, the "HAVE_IRQ_EXIT_ON_IRQ_STACK" select should be part of *this* patch, not the previous. Or am I missing something? Bj=C3=B6rn