Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992471AbbEOVCx (ORCPT ); Fri, 15 May 2015 17:02:53 -0400 Received: from www.linutronix.de ([62.245.132.108]:43138 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2992453AbbEOVCv (ORCPT ); Fri, 15 May 2015 17:02:51 -0400 Date: Fri, 15 May 2015 23:02:59 +0200 (CEST) From: Thomas Gleixner To: Jiang Liu cc: "Rafael J . Wysocki" , Bjorn Helgaas , Lv Zheng , LKML , linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, "x86 @ kernel . org" Subject: Re: [RFC 2/4] PCI, MSI: Optionally free legacy PCI IRQ when enabling MSI/MSI-X In-Reply-To: <1430968374-29286-3-git-send-email-jiang.liu@linux.intel.com> Message-ID: References: <1430968374-29286-1-git-send-email-jiang.liu@linux.intel.com> <1430968374-29286-3-git-send-email-jiang.liu@linux.intel.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 851 Lines: 30 On Thu, 7 May 2015, Jiang Liu wrote: > Once PCI MSI/MSI-X is enabled by the device driver, PCI device won't > make use of legacy PCI IRQ until PCI MSI/MSI-X is disabled again. > So optionally free legacy PCI IRQ when enabling MSI/MSI-X and reallocate > when disabling MSI/MSI-X. This is a bit odd. With your proposed change we'll have: alloc_legacy_irq() msi[x]_enable() free_legacy_irq() msi[x]_disable() alloc_legacy_irq() And after that we shut down the device which will free the legacy irq again. Shouldn't we allocate the legacy irq only if we really need it? Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/