mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: jacob pan <jacob.jun.pan@linux.intel.com>
Cc: Alan Cox <alan@linux.intel.com>,
	Arjan van de Ven <arjan@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
	Feng Tang <feng.tang@intel.com>, Len Brown <len.brown@intel.com>
Subject: Re: [PATCH] x86/sfi: fix ioapic gsi range
Date: Wed, 09 Jun 2010 16:44:11 -0700	[thread overview]
Message-ID: <m1r5kfwz3o.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20100608151735.1693105f@jacob-laptop> (jacob pan's message of "Tue\, 8 Jun 2010 15\:17\:35 -0700")

jacob pan <jacob.jun.pan@linux.intel.com> writes:

> [jacob pan] 
>
> In arch/x86/kernel/mrst.c we parse SFI MTMR table then
> add timer irqs to mp_irqs. what is broken by this patch is
> pin_2_irq() lookup for the legacy irq range since we want
> NR_IRQS_LEGACY to be 0 on Moorestown. We do have the assumption that
> mp_irqs from SFI is 1:1 mapped to IRQs.

NR_IRQS_LEGACY is a constant of 16.

> Doing this can fix the problem, but you mentioned you have to use
> NR_IRQS_LEGACY, which i still don't understand.

Looking at the code in io_apic.c there is a relatively clean way to
handle this.  The actual concept in io_apic.c today is mp_bus_not_pci.

So you just need to do:

diff --git a/arch/x86/kernel/mrst.c b/arch/x86/kernel/mrst.c
index e796448..9377fda 100644
--- a/arch/x86/kernel/mrst.c
+++ b/arch/x86/kernel/mrst.c
@@ -242,4 +242,5 @@ void __init x86_mrst_early_setup(void)
 	x86_init.mpparse.find_smp_config = x86_init_noop;
 	x86_init.mpparse.get_smp_config = x86_init_uint_noop;
 
+	set_bit(0, mp_bus_not_pci);
 }


Then you get treated as ISA for purposes of pin_2_irq, and everything
is a pass through.  Since that seems to be what you want anyway I don't
see a problem with that for now.

Using legacy pic to even talk about this behavior is wrong as that is
hardware abstraction and the presence or absence of an i8259 has
nothing to do with the presence of ISA irqs and their descendants.

Eric

  reply	other threads:[~2010-06-09 23:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-07 23:07 Jacob Pan
2010-06-08  0:01 ` jacob pan
2010-06-08  0:24 ` Eric W. Biederman
2010-06-08  0:30   ` H. Peter Anvin
2010-06-08  1:10     ` Eric W. Biederman
2010-06-08  8:10     ` Alan Cox
2010-06-08 18:11       ` H. Peter Anvin
2010-06-08 20:04         ` Eric W. Biederman
2010-06-08 18:44     ` [PATCH] x86/irq: Rename gsi_end gsi_top, and fix off by one errors Eric W. Biederman
2010-06-09 22:06       ` [tip:x86/urgent] x86, irq: " tip-bot for Eric W. Biederman
2010-06-08  5:50   ` [PATCH] x86/sfi: fix ioapic gsi range jacob pan
2010-06-08 19:41     ` Eric W. Biederman
2010-06-08 19:12       ` Alan Cox
2010-06-08 20:56         ` Yuhong Bao
2010-06-08 22:16           ` Eric W. Biederman
2010-06-08 22:29             ` Alan Cox
2010-06-08 20:36       ` H. Peter Anvin
2010-06-08 20:59         ` Eric W. Biederman
2010-06-08 21:08           ` H. Peter Anvin
2010-06-08 21:51             ` Eric W. Biederman
2010-06-08 20:41       ` jacob pan
2010-06-08 21:22         ` Eric W. Biederman
2010-06-08 22:17           ` jacob pan
2010-06-09 23:44             ` Eric W. Biederman [this message]
2010-06-10  8:40               ` jacob pan
2010-06-10 14:39                 ` Eric W. Biederman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1r5kfwz3o.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=alan@linux.intel.com \
    --cc=arjan@linux.intel.com \
    --cc=feng.tang@intel.com \
    --cc=hpa@zytor.com \
    --cc=jacob.jun.pan@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome