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=-15.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_SANE_1 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 1BA6CC4361B for ; Thu, 10 Dec 2020 15:09:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 BD16923B45 for ; Thu, 10 Dec 2020 15:09:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD16923B45 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=f/Tq+qP0Db9yFSvzSMgzV4T+4KuwnCeUID9kl2xZkss=; b=TlpqjvLzJpFDkftyW2Bwmj5Sa KbdW5Fq/FD5W8dvhyJ63J9B/vkKUbhhVSyMxMGCq76YpHttAVq30Rhh4eclB+T5bcfCRShoKB1d63 f5/3+H5wq8AI8ly2oDS8K9RT5XRKDpenadrSSVi/aMIzkcvhmdHDuG21QB/n+2zeEtRZOZ+0kL2zj +8d/dJ9C/FRJ+FTB4/ptgLYy0SD3agEgWBopeeG+7UujnXXHJ+rADWRnkncuXmbj1+WBym0FWqo5n TlL4wLkawe7u2jCTpO0t459/OvZt6v+MA6QAhv2OHfgVe+d1q4pKxqpAcqAR9m8TUa4B2KaSdAK+L y/N01XpeA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knNY8-0002LH-Gz; Thu, 10 Dec 2020 15:08:08 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1knNY5-0002K0-2L for linux-arm-kernel@lists.infradead.org; Thu, 10 Dec 2020 15:08:06 +0000 Date: Thu, 10 Dec 2020 15:07:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607612882; bh=KoxOBKWsIg2Wt9l8K5GKIQKzwk5N7dcuEaIEps5LD5c=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=SgclQwK8xnkoZ5Cp6KABImVZgSOO74FBVdF7lcjniKRtgWMDMHJCtE85ifOLeNmZK o9bFiEPXXMD6QMSLicBzKLyXvfenbZe8kpwxX1SyddtcRqjGymF2Hbu9FD/di/gvmF jd3AgmfXG3jE+BqR+7jI2i2cB/U9pkZOSLWpOJ19JVHBEgZGFUOOkXlPa+RPE8z46a 07WlCKgK7tSTx0RqSkf/AtlJ7zC6Dhd+LR7UUqhfFDHfW565QjZ11qgBBW2ACfKhVK txyge2n4wlMDmHWEWKnXROPpAZA0nuauTEn3fd7t6Rg8/N6qC7hj0kZEvG6XRGoNgU q7/8QTPM/oQCg== From: Will Deacon To: Marc Zyngier Subject: Re: [PATCH v2 2/6] genirq: Allow an interrupt to be marked as 'raw' Message-ID: <20201210150756.GA10381@willie-the-truck> References: <20201124141449.572446-1-maz@kernel.org> <20201124141449.572446-3-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201124141449.572446-3-maz@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201210_100805_275685_F7801A54 X-CRM114-Status: GOOD ( 21.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Russell King , Peter Zijlstra , Catalin Marinas , linux-kernel , Thomas Gleixner , Android Kernel Team , Valentin Schneider , LAK 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 Hi Marc, On Tue, Nov 24, 2020 at 02:14:45PM +0000, Marc Zyngier wrote: > Some interrupts (such as the rescheduling IPI) rely on not going through > the irq_enter()/irq_exit() calls. To distinguish such interrupts, add > a new IRQ flag that allows the low-level handling code to sidestep the > enter()/exit() calls. > > Only the architecture code is expected to use this. It will do the wrong > thing on normal interrupts. Note that this is a band-aid until we can > move to some more correct infrastructure (such as kernel/entry/common.c). > > Signed-off-by: Marc Zyngier > --- > include/linux/irq.h | 2 ++ > kernel/irq/Kconfig | 3 +++ > kernel/irq/debugfs.c | 1 + > kernel/irq/irqdesc.c | 17 ++++++++++++----- > kernel/irq/settings.h | 15 +++++++++++++++ > 5 files changed, 33 insertions(+), 5 deletions(-) [...] > diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c > index 1a7723604399..f5beee546a6f 100644 > --- a/kernel/irq/irqdesc.c > +++ b/kernel/irq/irqdesc.c > @@ -667,10 +667,9 @@ int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq, > { > struct pt_regs *old_regs = set_irq_regs(regs); > unsigned int irq = hwirq; > + struct irq_desc *desc; > int ret = 0; > > - irq_enter(); > - > #ifdef CONFIG_IRQ_DOMAIN > if (lookup) > irq = irq_find_mapping(domain, hwirq); > @@ -680,14 +679,22 @@ int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq, > * Some hardware gives randomly wrong interrupts. Rather > * than crashing, do something sensible. > */ > - if (unlikely(!irq || irq >= nr_irqs)) { > + if (unlikely(!irq || irq >= nr_irqs || !(desc = irq_to_desc(irq)))) { > ack_bad_irq(irq); > ret = -EINVAL; > + goto out; > + } > + > + if (IS_ENABLED(CONFIG_ARCH_WANTS_IRQ_RAW) && > + unlikely(irq_settings_is_raw(desc))) { > + generic_handle_irq_desc(desc); Based on tglx's previous comments, I was expecting to see calls to __irq_{enter,exit}_raw() around this. Are they hiding somewhere else or are they not needed? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel