From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754225Ab0HCIFM (ORCPT ); Tue, 3 Aug 2010 04:05:12 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:26531 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752654Ab0HCIFJ (ORCPT ); Tue, 3 Aug 2010 04:05:09 -0400 Message-ID: <4C57CD9C.70602@kernel.org> Date: Tue, 03 Aug 2010 01:04:44 -0700 From: Yinghai Lu User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100714 SUSE/3.0.6 Thunderbird/3.0.6 MIME-Version: 1.0 To: "Eric W. Biederman" CC: Dave Airlie , LKML , Ingo Molnar Subject: Re: oops in ioapic_write_entry References: <4C577197.9020003@kernel.org> <4C57723C.1060400@kernel.org> <4C57C319.8070800@kernel.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Source-IP: acsmt355.oracle.com [141.146.40.155] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090201.4C57CDA7.01B9,ss=1,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/03/2010 01:00 AM, Eric W. Biederman wrote: > Yinghai Lu writes: > >>>> Index: linux-2.6/arch/x86/kernel/apic/io_apic.c >>>> =================================================================== >>>> --- linux-2.6.orig/arch/x86/kernel/apic/io_apic.c >>>> +++ linux-2.6/arch/x86/kernel/apic/io_apic.c >>>> @@ -1029,10 +1029,7 @@ static int pin_2_irq(int idx, int apic, >>>> } else { >>>> u32 gsi = mp_gsi_routing[apic].gsi_base + pin; >>>> >>>> - if (gsi >= NR_IRQS_LEGACY) >>>> - irq = gsi; >>>> - else >>>> - irq = gsi_top + gsi; >>>> + irq = gsi_to_irq(gsi); >>>> } >>>> >>>> #ifdef CONFIG_X86_32 >> >> what is the point for making irq = gsi_top + gsi when mptable is used instead of acpi? > > Because it is only convention that when mptables are used that the > first apic pins 0-15 are the ISA irqs. This thread witnessed and a > pci irq that came in pin < 16 that was not an ISA irq. The truly rare > and exotic case would be for the ISA irqs to be outside the first 16 > ioapic pins but the es7000 did exactly that. nvidia chipset if acpi is enabled, external pci device will use ioapic from 16 to 23. if mptable is used, external pci device will not use pin from 16 to 23..., and lot of devices will share same pin. Yinghai