From patchwork Mon Dec 5 18:25:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 29837 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2409099wrr; Mon, 5 Dec 2022 10:27:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf6OUEZ6rPqX1vafdC2NCBXUrbV7KM0VFOD3VBu2o4AJSU7INJUcOYzgFAl5FFKL4/PrAP+W X-Received: by 2002:aa7:d34b:0:b0:46a:914c:9bc9 with SMTP id m11-20020aa7d34b000000b0046a914c9bc9mr46179125edr.418.1670264853512; Mon, 05 Dec 2022 10:27:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670264853; cv=none; d=google.com; s=arc-20160816; b=sBqf5aUj9ox0AOUC8fWaswUQYd3upUUpotyAwGh3PTx4+diDn6H8w+oxCWv5HTuawO VsaJ8tq6MefVxhggyPvpMhiEUKBIki86VN9HXAb7pyMjf/oC3+401PFo5BM10chhVtNZ dtNHz6GbQW0WbeBkpAvKIUsyfHddi747h4FboRMevJE4yiSdSlA8xCZ3H83Hazr/0iFF Eg6oaaTipLEowq4epEdwCOaCH7lYGObv8Z0+p2tM/hEzO3z5No7iRCbigB3Q1TLvNTKd ErUsEetHtDn1w3GuKUN08/1MoX9urTfxBtlPEvpWPbBSPhuz/kmA+a6oVJ6x+fGYf+5/ StFg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020aa7dc09000000b0045a1dbedd92si178378edu.35.2022.12.05.10.27.08; Mon, 05 Dec 2022 10:27:33 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750422202677276125?= X-GMAIL-MSGID: =?utf-8?q?1751399639308787443?= 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); /**