From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yinghai Lu Subject: Re: [patch 00/47] Sparse irq rework Date: Mon, 11 Oct 2010 09:19:28 -0700 Message-ID: <4CB33910.1020002@kernel.org> References: <20100930221351.682772535@linutronix.de> <20101003112920.GB32736@n2100.arm.linux.org.uk> <4CACFC23.4080504@kernel.org> <4CAD082B.40908@kernel.org> <4CAD1154.3080403@kernel.org> <4CAD4EC3.5060809@kernel.org> <4CAFEEFA.1070000@kernel.org> <4CB00122.3030301@kernel.org> <4CB014F5.5080209@kernel. org> <4CB28988.4090207@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from rcsinet10.oracle.com ([148.87.113.121]:49454 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755105Ab0JKQWE (ORCPT ); Mon, 11 Oct 2010 12:22:04 -0400 In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Thomas Gleixner Cc: Grant Likely , Russell King - ARM Linux , LKML , linux-arch@vger.kernel.org, Linus Torvalds , Andrew Morton , x86@kernel.org, Peter Zijlstra , Benjamin Herrenschmidt , Paul Mundt , David Woodhouse , Jesse Barnes , "Eric W. Biederman" , Suresh Siddha On 10/11/2010 01:16 AM, Thomas Gleixner wrote: > On Sun, 10 Oct 2010, Yinghai Lu wrote: > >> On 10/10/2010 02:32 AM, Thomas Gleixner wrote: >>> On Sat, 9 Oct 2010, Yinghai Lu wrote: >>>> On 10/08/2010 11:34 PM, Thomas Gleixner wrote: >>>>> On Fri, 8 Oct 2010, Yinghai Lu wrote: >>>>>> + /* only handle fall out from setup_IO_APIC_irqs() */ >>>>> >>>>> What's the fallout ? And why are we coming here in the first place >>>>> when the irq is < 16 ? >>>> >>>> setup_IO_APIC_irqs only handle apic_id == 0 or apic_id > 0 but irq < 16 via acpi override. >>>> >>>> it seems IBM's system have apic_id == 1, and sci irq is using 30. >>>> >>>> so at that time add that setup_IO_APIC_irq_extra() to workaround it. >>>> but it seems we set that two time when irq < 16. >>>> >>>>> >>>>>> + if (!((apic_id > 0) && (irq > 16))) >>>>>> + return; >>> >>> I added this into the queue, but simplified it to >>> >>> if (apic_id == 0 || irq < NR_IRQS_LEGACY) >>> >>> Folded in the other fix and pushed out an updated tree. >> >> still have the irq_2_iommu_alloc warning from pnpacpi > > Hmm, that's probably a problem for all legacy interrupts which are > never torn down once they are set up. And we set them all up during > early boot. > > So either we special case the legacy area or remove the warning > alltogether. or use pr_warning instead of WARN_ONCE? > > Another option I discussed with Suresh recently is to remove the > allocator in intr_remapping.c and just embedd irq_2_iommu into > irq_cfg. in setup_IO_APIC_irqs(), pin_programmed is not set. /* * don't mark it in pin_programmed, so later acpi could * set it correctly when irq < 16 */ setup_ioapic_irq(apic_id, pin, irq, cfg, irq_trigger(idx), irq_polarity(idx)); because we found some systems have strange ioapic setting, their pci devices irq < 16. Yinghai From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcsinet10.oracle.com ([148.87.113.121]:49454 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755105Ab0JKQWE (ORCPT ); Mon, 11 Oct 2010 12:22:04 -0400 Message-ID: <4CB33910.1020002@kernel.org> Date: Mon, 11 Oct 2010 09:19:28 -0700 From: Yinghai Lu MIME-Version: 1.0 Subject: Re: [patch 00/47] Sparse irq rework References: <20100930221351.682772535@linutronix.de> <20101003112920.GB32736@n2100.arm.linux.org.uk> <4CACFC23.4080504@kernel.org> <4CAD082B.40908@kernel.org> <4CAD1154.3080403@kernel.org> <4CAD4EC3.5060809@kernel.org> <4CAFEEFA.1070000@kernel.org> <4CB00122.3030301@kernel.org> <4CB014F5.5080209@kernel.org> <4CB28988.4090207@kernel.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Thomas Gleixner Cc: Grant Likely , Russell King - ARM Linux , LKML , linux-arch@vger.kernel.org, Linus Torvalds , Andrew Morton , x86@kernel.org, Peter Zijlstra , Benjamin Herrenschmidt , Paul Mundt , David Woodhouse , Jesse Barnes , "Eric W. Biederman" , Suresh Siddha Message-ID: <20101011161928._zqMQyXhNXWxvngnw8ndxOpyAuOnJDjkFx8lPBbxHoE@z> On 10/11/2010 01:16 AM, Thomas Gleixner wrote: > On Sun, 10 Oct 2010, Yinghai Lu wrote: > >> On 10/10/2010 02:32 AM, Thomas Gleixner wrote: >>> On Sat, 9 Oct 2010, Yinghai Lu wrote: >>>> On 10/08/2010 11:34 PM, Thomas Gleixner wrote: >>>>> On Fri, 8 Oct 2010, Yinghai Lu wrote: >>>>>> + /* only handle fall out from setup_IO_APIC_irqs() */ >>>>> >>>>> What's the fallout ? And why are we coming here in the first place >>>>> when the irq is < 16 ? >>>> >>>> setup_IO_APIC_irqs only handle apic_id == 0 or apic_id > 0 but irq < 16 via acpi override. >>>> >>>> it seems IBM's system have apic_id == 1, and sci irq is using 30. >>>> >>>> so at that time add that setup_IO_APIC_irq_extra() to workaround it. >>>> but it seems we set that two time when irq < 16. >>>> >>>>> >>>>>> + if (!((apic_id > 0) && (irq > 16))) >>>>>> + return; >>> >>> I added this into the queue, but simplified it to >>> >>> if (apic_id == 0 || irq < NR_IRQS_LEGACY) >>> >>> Folded in the other fix and pushed out an updated tree. >> >> still have the irq_2_iommu_alloc warning from pnpacpi > > Hmm, that's probably a problem for all legacy interrupts which are > never torn down once they are set up. And we set them all up during > early boot. > > So either we special case the legacy area or remove the warning > alltogether. or use pr_warning instead of WARN_ONCE? > > Another option I discussed with Suresh recently is to remove the > allocator in intr_remapping.c and just embedd irq_2_iommu into > irq_cfg. in setup_IO_APIC_irqs(), pin_programmed is not set. /* * don't mark it in pin_programmed, so later acpi could * set it correctly when irq < 16 */ setup_ioapic_irq(apic_id, pin, irq, cfg, irq_trigger(idx), irq_polarity(idx)); because we found some systems have strange ioapic setting, their pci devices irq < 16. Yinghai