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 9F8DFC3DA78 for ; Tue, 17 Jan 2023 21:35:22 +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:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=m9SaMjBIskxg2zjedjXyiRvXxubN5COjnBf74a7/WtY=; b=I8dVHd5OGPtXVI LIhbdV9ne4cFUn41RzswTfw5RjcTVY2pr+woj87EeiMPIQ9hEgmfcJnho/DNaJ8tx1v/gXfmc/gfJ RyMrlKJrCGBqP4BJVjz+iXI1LPy1aSb8u6+MciKtK5Tde/xnlmF4V+QQa/bIBZVL2R6PlyEYlvZ1k SxujM+emCdalrWH8UafXpk7BVsphRhh7FfToHOHq9kr7RmAgCGTJU/Kdn8n26qqukY2ryHNvYMNQa 6KHfCKAZrJQTvFZ4R8OFfbO6fMXBH8zB3tbA84uc0NVL4hJsYw0lvv+zA10UN/beihRJwGtP9oHd6 ixCxRd1sufB36X71jqLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHtav-00FyS8-Ml; Tue, 17 Jan 2023 21:34:13 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHtas-00FyRN-24 for linux-arm-kernel@lists.infradead.org; Tue, 17 Jan 2023 21:34:11 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230117_133410_264383_704D60E6 X-CRM114-Status: GOOD ( 11.53 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel