From patchwork Mon Dec 5 18:25:21 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: 29874 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2415811wrr; Mon, 5 Dec 2022 10:41:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf6B4+Y2ZDn5IsrWe0qxZinajvqzruezM2cFWZefhRg/cd2nwvMjmDbsalNM+qBC82Jfmn/k X-Received: by 2002:a05:6402:b81:b0:45c:a651:8849 with SMTP id cf1-20020a0564020b8100b0045ca6518849mr5773547edb.209.1670265709492; Mon, 05 Dec 2022 10:41:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670265709; cv=none; d=google.com; s=arc-20160816; b=clMQ9+maMLjJ5DW62TYU0zvWedYamBahezgDiRSVuyYeD+UQeQmjivwe2Iy9rChraf Ih2yd8yvjx2boKQbnCABsAf40N5VYDXcj7CeSZD6//+KaXSeecC2zaaMdKimAbBmmLzX K7P1MtNd6Ne3o9jIckjLmHvw9GA1kQibqmERd2y6smV/o2rKoaaL8vbnZehsu5dG/IQl Uo9V7Dm/eJ9aLBygujXZoLuNz9wmMQkyIQaQTp2E940QMh/8RulfcfB9/mLbrjCfyIdJ K71vor5XGIAcpTmJ+LA3WoXHWI82mDO/Xttr37UzOITxbQ9g2xBhUG2pm+r+vtOTxVMJ W6sw== 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=yMr6lJj85dFwF+XsRzVTAMXhdatSuqiMSV0LfAlYqO8=; b=qz6WI6N7kSO3PMFmwOJ8rCbIQpWsGBd9F3lq7O53SkJJIlSX9+K0ENUOnQzvgyWJeB hDsJxu4P/6HJsHMvV3P54pQm/IjgOG20EqDvRl4tuGIx3V3Pz9EE/toJDgvIZZ5NkoU9 2nl78G/+zD5bb2KsDqQNAhO92ewwsFnYSKMcaHKGHJnFfe5ScseYLEjuoHjBdmHDUgwe EQMziPfxG+QJ/KN+YIq4XK20wPm/LQJxlkxN4AqRLpVDiN1RQOZi9mq6SvIuptoRZX8T OACAkGzc5rguBA6IjGW6+emU1nJ3wGXBRp54tq4YvmON48h39nhJy94d16jxkpmbynYT E+gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="J0u/WusE"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e20-20020a50fb94000000b0046c81f2ef40si162847edq.493.2022.12.05.10.41.26; Mon, 05 Dec 2022 10:41:49 -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="J0u/WusE"; 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 S232851AbiLES3O (ORCPT + 99 others); Mon, 5 Dec 2022 13:29:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232664AbiLESZY (ORCPT ); Mon, 5 Dec 2022 13:25:24 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C689205E8; Mon, 5 Dec 2022 10:25:23 -0800 (PST) Date: Mon, 05 Dec 2022 18:25:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670264722; 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=yMr6lJj85dFwF+XsRzVTAMXhdatSuqiMSV0LfAlYqO8=; b=J0u/WusEN7Y5abj6+x/RiYBGgDo9kWaYCGH8ccca4718LOsQ489/HcMBHugY/msoNysBI/ QrpQODbf3Zngn4ENH4yJW7oJFBUR+YXdMVdNa8UqJMesmmMDdooVTYkIyz6tCQT0CDpZU4 L+7G2p3DuLTOnlCYbMAzmBEW91J0XNnNSMUXTl+EEYMIRBqCqQjSftB61oRzTz5Q/spZt+ OgTKUGq5knidsufL7BWnQdHO3syLcg3EvUb6uRNpZ0FHdN0/P7HArYtK7MkG0/O19Dfg4f MCZO6iDXGRC9tG3x8/OoIi+dIOiCGkoAIxxEtQN7CQ7Z3sMiSpcmcvqW7ZsniQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670264722; 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=yMr6lJj85dFwF+XsRzVTAMXhdatSuqiMSV0LfAlYqO8=; b=Zn5h/DY+f3FTn2PGt80upuuTsfW7ebFv3YB2kL46pMCLBQj+ce/ojRk4wxm/HKFccBX52i MXXDn02E7r02ZOAA== 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: Create msi_api.h Cc: Thomas Gleixner , Jason Gunthorpe , Kevin Tian , Marc Zyngier , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221124230313.632679220@linutronix.de> References: <20221124230313.632679220@linutronix.de> MIME-Version: 1.0 Message-ID: <167026472167.4906.6600096750077977681.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?1750421799651326869?= X-GMAIL-MSGID: =?utf-8?q?1751400536488165286?= The following commit has been merged into the irq/core branch of tip: Commit-ID: 6b6941f6653ec8017e3822b55bb9eae245f0ed99 Gitweb: https://git.kernel.org/tip/6b6941f6653ec8017e3822b55bb9eae245f0ed99 Author: Thomas Gleixner AuthorDate: Fri, 25 Nov 2022 00:24:14 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Dec 2022 19:20:58 +01:00 genirq/msi: Create msi_api.h Create a API header for MSI specific functions which are relevant to device drivers. Signed-off-by: Thomas Gleixner Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124230313.632679220@linutronix.de --- include/linux/msi.h | 6 ++++-- include/linux/msi_api.h | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 include/linux/msi_api.h diff --git a/include/linux/msi.h b/include/linux/msi.h index 2d87e00..9f72494 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -13,11 +13,14 @@ * * Regular device drivers have no business with any of these functions and * especially storing MSI descriptor pointers in random code is considered - * abuse. The only function which is relevant for drivers is msi_get_virq(). + * abuse. + * + * Device driver relevant functions are available in */ #include #include +#include #include #include #include @@ -188,7 +191,6 @@ struct msi_device_data { int msi_setup_device_data(struct device *dev); -unsigned int msi_get_virq(struct device *dev, unsigned int index); void msi_lock_descs(struct device *dev); void msi_unlock_descs(struct device *dev); diff --git a/include/linux/msi_api.h b/include/linux/msi_api.h new file mode 100644 index 0000000..57d27cf --- /dev/null +++ b/include/linux/msi_api.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef LINUX_MSI_API_H +#define LINUX_MSI_API_H + +/* + * APIs which are relevant for device driver code for allocating and + * freeing MSI interrupts and querying the associations between + * hardware/software MSI indices and the Linux interrupt number. + */ + +struct device; + +unsigned int msi_get_virq(struct device *dev, unsigned int index); + +#endif