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 60897C32793 for ; Wed, 18 Jan 2023 09:27:20 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=qbdRkA9X3N6AYyDFPlp2cePKCd2oFuqU2LZY5yNwqPM=; b=fiu0tKURE9FlRw PnsL94/BW2WXaqDXHzNUpnBOgkeB1Jj12ej5AaRW+u35mS3l8dXdjVl9nUk0NWQsWRIpXWGya4dJQ tmicKKe2COfL9ivT9dTB8GT0uOPCOHKuvzaywYsmBLptFE9RkW/vUP4ZA8MGnsrj1pe7ZfEwLNSe3 Z/38xTnZVnoeAhTp8rDoPCy6GfgX8WWw9YO3mxUBAjBbV7ir8m5j9B0o0Osvxlhs9VNhe+0d1ePkk tk7CeVRWDxG7OisUfQvbrXrnG3/tOvQemGpaMA5i2peFfNysFyKuOJd3YBQjx0rAoT11Vw5j0NoKv ru4BSlGDu2GKO8Tj7xYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI4hk-0006YZ-OQ; Wed, 18 Jan 2023 09:26:00 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI4hg-0006W0-0A for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2023 09:25:57 +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 sin.source.kernel.org (Postfix) with ESMTPS id B4A67CE1BD7; Wed, 18 Jan 2023 09:25:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0287FC433EF; Wed, 18 Jan 2023 09:25:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674033952; bh=KlUPGKsZLEMxW1G8jfwVen6ljbFd7VXHSO70h2nSXKM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JWCyvuyz7uf/Kb7lnxvy3/MFAUTdmCGWdoadgzJguVTIgKQrgNzrjH+MJuTFboAyp DKnAd3xZV0DNSuNHwo3bXRfT8/QYiOKf8g50aZh4fXuYcEwGN8alGYldTcdA/s5wKA V7a7dRDlHxBXxx9mNBV75zXOQi/xCXCQxWoFjFN+2GW0XhupAwAQvGOc/IRW23LMaV ey18YCyqhbhK6mK8fqgjHsJByTfTsTG720rE1ca+YHzZPQg6BxLVdl3/za/yz92Sjs 6bbVc5Dhy7M8u0xXmsbB9ULRXztPf71s1oTUhY4jPeuk5DN6U9ayxq8z+E1D8XvKcH sfuOk7Obu5H8w== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pI4i0-0001fe-Aa; Wed, 18 Jan 2023 10:26:16 +0100 Date: Wed, 18 Jan 2023 10:26:16 +0100 From: Johan Hovold To: Thomas Gleixner Cc: Johan Hovold , Marc Zyngier , x86@kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Hsin-Yi Wang , Mark-PK Tsai Subject: Re: [PATCH v4 07/19] irqdomain: Look for existing mapping only once Message-ID: References: <20230116135044.14998-1-johan+linaro@kernel.org> <20230116135044.14998-8-johan+linaro@kernel.org> <87wn5kkfqo.ffs@tglx> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87wn5kkfqo.ffs@tglx> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230118_012556_278365_439352DE X-CRM114-Status: GOOD ( 23.08 ) 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 Tue, Jan 17, 2023 at 10:34:07PM +0100, Thomas Gleixner wrote: > On Mon, Jan 16 2023 at 14:50, Johan Hovold wrote: > > Avoid looking for an existing mapping twice when creating a new mapping > > using irq_create_fwspec_mapping() by factoring out the actual allocation > > which is shared with irq_create_mapping_affinity(). > > This changelog is incomplete and it took me a while to figure out why > this is before the race fix. > > The point is that you need __irq_create_mapping_affinity() later to fix > the shared mapping race. The double check avoidance is just a nice side > effect. > > So please spell it out and make it clear that this needs to be > backported too, e.g. by adding: > > The split out internal function will be used to fix a shared interrupt > mapping race. This change is therefore tagged with the same fixes tag. > > Fixes: .... Sure. It was originally part of the fix of the race, but I was told to clean up the code first (and not worry about backporting). I'll see what I can do about reordering these again with the aim of making things easier to backport. > > +static unsigned int __irq_create_mapping_affinity(struct irq_domain *domain, > > + irq_hw_number_t hwirq, > > + const struct irq_affinity_desc *affinity) > > Please rename to irq_create_mapping_affinity_locked() so it's clear what > this is about and what the calling convention is. A lockdep assert to > that effect would be nice too. Will do. Johan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel