Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3852496pxb; Mon, 4 Oct 2021 11:01:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBPMfxuQBXhF62BLfG8MFzlrBzTS/DYyhMU3gi4DuLrER5Sfn6cUDCAT+LQQZXK12uPSfl X-Received: by 2002:a05:6402:16d8:: with SMTP id r24mr19443024edx.47.1633370467527; Mon, 04 Oct 2021 11:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633370467; cv=none; d=google.com; s=arc-20160816; b=sAMSaPkMYSkydEh+GWkQPvxor0eMblv7N7CSdplABdJuPy27z+w6VIHa8AFHaIw4NK zNrhWDj7DzuhawX+viUTzNzqyipWsabM5YrHfZl3owQIu3zmj9xmL6okPKpSj7fYnwjl L01pD3AlN4a7T3a3wmFxbJZhrj4qsaQrRYPTL0JqLSSxD5BqimUhigUBk9YWaupozd+m IWS+z7LcyWyhki0Upfd3ojf2ECocpKOq/Syh8Ge6n5kAy8ZrzDm8AfXiHcWfNNekBsDI D6w2KXX+Jhhu4PUn8nbOKyvuq8WYLa99iCfrFnfQ9XTb5+bfpb6z/h9i4vByUoXL6BJw C7ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=wIPIcfUNqGVL0TJ6LFEwKdvlE8AugEGOJOOyHs2nuHM=; b=rwbSHYrXj9KgOdie4ldyHhMp/2hKK8eLN4j64jY8TrH7Fzci7j/XA58pVJbmB8d+/R 5ZlOlh0N0FzhT6+vL5kR4ZHCG2Ezj4XkX4BP7vpnVr2M4c758KIQ22fS01fE9ME5OC+U 9lhqIi4bqpcs4J8FQlqsNd8oN07MaCsq3tnYWdpkkZ5fUOl5gbHNzuUg5U2sES1vw6Zi NfoyxdwQiUR9YWBBjpufGvaRKVzX3qnJVoyCZGPOORhQ6BTHDAYdc8WgmxpqVCQQVRDt eIbExMqyltQ6NvQLpMZv+hWps3aX0NX1eUub9kx2KnQyecHVbor0iJoww8fdVqOL547t SyVQ== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si26015922edm.533.2021.10.04.11.00.39; Mon, 04 Oct 2021 11:01:07 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237044AbhJDQcS (ORCPT + 99 others); Mon, 4 Oct 2021 12:32:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:48588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237047AbhJDQcR (ORCPT ); Mon, 4 Oct 2021 12:32:17 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D670B61184; Mon, 4 Oct 2021 16:30:28 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mXQrC-00EgMR-L0; Mon, 04 Oct 2021 17:30:26 +0100 Date: Mon, 04 Oct 2021 17:30:26 +0100 Message-ID: <87wnmsrbvh.wl-maz@kernel.org> From: Marc Zyngier To: Pingfan Liu Cc: linux-arm-kernel@lists.infradead.org, Mark Rutland , "Paul E. McKenney" , Catalin Marinas , Will Deacon , Joey Gouly , Sami Tolvanen , Julien Thierry , Thomas Gleixner , Yuichi Ito , linux-kernel@vger.kernel.org Subject: Re: [PATCHv4 1/3] kernel/irq: make irq_{enter,exit}() in handle_domain_irq() arch optional In-Reply-To: <20211001144406.7719-2-kernelfans@gmail.com> References: <20211001144406.7719-1-kernelfans@gmail.com> <20211001144406.7719-2-kernelfans@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kernelfans@gmail.com, linux-arm-kernel@lists.infradead.org, mark.rutland@arm.com, paulmck@kernel.org, catalin.marinas@arm.com, will@kernel.org, joey.gouly@arm.com, samitolvanen@google.com, julien.thierry@arm.com, tglx@linutronix.de, ito-yuichi@fujitsu.com, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 01 Oct 2021 15:44:04 +0100, Pingfan Liu wrote: > > When an IRQ is taken, some accounting needs to be performed to enter and > exit IRQ context around the IRQ handler. Historically arch code would > leave this to the irqchip or core IRQ code, but these days we want this > to happen in exception entry code, and architectures such as arm64 do > this. > > Currently handle_domain_irq() performs this entry/exit accounting, and > if used on an architecture where the entry code also does this, the > entry/exit accounting will be performed twice per IRQ. This is > problematic as core RCU code such as rcu_is_cpu_rrupt_from_idle() > depends on this happening once per IRQ, and will not detect quescent > periods correctly, leading to stall warnings. > > As irqchip drivers which use handle_domain_irq() need to work on > architectures with or without their own entry/exit accounting, this > patch makes handle_domain_irq() conditionally perform the entry > accounting depending on a new HAVE_ARCH_IRQENTRY Kconfig symbol that > architectures can select if they perform this entry accounting > themselves. > > For architectures which do not select the symbol. there should be no > functional change as a result of this patch. > > Signed-off-by: Pingfan Liu > Reviewed-by: Mark Rutland > Cc: "Paul E. McKenney" > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Marc Zyngier > Cc: Joey Gouly > Cc: Sami Tolvanen > Cc: Julien Thierry > Cc: Thomas Gleixner > Cc: Yuichi Ito > Cc: linux-kernel@vger.kernel.org > To: linux-arm-kernel@lists.infradead.org Reviewed-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.