From nobody Thu Sep 18 14:09:39 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 D0EC2C4708C for ; Mon, 5 Dec 2022 21:43:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234099AbiLEVnJ (ORCPT ); Mon, 5 Dec 2022 16:43:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233811AbiLEVlx (ORCPT ); Mon, 5 Dec 2022 16:41:53 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58DCA2CDDD; Mon, 5 Dec 2022 13:41:52 -0800 (PST) Date: Mon, 05 Dec 2022 21:41:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670276508; 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=MoOu6qLojYFUZbCcsdiLeS1LpsKLhL+iTJw++hZkR+Y=; b=Zh4BKbQOlsFtoHRfzazIxMbPnMG2qehssEInaEhbSoT4whuw6Gdtopq83SFb9SLqGpgQvc dPGoUY+P/Im8eHskUE3+SK0qopJZiVhIn9fM1B52A75X8Dpcnd5nldkDm2l45ej5PUZ7JD tEB4SZG0wFDuibG+pSTTqmauV8y5HEmdsrCIZrCCKiqy7inoiCpP5vLi/ppNdwtYUILeNf ugzJIEhYgz0af0F9I4JLsuQL5KB508Qrn0OMTKjV2mPGjT3Z5/7UY+HnZYj/i27U0a9fz0 vnfsCCARDd7M2x57h5yfsAPPNRF5dM7DvZrZkebuudZSti78gVg9p7Vv/X1++g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670276508; 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=MoOu6qLojYFUZbCcsdiLeS1LpsKLhL+iTJw++hZkR+Y=; b=Yu0W54ywy5hDZnG0TyF2DanMpUu7m7r/Gk5L/2roMfPymDt+ygKkZw9aMr4rKYzvYy+B3B sfffmirbZne+/hCA== 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: <167027650855.4906.16905481322264960950.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: 06bff9e347271566e8dd79e7c3eb971660209a00 Gitweb: https://git.kernel.org/tip/06bff9e347271566e8dd79e7c3eb97166= 0209a00 Author: Thomas Gleixner AuthorDate: Fri, 25 Nov 2022 00:26:13 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Dec 2022 22:22:33 +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 /**