From patchwork Mon Nov 21 14:36:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 23810 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1627311wrr; Mon, 21 Nov 2022 06:39:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf5SAb99yNShKnt3ZIu5gFVgLiikKRsY9GP2aXSYLCgVgiwKU9XgHADoovMD3oHUeOHFdOtE X-Received: by 2002:aa7:81d8:0:b0:561:c694:80b with SMTP id c24-20020aa781d8000000b00561c694080bmr20710872pfn.47.1669041555648; Mon, 21 Nov 2022 06:39:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669041555; cv=none; d=google.com; s=arc-20160816; b=Nj9/17QkK+sPSzsfZ7i76kuD7FBFK+Ciidn3rc8cWOMyIRxbODwjHlcjvuve+eOzmX +wI2zNRcL0n3woCHjm82RI+Ur29rTTLMJ6onDOJ02jc4koDybnWvZuUz5oAr8/wCsqCe cf1GX9qY8zvhFKY21/r/Ta9YZI595jVMgQPXyU5U+Dgelqb4NbuiDcjGbg5ugj24tOO7 bANF13d4TcztFqLXYS2IuIa4yuoOvRUtQ4i9KGr+pq3DGEJb03uR7H5HBNCT5CUMyvTt eQWJb/yE3mkyPqJfqBuTmtZMXPLZG/ekKnMLf5nMyUmpEhomnD6kdDcl2CKIxSo6aQ7h roHw== 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=kKZ6YRjY9aGG9HRn9rYYYIg6fBxMMWfqpTeU5FCww7w=; b=ZkybZMiZ8WAs2osSSAfctIYee/ta3RP81hVNNQpRIqxnuoij4KipEgwYiO8Q47zRGn VScKP840jeKVvLJha51yPY6WU45IcEnf2Ludwvado03TTpgiF5nwxaTbZgO22gQOnpfd 41xhUBcw0hI/TixiKXoAgA8ET5XXLAMzh+0rTZSBrI57DYp4ONXdRLFAkFnvg/UU2xO0 EIxGTGJ6ZK1nQseZTCmklCcct+TFmLTI+cN0HvaGppf+3BbSU9lJnJtDKYrctUSuwi7F bJD1popOPD4dhgKqW9CMVpz7avjKo0p1s5Yr4FHGKDBzzOMDCLK+LEyFGkyMDxzLarJG 8qcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=O7mY7LLD; 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 b18-20020a170903229200b00177fd8409b7si13429319plh.73.2022.11.21.06.38.57; Mon, 21 Nov 2022 06:39:15 -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=O7mY7LLD; 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 S231710AbiKUOi0 (ORCPT + 99 others); Mon, 21 Nov 2022 09:38:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231143AbiKUOgs (ORCPT ); Mon, 21 Nov 2022 09:36:48 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BDF8C76B6; Mon, 21 Nov 2022 06:36:46 -0800 (PST) Message-ID: <20221121083326.673666308@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669041404; 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=kKZ6YRjY9aGG9HRn9rYYYIg6fBxMMWfqpTeU5FCww7w=; b=O7mY7LLDCEdlO9BZwAQSu6EAgv6+QZBT5QlMxlEyy0NAfJcKPFQBNsfmPTnh0YDd3mrZDG +qA8nd+P/c/8eqVC4VJqwbDWKyjWMqFvKdxdwcVrbQwDKx6hhH/JSynOWDj1ogiIwOOU5g YT7MuejVMpmKE+LUDXOx3HkWqkxECKyswHgpOJjKuYolSWTtPl+AjGHNerDeKEbeu7Mw+k 0aFrg6waFCGhGCqtdbJKvbcSKUzveP6iDPXSJs5D1zDw3cwZYLUHmcnDC/DYG0l7iH1gSM y+8MbNF6iV0gv3MbcrmQt17sFVRbzIsYSkZPVcx+XgvhOfRCDUY314RgwQ02GQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669041404; 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=kKZ6YRjY9aGG9HRn9rYYYIg6fBxMMWfqpTeU5FCww7w=; b=6Q93etPjq8tbOMJBZNVd8aH+AvSLsfPS2H8ym1Rys7qwauH0Uo+6iax97pEb8weS7QoF/E Va8QMkAZZvl1q5Bw== 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 V2 21/21] genirq/msi: Remove unused alloc/free interfaces References: <20221121083210.309161925@linutronix.de> MIME-Version: 1.0 Date: Mon, 21 Nov 2022 15:36:44 +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?1750116918450584325?= X-GMAIL-MSGID: =?utf-8?q?1750116918450584325?= Now that all users are converted remove the old interfaces. Signed-off-by: Thomas Gleixner --- include/linux/msi.h | 7 ---- kernel/irq/msi.c | 73 ---------------------------------------------------- 2 files changed, 80 deletions(-) --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -479,13 +479,6 @@ int msi_domain_set_affinity(struct irq_d struct irq_domain *msi_create_irq_domain(struct fwnode_handle *fwnode, struct msi_domain_info *info, struct irq_domain *parent); -int msi_domain_alloc_irqs_descs_locked(struct irq_domain *domain, struct device *dev, - int nvec); -int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, - int nvec); - -void msi_domain_free_irqs_descs_locked(struct irq_domain *domain, struct device *dev); -void msi_domain_free_irqs(struct irq_domain *domain, struct device *dev); int msi_domain_alloc_irqs_range_locked(struct device *dev, unsigned int domid, unsigned int first, unsigned int last); --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -1177,51 +1177,6 @@ int msi_domain_alloc_irqs_all_locked(str return msi_domain_alloc_locked(dev, &ctrl); } -/** - * msi_domain_alloc_irqs_descs_locked - Allocate interrupts from a MSI interrupt domain - * @domain: The domain to allocate from - * @dev: Pointer to device struct of the device for which the interrupts - * are allocated - * @nvec: The number of interrupts to allocate - * - * Must be invoked from within a msi_lock_descs() / msi_unlock_descs() - * pair. Use this for MSI irqdomains which implement their own vector - * allocation/free. - * - * Return: %0 on success or an error code. - */ -int msi_domain_alloc_irqs_descs_locked(struct irq_domain *domain, struct device *dev, - int nvec) -{ - struct msi_ctrl ctrl = { - .domid = MSI_DEFAULT_DOMAIN, - .first = 0, - .last = MSI_MAX_INDEX, - .nirqs = nvec, - }; - - return msi_domain_alloc_locked(dev, &ctrl); -} - -/** - * msi_domain_alloc_irqs - Allocate interrupts from a MSI interrupt domain - * @domain: The domain to allocate from - * @dev: Pointer to device struct of the device for which the interrupts - * are allocated - * @nvec: The number of interrupts to allocate - * - * Return: %0 on success or an error code. - */ -int msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev, int nvec) -{ - int ret; - - msi_lock_descs(dev); - ret = msi_domain_alloc_irqs_descs_locked(domain, dev, nvec); - msi_unlock_descs(dev); - return ret; -} - static void __msi_domain_free_irqs(struct device *dev, struct irq_domain *domain, struct msi_ctrl *ctrl) { @@ -1348,34 +1303,6 @@ void msi_domain_free_irqs_all(struct dev msi_unlock_descs(dev); } -/** - * msi_domain_free_irqs_descs_locked - Free interrupts from a MSI interrupt @domain associated to @dev - * @domain: The domain to managing the interrupts - * @dev: Pointer to device struct of the device for which the interrupts - * are free - * - * Must be invoked from within a msi_lock_descs() / msi_unlock_descs() - * pair. Use this for MSI irqdomains which implement their own vector - * allocation. - */ -void msi_domain_free_irqs_descs_locked(struct irq_domain *domain, struct device *dev) -{ - msi_domain_free_irqs_range_locked(dev, MSI_DEFAULT_DOMAIN, 0, MSI_MAX_INDEX); -} - -/** - * msi_domain_free_irqs - Free interrupts from a MSI interrupt @domain associated to @dev - * @domain: The domain to managing the interrupts - * @dev: Pointer to device struct of the device for which the interrupts - * are free - */ -void msi_domain_free_irqs(struct irq_domain *domain, struct device *dev) -{ - msi_lock_descs(dev); - msi_domain_free_irqs_descs_locked(domain, dev); - msi_unlock_descs(dev); -} - /** * msi_get_domain_info - Get the MSI interrupt domain info for @domain * @domain: The interrupt domain to retrieve data from