From nobody Thu Sep 18 14:13:59 2025 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 F31ADC4332F for ; Mon, 5 Dec 2022 18:26:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233172AbiLES0K (ORCPT ); Mon, 5 Dec 2022 13:26:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232470AbiLESZQ (ORCPT ); Mon, 5 Dec 2022 13:25:16 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F2C1209BA; Mon, 5 Dec 2022 10:25:16 -0800 (PST) Date: Mon, 05 Dec 2022 18:25:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670264713; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qA5n+d8BiRhw7OKe0U22sQbPdNsWJ3ZdrWQGSL/mb44=; b=dU4QgoSyI+Drh5woiyZGjcEV/wqN8Ww+4Lao/aJLCgN02XyMzAbh1q5Po0kgLBYGZdMzjG q4PTEJfQjGFJJwS8Lz3PMq6FwGhY9YH/GNiWQfL3z3PX8LH7gvHIgy19jP1qmp88WtrHzc XsMDmrELH5Z1GWdm2B689oJc7Bgf4U7Potmx7+qEIHL8pQ9x++RoKv2YzX0hVNb/WLB9II icEwll8nCD8v9X67vxrdQ7Wk82zmA//Tsbk04KfAr+pRIO+W6O22/fnl6/1SI8YSFSC/HC 77Xie0Ym9QsLzgEUfsGSqJn+OrdhfgPOvDuJRISfK5XBwIXK3TiUaMXu9gStFA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670264713; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qA5n+d8BiRhw7OKe0U22sQbPdNsWJ3ZdrWQGSL/mb44=; b=9gTEwBm5QPUTWmeNdtHnhiFqPmJE1yrIJu/C2kNMmiXtzhTWMeZP+ZF6lJl8TDKG1r+0z2 z/rtMg89+U2eTgCw== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] genirq/msi: Provide struct msi_map Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221124232326.326410494@linutronix.de> References: <20221124232326.326410494@linutronix.de> MIME-Version: 1.0 Message-ID: <167026471337.4906.8546664036058937306.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: 055b6b34405d0c064a3dbd2531c8fef60a64e059 Gitweb: https://git.kernel.org/tip/055b6b34405d0c064a3dbd2531c8fef60= a64e059 Author: Thomas Gleixner AuthorDate: Fri, 25 Nov 2022 00:26:13 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Dec 2022 19:21:03 +01:00 genirq/msi: Provide struct msi_map A simple struct to hold a MSI index / Linux interrupt number pair. It will be returned from the dynamic vector allocation function and handed back to the corresponding free() function. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.326410494@linutronix.de --- include/linux/msi_api.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/linux/msi_api.h b/include/linux/msi_api.h index 8640171..4cb7f4c 100644 --- a/include/linux/msi_api.h +++ b/include/linux/msi_api.h @@ -18,6 +18,19 @@ enum msi_domain_ids { MSI_MAX_DEVICE_IRQDOMAINS, }; =20 +/** + * msi_map - Mapping between MSI index and Linux interrupt number + * @index: The MSI index, e.g. slot in the MSI-X table or + * a software managed index if >=3D 0. If negative + * the allocation function failed and it contains + * the error code. + * @virq: The associated Linux interrupt number + */ +struct msi_map { + int index; + int virq; +}; + unsigned int msi_domain_get_virq(struct device *dev, unsigned int domid, u= nsigned int index); =20 /**