Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6411272rwb; Mon, 5 Dec 2022 11:58:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf4tNHH8Hcv8bLSdgw5W/LHdsw7D+8dkoqLq5G59LujL/9pySUE9cyd1zbjo2ePu2ii8csMU X-Received: by 2002:a50:fe8d:0:b0:461:9183:834b with SMTP id d13-20020a50fe8d000000b004619183834bmr60122835edt.196.1670270326574; Mon, 05 Dec 2022 11:58:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670270326; cv=none; d=google.com; s=arc-20160816; b=tZjHlA5JS4HTd3tQj8eqfL8yrsJa24ZeUHLNdo/fQ1LHRbMKuHvA/6jJaDl4eSHRcb r34RGfwpFaNe3yKwKn2jC32QXo7RpP2siHdE6Y+0GzwtMwJCK60v6a7fT0+/JCaMhj9W 7KnQmbPgW8PTB9JPipcv9LJHeEg9UrBBbORXrjbSLoA+DSYnXsuBSDSbjCyqbmzOHwPY xNNkCU5VVCDWy5w7TpXuO2xdy7dCZGreNKfe/Bd//oBjOboiUHCeZblq83ORyd9g4xwy k2FyjZwyoyu0Zi70Txsw9E+hXLy9D/usrS3nqqZB476Y8LpL/rW2kabhVny98QV51beq rXhQ== 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=qA5n+d8BiRhw7OKe0U22sQbPdNsWJ3ZdrWQGSL/mb44=; b=liGTcJLmHPKrZ5vLVt4043GbWozatgvcMQTm/8mNgvbghCY8uPsO8ojUzboLRi4UVa KJ8Wyx7xJdeC4bm+q9ARzHu41a4cl0rJhQ89H/3PP/4XP5NS/KK8ddT/cyPGDhnbjq3f AmWLfK2slvmnKIdd7qqtOmlMKVzC0E381UX/ZKGbqEEdPoVta4+yH8Ivs5G+OgV8shN7 Tlxc4BC828tJKsH2vijslSUU/Ermskt1y9/aRA6+QtiFaQvSwMHkN8bDH+fRh/Uw3Fx+ a+UK9RN9b6IxaQSYas21OBEDdmgcKQhBAFKUEbNBdiK19GJkg56BcORhlNS/wOVEG7sy gjYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=dU4QgoSy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 o21-20020aa7d3d5000000b00469047efecbsi287874edr.62.2022.12.05.11.58.27; Mon, 05 Dec 2022 11:58:46 -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=dU4QgoSy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S233169AbiLES0I (ORCPT + 81 others); Mon, 5 Dec 2022 13:26:08 -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: 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: 055b6b34405d0c064a3dbd2531c8fef60a64e059 Gitweb: https://git.kernel.org/tip/055b6b34405d0c064a3dbd2531c8fef60a64e059 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, }; +/** + * 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); /**