Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp9590188rwb; Thu, 24 Nov 2022 15:38:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf7V7hkoyZ08bMBVJTPIAl+bwoIf2G6xnifbFr20h8k3php6WWlufMFWUc3k/k7TMWUqpAAB X-Received: by 2002:a05:6402:2992:b0:460:12ef:cc45 with SMTP id eq18-20020a056402299200b0046012efcc45mr32055754edb.249.1669333104683; Thu, 24 Nov 2022 15:38:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669333104; cv=none; d=google.com; s=arc-20160816; b=FE9D+K60njUGZoEtrkOkkwgAghbVXGLG0/NE0xaE5wP1RH2y4XJh5UYcsEP58OQq16 wawCDIJc0A3Kar/ipnhfJOKljmzRcEHB5gSlONvZ0ZsujtPWfNjCKN3hxl7r79RL5f1d LAbtK+LXAfXcrpkX0bcvA3VkEXh2Ytf5vzD45gcohZhZ6bB535wHR8roOXId/Ob1jibd VLFxW3r8n9QD43YqsXx7OrEeSBlnJUOgtRRjaNmq8u9o+oH7VH1Mf9edIQzXnHaCfDOt TOUzxostWL1mEyLArw40yAGPOr9ktcZVvDCoHUXKhSM4SwYttFvwUEIGvPq/rsMr4cJg JjSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=cFx6dbaS3ynUGuWTq2v8hXwBFa/HBDy+17s0E2mkPoM=; b=efk6n75d/Rc0QiA5tv0jAldAci3TRRHro4j6RbanMl/chjRRxRqQzupYZFbRIplD6e mL4AhtH9hvv2vwf05EhxQmNxXkT66gGkPmOx1V9DfcNIm3SqM3eLhv3oTTK8MuI0WjNn Rehynmn9UL8dGJRX2zFh09PbH3uKyBfB+sxcFj5VfFFmiCDVaG+dtI5skHrN/OOYmeRp ivS+A7pRIwtdJvMVZvnZs9a8duncx9gHQXbmuRq85tsNNytAZBZkyEcrhRMYjQNV2Rzh GV1R1iHBQ/n1Fj4t0Zoa9cibbsP3HfRbFlfISZJLiBJmccT9+9uVi7ATdAhZK5Z5uBzB lfdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=31K5q8uM; 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 xf4-20020a17090731c400b0078b96722000si1915818ejb.608.2022.11.24.15.38.00; Thu, 24 Nov 2022 15:38:24 -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=31K5q8uM; 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 S229711AbiKXX2w (ORCPT + 88 others); Thu, 24 Nov 2022 18:28:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229899AbiKXX2f (ORCPT ); Thu, 24 Nov 2022 18:28:35 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60ACDBFF64; Thu, 24 Nov 2022 15:26:54 -0800 (PST) Message-ID: <20221124232326.326410494@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669332374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=cFx6dbaS3ynUGuWTq2v8hXwBFa/HBDy+17s0E2mkPoM=; b=31K5q8uMuBncINZnLxPkhytuZEEXrW9lk0LdW6v3qDdvlw2PUjFKemzgH5YU8uEMr6zOCz mQQgK/1O//+uOU9hKmvMuo3lRgaisQFZC/qyQVHnfUZA7nhR0aUxf2n5GdcJuRqlOa8Pzx HzF+S8MFzbZnZp4F7vket2pvkCZxlRcwHQDn9ENI9xi7hLjgL5rfXBKJz0qqVoffFhPYYH BeJVbFixw9uMF+IYOEhAk5da3hIkuoXvEICPY/q2cQGRG4SLuDRAervbnrlziMQ+8/1jfc KanIfjMThPO9/ciqXi7uVCWKveu2lzPaw+wKZ3rJxOTj/k6blJN8C3TWSpLf/Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669332374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=cFx6dbaS3ynUGuWTq2v8hXwBFa/HBDy+17s0E2mkPoM=; b=kicHVkBwhMOxAjBHtI5ZkgE0oos+EEIN5rtJ/aaOwuNNNa3ML2NdxyuZ+k0klKqWjbRLZd t0xNj4Vu7AN/BdAw== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Joerg Roedel , Will Deacon , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Marc Zyngier , Greg Kroah-Hartman , Jason Gunthorpe , Dave Jiang , Alex Williamson , Kevin Tian , Dan Williams , Logan Gunthorpe , Ashok Raj , Jon Mason , Allen Hubbe Subject: [patch V3 18/33] genirq/msi: Provide struct msi_map References: <20221124230505.073418677@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Fri, 25 Nov 2022 00:26:13 +0100 (CET) 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 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 --- include/linux/msi_api.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) --- 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); /**