From patchwork Mon Nov 21 14:36:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 13051110 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC14EC4321E for ; Mon, 21 Nov 2022 14:37:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231220AbiKUOhR (ORCPT ); Mon, 21 Nov 2022 09:37:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230345AbiKUOgp (ORCPT ); Mon, 21 Nov 2022 09:36:45 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F558C76A4; Mon, 21 Nov 2022 06:36:42 -0800 (PST) Message-ID: <20221121083326.506769769@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669041401; 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=KdxaqYbUAroipCiY9Q/sHRBQvYFsOFnVJz7w23FqFeo=; b=NOios5WejLcPP5Q9VeeaXfoWZvS8Ir8ZWLx+007Su5rzKenKqqbIWCQfMSww6qa8dc+CZU qsB32jkH/7fgJIBXbEttedCh7XaE7g/KcSXK6mSLU5Y+rUeiGBEnlxPMLXJklVE24+Jz0R Eyc+3HdDp6dTiTiuTqbhjHjwRfLEE8/wRTm94vqdcvlf7ZZTAbnxAyk+J1URQxK0JKQqUi KRn6XzDl0lrtyT4HfONIkCbCl5qlDT2lmLSb8OJcSnZzVHW33Psl4psy8UZly+lIpKTdW1 +bX6ZThtNt5aXkGqfDv0O6fiYutrS7+suFpBAzZfhowpH47HifNupXDXUbueDg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669041401; 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=KdxaqYbUAroipCiY9Q/sHRBQvYFsOFnVJz7w23FqFeo=; b=4JEeV+scQUqhhKLeb+3YP0NzubdIlifZaQ3kDRjWdvsouIu5isL//dqrvCZxuMwUFzhBgi AoOK+iW9RpO97zCw== 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 , "Ahmed S. Darwish" Subject: [patch V2 18/21] platform-msi: Switch to the domain id aware MSI interfaces References: <20221121083210.309161925@linutronix.de> MIME-Version: 1.0 Date: Mon, 21 Nov 2022 15:36:40 +0100 (CET) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Ahmed S. Darwish Switch to the new domain id aware interfaces to phase out the previous ones. Use the range interface for allocation as the MSI descriptors are allocate by the MSI core and therefore a precise range has to be given. On free just tear down all MSI interrupts for simplicity. No functional change. Signed-off-by: Ahmed S. Darwish Signed-off-by: Thomas Gleixner --- drivers/base/platform-msi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/base/platform-msi.c +++ b/drivers/base/platform-msi.c @@ -213,7 +213,7 @@ int platform_msi_domain_alloc_irqs(struc if (err) return err; - err = msi_domain_alloc_irqs(dev->msi.domain, dev, nvec); + err = msi_domain_alloc_irqs_range(dev, MSI_DEFAULT_DOMAIN, 0, nvec - 1); if (err) platform_msi_free_priv_data(dev); @@ -227,7 +227,7 @@ EXPORT_SYMBOL_GPL(platform_msi_domain_al */ void platform_msi_domain_free_irqs(struct device *dev) { - msi_domain_free_irqs(dev->msi.domain, dev); + msi_domain_free_irqs_all(dev, MSI_DEFAULT_DOMAIN); platform_msi_free_priv_data(dev); } EXPORT_SYMBOL_GPL(platform_msi_domain_free_irqs);