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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D014C00A5A for ; Tue, 17 Jan 2023 23:09:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229775AbjAQXJQ (ORCPT ); Tue, 17 Jan 2023 18:09:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbjAQXGj (ORCPT ); Tue, 17 Jan 2023 18:06:39 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D25423C1B; Tue, 17 Jan 2023 13:34:09 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673991248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QIUMiMeO37HLXHmh1Ihwd/CfbMCTUhD4A8mHgM2Czpw=; b=TMgeBVYqAtYPEdUD25oT5SMdrISlzChdtJSl+ZUFGSTag87Nb03Fck3z8eBuYfXvTUjUe0 B6C65sFML/MBmgBAaEpJAdOgl7806R+uzAAuiA2fAqWLbz6sDjYJNtgd01nkw5PSm7i2sg hYmuYan8mvZTEtPPuFCztDeUGbj3lpcBwdhog8DEMEM5+zCmQ7ul0j7IanXG8ayKF2EGiY cUAgImO7uposBpaa83UqdfwVTkyr58wVCB9FjQHoLcQLtr2oiDbiMB5uTP4g6LmodGheEU wQY3t8WpjtD0yU5VaJvqnMnivZPROjajdz0RQomk9xo8KO+opoC3mZHCJz4TGA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673991248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QIUMiMeO37HLXHmh1Ihwd/CfbMCTUhD4A8mHgM2Czpw=; b=s+GLdJwkzpwBSI8hb81AMVA4pKM7Xk7hlF4wgMUeQB2lMoApgWmnSBjHnMqfmh1xC4fW+0 PdBLHAuwtwYTpsAQ== To: Johan Hovold , Marc Zyngier Cc: 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, Johan Hovold , Hsin-Yi Wang , Mark-PK Tsai Subject: Re: [PATCH v4 07/19] irqdomain: Look for existing mapping only once In-Reply-To: <20230116135044.14998-8-johan+linaro@kernel.org> References: <20230116135044.14998-1-johan+linaro@kernel.org> <20230116135044.14998-8-johan+linaro@kernel.org> Date: Tue, 17 Jan 2023 22:34:07 +0100 Message-ID: <87wn5kkfqo.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: .... > > +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. Thanks, tglx