From patchwork Mon Nov 21 14:40:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 23877 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1646425wrr; Mon, 21 Nov 2022 07:11:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf6KYj6YIy8ilEHMrsVzjvWeps08sL5qu9IZIBcxfqWWC58rs31QttA2SitFUdn+Ifgg2fmf X-Received: by 2002:a63:fd08:0:b0:46f:ed91:6664 with SMTP id d8-20020a63fd08000000b0046fed916664mr18045044pgh.558.1669043517754; Mon, 21 Nov 2022 07:11:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669043517; cv=none; d=google.com; s=arc-20160816; b=egKmCiCestUlzHn8+T5AtWMXGaob4zzQJBPlbbln5giEo5i4jjST+siJtNbGKpwu8p Fbcwbp1j1PP+I6RiDEGMI17x+4oJ+TCeI06v6+6LSX56Pkls124VaNVdEH7JD3AwphpT NwHgbkS5zMROj79fSqI3BRMJZno78uuyZPFSlGOxLaPyupsJR3WtG/bYNyj/+qfF8/Yl xtsr4/mi2EVSHYceHOTjAHT8G2zZzWC5C+boHpAhrnHDJyUqIzlJMBKfbJIG1BvqJoh/ PPOkBuMJtel0ZMocz/htZYL9+kSxfGLcVMC+M/GQO5LOzq9LxzPsvMr6HwsR8RWTFxt9 VfUQ== 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=A01rDYLdDvEdsWawPTU2MFDnHSxCHYrfBjArC+9zM5k=; b=RHzdLNEuv/y/IskbVdPmOAilM2gO9FKF4iKaYkVf91sTXPpD5Sma2qw1nETdwcGiBM jE7zPcFjpRXsInEiNGG8k9B8BZ9NMOVJmKlRy8hoDlP4I36LFBABlUObWvDz62VMnaA9 Slml9PUoFkhPfj0c0A1cNcIj7XYz3JI9RKQV57/fkxBvYk8e34FWWMVZY7GaHiGi2qrt QTKnn3w0jgPj5nYIPbO4Z7Wi6fI2s5SxuxT9jOcNY8bf9V2IvxNXSEcUydZBvWyx2R+3 7yObHYz0Ac8qxtNlCByt32dzO55qipZ8G3LyYedHsIf3hsYkbd4XlQyr3C9BNQlCA9as UfhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=3sGZwrP7; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="cCzTM/DD"; 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 jg9-20020a17090326c900b00188b63f07a5si9862350plb.615.2022.11.21.07.11.39; Mon, 21 Nov 2022 07:11:57 -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=3sGZwrP7; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="cCzTM/DD"; 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 S231199AbiKUOwk (ORCPT + 99 others); Mon, 21 Nov 2022 09:52:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231924AbiKUOvz (ORCPT ); Mon, 21 Nov 2022 09:51:55 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19B3DD5A3E; Mon, 21 Nov 2022 06:43:15 -0800 (PST) Message-ID: <20221121140050.832658030@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669041618; 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=A01rDYLdDvEdsWawPTU2MFDnHSxCHYrfBjArC+9zM5k=; b=3sGZwrP7BHCmXcJ+qf3v40n2omf1oHAszj/1xHl6Kg1X461MsUlsAP37AbpTnZzZouvoUH SUCwCld4zKmQ5+NnqhbmMS5r7ORH9dhJHGBC9c792QmlCZ7PL0AKiaENw0ydlWEvQenG6U xWG+PH3xFf6vpNiEcRjehjI4JHDZr0TDFr5cpsYbbHcjQH7rqBIlN9hrB5sJX9Xu8cHp2n AntpJfk+tMZ/ipSRozoRp/jwjZbiEA0pnfOQNn9MzEIxlRetiExSBAl7YBRlUe8OopveGd UMqFBpwo3VCfWcyfZHUjAhmUD/6okVqX/8ETCDP+kKA2N8sXU8HSJ8ku7EI7ww== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669041618; 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=A01rDYLdDvEdsWawPTU2MFDnHSxCHYrfBjArC+9zM5k=; b=cCzTM/DDirCnDp3dnaeR/HDx5fiJc1DQ5Sr9zw9+PjVfvcVUuZwpGeICQAxP3WiEryK2VH Rj7e1wXY1BrfSoDw== From: Thomas Gleixner To: LKML Cc: Will Deacon , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Marc Zyngier , Greg Kroah-Hartman , Jason Gunthorpe , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Ammar Faizi , Robin Murphy , Lorenzo Pieralisi , Nishanth Menon , Tero Kristo , Santosh Shilimkar , linux-arm-kernel@lists.infradead.org, Vinod Koul , Sinan Kaya , Andy Gross , Bjorn Andersson , Mark Rutland , Shameerali Kolothum Thodi , Zenghui Yu , Shawn Guo , Sascha Hauer , Fabio Estevam Subject: [patch V2 40/40] genirq/msi: Move msi_device_data to core References: <20221121135653.208611233@linutronix.de> MIME-Version: 1.0 Date: Mon, 21 Nov 2022 15:40:18 +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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750118975515786902?= X-GMAIL-MSGID: =?utf-8?q?1750118975515786902?= Now that the platform MSI hack is gone, nothing needs to know about struct msi_device_data outside of the core code. Signed-off-by: Thomas Gleixner --- include/linux/msi.h | 22 ---------------------- kernel/irq/msi.c | 24 ++++++++++++++++++++++-- 2 files changed, 22 insertions(+), 24 deletions(-) --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -21,11 +21,7 @@ #include #include #include -#include -#include -#include #include -#include #include @@ -212,24 +208,6 @@ enum msi_desc_filter { MSI_DESC_ASSOCIATED, }; -/** - * msi_device_data - MSI per device data - * @properties: MSI properties which are interesting to drivers - * @mutex: Mutex protecting the MSI descriptor store - * @__store: Xarray for storing MSI descriptor pointers - * @__iter_idx: Index to search the next entry for iterators - * @__iter_max: Index to limit the search - * @__irqdomains: Per device interrupt domains - */ -struct msi_device_data { - unsigned long properties; - struct mutex mutex; - struct xarray __store; - unsigned long __iter_idx; - unsigned long __iter_max; - struct irq_domain *__irqdomains[MSI_MAX_DEVICE_IRQDOMAINS]; -}; - int msi_setup_device_data(struct device *dev); void msi_lock_descs(struct device *dev); --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -8,18 +8,38 @@ * This file contains common code to support Message Signaled Interrupts for * PCI compatible and non PCI compatible devices. */ -#include #include #include #include #include +#include +#include #include #include -#include +#include +#include #include "internals.h" /** + * msi_device_data - MSI per device data + * @properties: MSI properties which are interesting to drivers + * @mutex: Mutex protecting the MSI descriptor store + * @__store: Xarray for storing MSI descriptor pointers + * @__iter_idx: Index to search the next entry for iterators + * @__iter_max: Index to limit the search + * @__irqdomains: Per device interrupt domains + */ +struct msi_device_data { + unsigned long properties; + struct mutex mutex; + struct xarray __store; + unsigned long __iter_idx; + unsigned long __iter_max; + struct irq_domain *__irqdomains[MSI_MAX_DEVICE_IRQDOMAINS]; +}; + +/** * struct msi_ctrl - MSI internal management control structure * @domid: ID of the domain on which management operations should be done * @first: First (hardware) slot index to operate on