Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760220AbZANKgY (ORCPT ); Wed, 14 Jan 2009 05:36:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752797AbZANKgM (ORCPT ); Wed, 14 Jan 2009 05:36:12 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:56705 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752701AbZANKgK (ORCPT ); Wed, 14 Jan 2009 05:36:10 -0500 From: "Rafael J. Wysocki" To: Kenji Kaneshige Subject: Re: [PATCH 5/8] PCI PCIe portdrv: Fix allocation of interrupts Date: Wed, 14 Jan 2009 11:35:30 +0100 User-Agent: KMail/1.10.3 (Linux/2.6.29-rc1-rjw; KDE/4.1.3; x86_64; ; ) Cc: Jesse Barnes , Linux PCI , LKML References: <200901042346.42723.rjw@sisk.pl> <200901131217.07537.rjw@sisk.pl> <496D815E.8010107@jp.fujitsu.com> In-Reply-To: <496D815E.8010107@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901141135.31165.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3123 Lines: 60 On Wednesday 14 January 2009, Kenji Kaneshige wrote: > Rafael J. Wysocki wrote: > > On Tuesday 13 January 2009, Kenji Kaneshige wrote: > >> Rafael J. Wysocki wrote: > >>> On Saturday 10 January 2009, Jesse Barnes wrote: > >>>> On Thursday, January 8, 2009 12:45 pm Rafael J. Wysocki wrote: > >>>>> On Thursday 08 January 2009, Rafael J. Wysocki wrote: > >>>>>> On Thursday 08 January 2009, Kenji Kaneshige wrote: > >>>>>>> Rafael J. Wysocki wrote: > >>>>>>>> On Thursday 08 January 2009, Kenji Kaneshige wrote: > >>>>>>>>> Rafael J. Wysocki wrote: > >>>>>>>>>> From: Rafael J. Wysocki > >>>>>>>>>> > >>>>>>>>>> If MSI-X interrupt mode is used by the PCI Express port driver, too > >>>>>>>>>> many vectors are allocated and it is not ensured that the right > >>>>>>>>>> vectors will be used for various services. Namely, the PCI Express > >>>>>>>>>> specification states that both PCI Express native PME and PCI > >>>>>>>>>> Express hotplug will always use the same MSI or MSI-X message for > >>>>>>>>>> signalling interrupts, which implies that the same vector will be > >>>>>>>>>> used by both of them. Also, the VC service does not use interrupts > >>>>>>>>>> at all. Moreover, is not clear which of the vectors allocated by > >>>>>>>>>> pci_enable_msix() will be used for PME and hotplug and which of > >>>>>>>>>> them will be used for AER if all of these services are configured. > >>>>>>>>>> > >>>>>>>>>> For these reasons, rework the allocation of interrupts for PCI > >>>>>>>>>> Express ports so that at most two vectors are allocated and ensure > >>>>>>>>>> that the right vector will be used for the right purpose. > >>>>> Appended is a cleaned-up version of the patch that also contains comments > >>>>> with references to the appropriate sections of the PCI Express spec. > >>>> We'll need testing here in any case; I'll have to re-read the specs carefully > >>>> to see if we can really rely on the vector numbers you have here (at first > >>>> glance Kenji-san's approach seems more robust). > >>> It has a catch too. Namely, is there any warranty that we'll get the same > >>> vectors when the second pci_enable_msix() is called and that they will be in > >>> the same order? > >>> > >> In my understanding, the following description of Interrupt Message > >> Number in the PCI Express spec explains this. > >> > >> "[...] For a given MSI-X implementation, the entry must remain constant. [...]" > > > > The entry - yes, but the associated interrupt vector as sent to the CPU? That > > seems to be platform-dependent. > > > > I'm sorry but I don't understand what the problem is. > Do you mean pci_disable_msix() doesn't work on some platforms? No, I don't. It was just confusion on my side, sorry. Please have a look at the new version of the patch I sent yesterday (http://marc.info/?l=linux-pci&m=123185510828181&w=4). Thanks, Rafael -- 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/