Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEF22C433EF for ; Tue, 5 Oct 2021 07:21:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F52D61507 for ; Tue, 5 Oct 2021 07:21:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7F52D61507 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fg/hp7zZ2JWGlnWPxFK14W68ySLgY4ExX2k2+myUcSE=; b=FcedGkqPcnoxfO Tiq+oARYmtCKq4qq0XdH21rbFyxUrq3wYMRPs3oa2xrBsO10cfQeysiFDU9kCJUeCjoXTsRqcL5jj 1XRM7//vc+EUuvyfi5z6ZMlJMqVmjCmuiOitXPZ5ZP/jKAgxzAVeUs5jKpsQQ0AM69ZparSo9kxCi LLrVbIhIaRPyjAf5dvIo7k8iQ4S7upfYaX7PB/4P5yUobxahuP1sW0rjH0MluKO8+qrmi8WqXF0C9 8SAJ2u+hcmfw9evdBGobTsOKmL3P0pu+wF9JXvdVBCL8MrHwU1laae4ntFon1f9hABCCfPpPG4NsV zUmly/A2uJaiyZw+SQMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXejN-009Jiq-LG; Tue, 05 Oct 2021 07:19:17 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXegc-009INf-VL for linux-arm-kernel@lists.infradead.org; Tue, 05 Oct 2021 07:16:28 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0CF5D61506; Tue, 5 Oct 2021 07:16:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633418186; bh=wjzv8k0WXnMaPW/RlVFkFekmLsB4cBKCsDNrLq6SNcA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QGubCrut5500Ktwyq+S3450T8LFgcUe4hmiuX5Totg4CUwimrk40N6p0KR/I1ltsq Xzk9CDHNtnd/8BopmnJcmq4ZFN323+2JjlfcCQ9H01zSQUZ/eLWd8W5zbPvG7w3uKn Po9qqbGhJLW9JZRqPDUe+Z2xx1LxDees0B4n3YO81R1AN1Rwo209R6SkZK+f/3TmoL 8DA9Bv34kzjviAXSc0Lli+6UGhob3eLx9tqKLoy9dJF/p/wRmKWhrYhlmOZN32s7mB XYkcvxX++fybkKc/wPK+RU9KUpE95y4O6jfpWJaPn1HDS2zSpdq3Ex9FrkTKETt9OI g6mimbM7x4oBg== From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk Cc: Ard Biesheuvel , Arnd Bergmann , Kees Cook , Keith Packard , Linus Walleij Subject: [PATCH v2 9/9] ARM: run softirqs on the per-CPU IRQ stack Date: Tue, 5 Oct 2021 09:15:42 +0200 Message-Id: <20211005071542.3127341-10-ardb@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211005071542.3127341-1-ardb@kernel.org> References: <20211005071542.3127341-1-ardb@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211005_001627_058690_CA9C43A7 X-CRM114-Status: GOOD ( 12.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that we have enabled IRQ stacks, any softIRQs that are handled over the back of a hard IRQ will run from the IRQ stack as well. However, any synchronous softirq processing that happens when re-enabling softIRQs from task context will still execute on that task's stack. So let's wire up the existing infrastructure to run these softIRQs from the IRQ stack as well. Signed-off-by: Ard Biesheuvel --- arch/arm/Kconfig | 2 ++ arch/arm/kernel/irq.c | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a8c1db0736f3..d46b243e1b26 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1166,6 +1166,8 @@ config CURRENT_POINTER_IN_TPIDRURO config IRQSTACKS def_bool y depends on GENERIC_IRQ_MULTI_HANDLER && THREAD_INFO_IN_TASK + select HAVE_IRQ_EXIT_ON_IRQ_STACK + select HAVE_SOFTIRQ_ON_OWN_STACK config ARM_CPU_TOPOLOGY bool "Support cpu topology definition" diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 58af2adb1583..de25e4bfd00c 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -36,11 +36,14 @@ #include #include #include +#include #include #include #include #include +#include "reboot.h" + unsigned long irq_err_count; #ifdef CONFIG_IRQSTACKS @@ -60,6 +63,12 @@ static void __init init_irq_stacks(void) } } +void do_softirq_own_stack(void) +{ + call_with_stack((void *)__do_softirq, NULL, + __this_cpu_read(irq_stack_ptr)); +} + #endif int arch_show_interrupts(struct seq_file *p, int prec) -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel