Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6528313rwb; Mon, 5 Dec 2022 13:46:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Gzmv7PQLznWBz92Zncg+V5tXINf7qgvfNayBiozNbJCBaBJw1ckSYeD+l1rR6AkbpaRDb X-Received: by 2002:a05:6402:559:b0:46c:94ff:76dc with SMTP id i25-20020a056402055900b0046c94ff76dcmr2234496edx.158.1670276768117; Mon, 05 Dec 2022 13:46:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670276768; cv=none; d=google.com; s=arc-20160816; b=Dmz/SWofmGqAixBkanuVk7VD+Qzs1ctnAA7yHww8Ma3eYOKxedKNsqriKaY9PIWuv0 JvM98zR+WyWj+k+gWPnAihp9Qa3IiHZFl3oF4wnKdL1roLU9OVIV/MriwR+r4a/veDCa OtafTktsz0my170OFiIrl6SYtX8/GGIiBR9QWP32A5pWy7D6C4sRd6qMEkP4DKa+Yusb wjK0TVW9vS5OHsf1bNHSTzXayn/EXaUpTHN+KSASqMVizG+KiirkHf6YzXB5IVo+9TGy 6/t4RTSZ4vPaWjNspvMoWrFtkR/5AeMAG3fUul+sJo7gpjTqQ7Q1pdCJx12Z/0vOAto4 6TCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=MoOu6qLojYFUZbCcsdiLeS1LpsKLhL+iTJw++hZkR+Y=; b=tG7/B0cyl8YlU1+WtGpAr0k6WQN6TYv/5dANdHmX+MjcPPVDJaC9R0gmXZ0HCyN5C9 KK0ysUm84pmOLUknha2uQ/6S1/FVIYyqP9Ex2X67UDmEIu4yag7TuwYXbugB6m87m/xv Uie/Em0ghyERrqSZZDt2RVMLp2IuxAKlPsTop12xhkTCNc54zojyHKp5AHdz9272dCro DfWcp6gi+KYEgA7Kxa7d2k6gB5un689XLpfrVOLzXCwzKefcUpWAX0oQmD+H2SSPqHo0 BU7gbLI6puhoHz/gpYim3QdcyK4tOIWdoIodZ5hmtJyxTBJm3Ct/spxwlWawSe79XryF yycg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Zh4BKbQO; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb36-20020a1709071ca400b007c10638840asi816817ejc.75.2022.12.05.13.45.48; Mon, 05 Dec 2022 13:46:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Zh4BKbQO; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234090AbiLEVnH (ORCPT + 81 others); Mon, 5 Dec 2022 16:43:07 -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: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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/06bff9e347271566e8dd79e7c3eb971660209a00 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, }; +/** + * 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 >= 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, unsigned int index); /**