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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 41EE2C433F5 for ; Sun, 12 Dec 2021 18:28:24 +0000 (UTC) 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: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BJVPkQJHojZSzrQDepNZbxBAajXi+znd9sEdJAYlr2k=; b=xWbRpkUiGvz9j3 O17Sh4PMl73sRPm7OHznfbKvOH/Fwi2gtVGdvCJ9IbvyakEyi6mBvqzAOFgZWherFofWfSO5rCDpl 4j7/GqbnlfTmGxcQSeYKLW72JtZkyN1/xnFef+0uBTg/TX4QhOtNzaHB4TtF15EpscTjcPYPjkaOD eFvNwLzve0GCd0eeFmV1EBTwHHpYibUIGj0u8kVJ0d3dKzBVbgNcJPGvkizVfXbrCzx3rbvN8JzxI CmW3vR3iXKFY3B246s7gbxHYgigjpJNaA2Xu0AVb8zIep7hh00oIM4ygxHV0KKy7DlABhqX8jh2iG 8mXy5APV/8rA4j4B5IoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwTYz-006yOi-IA; Sun, 12 Dec 2021 18:27:09 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwTYv-006yNF-9L for linux-arm-kernel@lists.infradead.org; Sun, 12 Dec 2021 18:27:06 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CAF74B80D67; Sun, 12 Dec 2021 18:27:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 847C1C341C5; Sun, 12 Dec 2021 18:27:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1639333622; bh=1TOd/jHw/jPuDh743v2ULnEScRfPDeqdoIKwJGc3M/g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=I1eYw+DVhzcRCLdO/+X05wG3POgkpF06K+2YsLOFxMbAD8Q2c/9AUEnDJZnMXfHUU 4nyszJ/zJLDdLK2a4x9dvoXbKZGfBS8aeuEGq9XLOgCOj6RBmnts6DmZG9TM0/VJJH W1d5ipxii2/KYIVIlTlOeJYvmTAedD8VowqxpThg3AOn6oBTBt94fE/cO551F/s8z6 aSz4byKSXgAOctiznB4dvZoDa4OTvb82U2BxkK3RdJ6uzOv61ZJgELNMepfH8FvOEF FQNz1CFZ9WdSFVijj3nmXZkUIpYEG2m75bGZFqTXjJoAMQrP9+3RCcPScRQy5MFJqR o2OTgI8q3Maxg== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.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 1mwTYp-00BcwC-Bg; Sun, 12 Dec 2021 18:26:59 +0000 Date: Sun, 12 Dec 2021 18:26:58 +0000 Message-ID: <87pmq1u1al.wl-maz@kernel.org> From: Marc Zyngier To: Hector Martin Cc: Thomas Gleixner , Rob Herring , Sven Peter , Alyssa Rosenzweig , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 4/6] irqchip/apple-aic: Dynamically compute register offsets In-Reply-To: <20211209043249.65474-5-marcan@marcan.st> References: <20211209043249.65474-1-marcan@marcan.st> <20211209043249.65474-5-marcan@marcan.st> 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") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: marcan@marcan.st, tglx@linutronix.de, robh+dt@kernel.org, sven@svenpeter.dev, alyssa@rosenzweig.io, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211212_102705_512680_B00A65C8 X-CRM114-Status: GOOD ( 19.18 ) 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 On Thu, 09 Dec 2021 04:32:47 +0000, Hector Martin wrote: > > This allows us to support AIC variants with different numbers of IRQs > based on capability registers. > > Signed-off-by: Hector Martin > --- > drivers/irqchip/irq-apple-aic.c | 73 +++++++++++++++++++++++++-------- > 1 file changed, 56 insertions(+), 17 deletions(-) > > diff --git a/drivers/irqchip/irq-apple-aic.c b/drivers/irqchip/irq-apple-aic.c > index 572d1af175fc..d03caed51d56 100644 > --- a/drivers/irqchip/irq-apple-aic.c > +++ b/drivers/irqchip/irq-apple-aic.c > @@ -312,12 +326,15 @@ static int aic_irq_set_affinity(struct irq_data *d, > struct aic_irq_chip *ic = irq_data_get_irq_chip_data(d); > int cpu; > > + if (!ic->info.target_cpu) > + return -EINVAL; Can this even happen? And if it did, this should scream loudly, shouldn't it? M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel