linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu@linux.intel.com>
To: Sander Eikelenboom <linux@eikelenboom.it>
Cc: David Vrabel <david.vrabel@citrix.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Grant Likely <grant.likely@linaro.org>,
	Yinghai Lu <yinghai@kernel.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] [Bugfix] x86/apic: Fix xen IRQ allocation failure caused by commit b81975eade8c
Date: Wed, 14 Jan 2015 20:29:54 +0800	[thread overview]
Message-ID: <54B66142.1090300@linux.intel.com> (raw)
In-Reply-To: <154273028.20150114132342@eikelenboom.it>

On 2015/1/14 20:23, Sander Eikelenboom wrote:
> 
> Wednesday, January 14, 2015, 4:09:35 AM, you wrote:
> 
>> Commit b81975eade8c ("x86, irq: Clean up irqdomain transition code")
>> breaks xen IRQ allocation because xen_smp_prepare_cpus() doesn't invoke
>> setup_IO_APIC(), so no irqdomains created for IOAPICs and
>> mp_map_pin_to_irq() fails at the very beginning.
> 
>> So move creating of IOAPIC irqdomains from setup_IO_APIC() into
>> arch_early_ioapic_init().
> 
>> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
>> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
>> Reported-and-tested-by: Sander Eikelenboom <linux@eikelenboom.it>
>> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> 
> Thanks Gerry !
> Will you send (a backport) to stable for 3.17 and 3.18 when 
> it's applied to -tip ?
Sure, will do it once it reaches mainstream kernel.

> 
> --
> Sander
> 
>> ---
>>  arch/x86/kernel/apic/io_apic.c |   13 +++++++------
>>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
>> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
>> index 3f5f60406ab1..1117c84cefe4 100644
>> --- a/arch/x86/kernel/apic/io_apic.c
>> +++ b/arch/x86/kernel/apic/io_apic.c
>> @@ -245,6 +245,8 @@ static void free_ioapic_saved_registers(int idx)
>>         ioapics[idx].saved_registers = NULL;
>>  }
>>  
>> +static int mp_irqdomain_create(int ioapic);
>> +
>>  int __init arch_early_ioapic_init(void)
>>  {
>>         struct irq_cfg *cfg;
>> @@ -253,8 +255,10 @@ int __init arch_early_ioapic_init(void)
>>         if (!nr_legacy_irqs())
>>                 io_apic_irqs = ~0UL;
>>  
>> -       for_each_ioapic(i)
>> +       for_each_ioapic(i) {
>> +               BUG_ON(mp_irqdomain_create(i));
>>                 alloc_ioapic_saved_registers(i);
>> +       }
>>  
>>         /*
>>          * For legacy IRQ's, start with assigning irq0 to irq15 to
>> @@ -2371,16 +2375,12 @@ static void ioapic_destroy_irqdomain(int idx)
>>  
>>  void __init setup_IO_APIC(void)
>>  {
>> -       int ioapic;
>> -
>>         /*
>>          * calling enable_IO_APIC() is moved to setup_local_APIC for BP
>>          */
>>         io_apic_irqs = nr_legacy_irqs() ? ~PIC_IRQS : ~0UL;
>>  
>>         apic_printk(APIC_VERBOSE, "ENABLING IO-APIC IRQs\n");
>> -       for_each_ioapic(ioapic)
>> -               BUG_ON(mp_irqdomain_create(ioapic));
>>  
>>         /*
>>           * Set up IO-APIC IRQ routing.
>> @@ -2929,7 +2929,8 @@ int mp_register_ioapic(int id, u32 address, u32 gsi_base,
>>         /*
>>          * If mp_register_ioapic() is called during early boot stage when
>>          * walking ACPI/SFI/DT tables, it's too early to create irqdomain,
>> -        * we are still using bootmem allocator. So delay it to setup_IO_APIC().
>> +        * we are still using bootmem allocator.So delay it to
>> +        * arch_early_ioapic_init().
>>          */
>>         if (hotplug) {
>>                 if (mp_irqdomain_create(idx)) {
> 

  reply	other threads:[~2015-01-14 12:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07  6:13 [Bugfix] x86/apic: Fix xen IRQ allocation failure caused by commit b81975eade8c Jiang Liu
2015-01-07 14:50 ` Konrad Rzeszutek Wilk
2015-01-07 15:37   ` Jiang Liu
2015-01-07 15:44     ` Konrad Rzeszutek Wilk
2015-01-08  6:36       ` Jiang Liu
2015-01-09 21:15         ` Konrad Rzeszutek Wilk
2015-01-10 19:12 ` Sander Eikelenboom
2015-01-12 13:39   ` [PATCH v2] " Jiang Liu
2015-01-12 15:01     ` [Xen-devel] " David Vrabel
2015-01-12 23:18       ` Sander Eikelenboom
2015-01-13  9:01         ` Thomas Gleixner
2015-01-14  3:09           ` [PATCH v3] " Jiang Liu
2015-01-14 12:23             ` Sander Eikelenboom
2015-01-14 12:29               ` Jiang Liu [this message]
2015-01-15 13:04             ` [Bugfix v4 0/2] " Jiang Liu
2015-01-15 13:04               ` [Bugfix v4 1/2] xen/pci: " Jiang Liu
2015-01-16 18:13                 ` Konrad Rzeszutek Wilk
2015-01-19  4:39                   ` Jiang Liu
2015-01-19  4:41                   ` Jiang Liu
2015-01-20 19:12                     ` Konrad Rzeszutek Wilk
2015-01-15 13:04               ` [Bugfix v4 2/2] xen/pci: Simplify x86/pci/xen.c by killing gsi_override related code Jiang Liu
2015-01-15 13:11               ` [Bugfix v4 0/2] Fix xen IRQ allocation failure caused by commit b81975eade8c Sander Eikelenboom
2015-01-15 14:22               ` Sander Eikelenboom
2015-01-15 14:37                 ` Jiang Liu
2015-01-13  2:23       ` [Xen-devel] [PATCH v2] [Bugfix] x86/apic: " Jiang Liu
2015-01-13 10:09         ` David Vrabel
2015-01-13 12:39           ` Jiang Liu

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=54B66142.1090300@linux.intel.com \
    --to=jiang.liu@linux.intel.com \
    --cc=david.vrabel@citrix.com \
    --cc=grant.likely@linaro.org \
    --cc=hpa@zytor.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@eikelenboom.it \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).