From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A763C433F5 for ; Tue, 21 Sep 2021 09:59:19 +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 DAAA66109E for ; Tue, 21 Sep 2021 09:59:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DAAA66109E 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=qyo20+UYfqmtZzbI14qkRLE2I7MUDRBMMsu+JOCeI/k=; b=wCDxHPb6Lr3j0x 0K+DV6iHxo/MYEpR41jQrqwoj7s01p2NhOJlkP5fRsfkF0WjtxvMVyiFm0d9CrS4r+KUU9RbDUuln UUkEMRL0c8I48oMCkr8hrXO3jN5fqyAeOGguxRPqYKJEQQyKBQ3ERvE2NatwTppnFzyserWIydY2I 60UfSqECWzcXQaEvJQ1P3yIWL6DjHHUS5pSQd3I6ttkFOvkNTgIQpS2OKhOB8On32NUdOGteYU5WR 8huptAhvVXFmZ17dMtwgbCaK/PfZOpgilMENW+kSxOcaqkyIwaQ8QTunOlXZQdouA3DntNeCD+BQl XGN+QhAKD5QT0ZUtjWig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mScWl-0046aN-6C; Tue, 21 Sep 2021 09:57:28 +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 1mScU1-00455U-Vo for linux-arm-kernel@lists.infradead.org; Tue, 21 Sep 2021 09:54:39 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id EB5D861100; Tue, 21 Sep 2021 09:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632218077; bh=Ti5JaT72349JlvoBYNVO27umhrjRjMOwLbYkb4KniXY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cNEeubfI5XLJYhMQoBFvm6w9pfCd8t2MhIbitMU1zv3XcMaDqytWNBhdo40TkbBeV qpxQ4Y7cNUutxzX7IK1Oa/HS+HeFQSsYWa7NuifOVpSVVDDCQmPeUsiQKq/rssrD+v VcKmnbuEXTyrbWp/K23i4Ya2pnUObLVCYXtN/dU9gFaaDIZnAd3oqM038bS+a4OumC ivCQun9LFPmZVpUBvk2Kk2wdG/0G/1m4EiijNMKssjiKtCtTIpXnaSDk8onZLUp1jP IDlJVhE/bdsAYuIwr7MvR3sNVMvVaM9W0nvwnHhq1/aTJn3Vg5klRx77UyUpDRqP6e tpyOjUXy7uRnQ== From: Ard Biesheuvel To: linux@armlinux.org.uk Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Arnd Bergmann , Kees Cook , Keith Packard , Linus Walleij Subject: [PATCH 10/10] ARM: run softirqs on the per-CPU IRQ stack Date: Tue, 21 Sep 2021 11:54:08 +0200 Message-Id: <20210921095408.133210-11-ardb@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210921095408.133210-1-ardb@kernel.org> References: <20210921095408.133210-1-ardb@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210921_025438_086792_05AD2DB5 X-CRM114-Status: GOOD ( 13.13 ) 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 | 8 ++++++++ 2 files changed, 10 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..feb07f703a98 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -41,6 +41,8 @@ #include #include +#include "reboot.h" + unsigned long irq_err_count; #ifdef CONFIG_IRQSTACKS @@ -60,6 +62,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