Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp433029pxb; Mon, 25 Oct 2021 11:05:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6m4Hwf2dDgwzwLROemiU3FGAgzUcU7G4kbanzuGHqDFY5YonN4yCbFQkJYeoHxXwMdSVo X-Received: by 2002:a17:907:a089:: with SMTP id hu9mr18354777ejc.70.1635185156997; Mon, 25 Oct 2021 11:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635185156; cv=none; d=google.com; s=arc-20160816; b=0p593cT4Y1b9CSwYIarK2eluzjAoPhgeuhEQwuea5HKizWtz9xcQXlz0MtXRtVgsLy BDI9QVJzRW5aFNNhUs+7LPWiPswGThM7PgomqHycbS06PuI2dWWDLTFLvQHWasIkueAk DTW3K3IZnoG1bMTXkcyYIL3Wti90TVg+g8ojoq3XeHvlt57lfIp3n4dAQEs3LHguJFWw GcQ0NDXrQFgiXDlFTUYPJ11y3WDssaRlee+CIoOnol3h2oUzgiTDX+zx57iL1wFZx/rm sL4GtwbJEZTvlioHfHf9bA6IbeZtzX+SCUvSZPnZs6DBlaa34voz2Sv9ueY8jutLbOOj TTIg== 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; bh=r02GkpWkgfFU9yVWwARuTGBhrWm/6MMpGk2pRViPfpc=; b=lX+MQWqM0zAspPsW1CU5oKkk1EPCs9NzQVw6nhlYPBCDB43LUBj63rJAn+yd4b90dw psB/sNTlFFo0vUlOiYzCpMz4Ub5LkDRY0yXfRDUYj3A4qVLQIB7FCk6jCIJIi9OvXFmp iIb9GBuDwCEu1i7Ehu0ThqL0PFA/GzYUORpWaiv53SIWslnCPIKQ6N2JWiXv+IK+qAWp 4tlZyX5jlWowMk+mtdIGpul15Oup73sfPbfa0CKeDWyYa4g5PYOElYFfVAmrcxpjcUpO AZZzLzClSApbRpLBmKl/5iH3IGtOsGxTruvilwPWFHHNODBx9m0QeeXitzwIJh+4xuW4 w+JQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si25932446ejl.25.2021.10.25.11.05.32; Mon, 25 Oct 2021 11:05:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233746AbhJYSDN (ORCPT + 99 others); Mon, 25 Oct 2021 14:03:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:48696 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234047AbhJYSDK (ORCPT ); Mon, 25 Oct 2021 14:03:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EE4E361002; Mon, 25 Oct 2021 18:00:43 +0000 (UTC) Date: Mon, 25 Oct 2021 19:00:40 +0100 From: Catalin Marinas To: Mark Rutland Cc: linux-kernel@vger.kernel.org, aou@eecs.berkeley.edu, deanbo422@gmail.com, green.hu@gmail.com, guoren@kernel.org, jonas@southpole.se, kernelfans@gmail.com, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, maz@kernel.org, nickhu@andestech.com, palmer@dabbelt.com, paulmck@kernel.org, paul.walmsley@sifive.com, peterz@infradead.org, shorne@gmail.com, stefan.kristiansson@saunalahti.fi, tglx@linutronix.de, torvalds@linux-foundation.org, tsbogend@alpha.franken.de, vgupta@kernel.org, will@kernel.org Subject: Re: [PATCH 10/15] irq: arm64: perform irqentry in entry code Message-ID: References: <20211021180236.37428-1-mark.rutland@arm.com> <20211021180236.37428-11-mark.rutland@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211021180236.37428-11-mark.rutland@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 21, 2021 at 07:02:31PM +0100, Mark Rutland wrote: > In preparation for removing HANDLE_DOMAIN_IRQ_IRQENTRY, have arch/arm64 > perform all the irqentry accounting in its entry code. > > As arch/arm64 already performs portions of the irqentry logic in > enter_from_kernel_mode() and exit_to_kernel_mode(), including > rcu_irq_{enter,exit}(), the only additional calls that need to be made > are to irq_{enter,exit}_rcu(). Removing the calls to > rcu_irq_{enter,exit}() from handle_domain_irq() ensures that we inform > RCU once per IRQ entry and will correctly identify quiescent periods. > > Since we should not call irq_{enter,exit}_rcu() when entering a > pseudo-NMI, el1_interrupt() is reworked to have separate __el1_irq() and > __el1_pnmi() paths for regular IRQ and psuedo-NMI entry, with > irq_{enter,exit}_irq() only called for the former. > > In preparation for removing HANDLE_DOMAIN_IRQ, the irq regs are managed > in do_interrupt_handler() for both regular IRQ and pseudo-NMI. This is > currently redundant, but not harmful. > > For clarity the preemption logic is moved into __el1_irq(). We should > never preempt within a pseudo-NMI, and arm64_enter_nmi() already > enforces this by incrementing the preempt_count, but it's clearer if we > never invoke the preemption logic when entering a pseudo-NMI. > > Signed-off-by: Mark Rutland > Cc: Catalin Marinas > Cc: Marc Zyngier > Cc: Thomas Gleixner > Cc: Will Deacon Acked-by: Catalin Marinas