All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Grant Likely <grant.likely@secretlab.ca>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-arch@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	x86@kernel.org, Peter Zijlstra <peterz@infradead.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mundt <lethal@linux-sh.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [patch 00/47] Sparse irq rework
Date: Wed, 06 Oct 2010 17:16:20 -0700	[thread overview]
Message-ID: <4CAD1154.3080403@kernel.org> (raw)
In-Reply-To: <4CAD082B.40908@kernel.org>

On 10/06/2010 04:37 PM, Yinghai Lu wrote:
> On 10/06/2010 03:52 PM, Thomas Gleixner wrote:
>> On Wed, 6 Oct 2010, Yinghai Lu wrote:
>>
>>> On 10/05/2010 03:22 AM, Thomas Gleixner wrote:
>>>> On Sun, 3 Oct 2010, Thomas Gleixner wrote:
>>>>> On Sun, 3 Oct 2010, Grant Likely wrote:
>>>>>> Okay, patch 14 looks good to me too (including Yinghai's comment).
>>>>>> The new allocator seems sane, and I didn't see any obvious errors in
>>>>>> patches 16-47.  I've not tested any of this yet.  Hopefully I'll be
>>>>>> able to carve out some time to do so early this week.
>>>>>
>>>>> Wait until I pushed out a fixed tree. In meantime I found out how I
>>>>> managed to screw up the quilt series :(
>>>>>
>>>>> Will post, once it's ready.
>>>>
>>>> Pushed out an updated tree to
>>>>
>>>>  git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-sparse-irq.git master
>>>>
>>>
>>> test it together with tip, it seems all io apic routing is not set rightly. MSI is ok...
>>>
>>> [  200.290040] ehci_hcd 0000:00:1d.7: PCI INT A -> GSI 23 (level, low) -> IRQ 23
>>> [  200.290991] ehci_hcd 0000:00:1d.7: setting latency timer to 64
>>> [  200.310002] ehci_hcd 0000:00:1d.7: EHCI Host Controller
>>> [  200.310455] ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
>>> [  200.330127] ehci_hcd 0000:00:1d.7: debug port 1
>>> [  200.334395] ehci_hcd 0000:00:1d.7: cache line size of 256 is not supported
>>> [  200.350042] ehci_hcd 0000:00:1d.7: request interrupt 23 failed
>>> [  200.350491] ehci_hcd 0000:00:1d.7: USB bus 1 deregistered
>>> [  200.372257] ehci_hcd 0000:00:1d.7: PCI INT A disabled
>>> [  200.372644] ehci_hcd 0000:00:1d.7: init 0000:00:1d.7 fail, -38
>>> [  200.389916] ehci_hcd: probe of 0000:00:1d.7 failed with error -38
>>
>> Yep. Ingo's testing found that already. Does the patch below fix it ?
>>
>> Thanks,
>>
>> 	tglx
>> ---
>> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
>> index 2f171df..eb3d01d 100644
>> --- a/arch/x86/kernel/apic/io_apic.c
>> +++ b/arch/x86/kernel/apic/io_apic.c
>> @@ -252,11 +252,15 @@ static struct irq_cfg *alloc_irq_and_cfg_at(unsigned int at, int node)
>>  static struct irq_cfg *get_irq_cfg_at(unsigned int at, int node)
>>  {
>>  	int res = irq_alloc_desc_at(at, node);
>> +	struct irq_data *data;
>>  
>>  	if (res < 0 && res != -EEXIST)
>>  		return NULL;
>>  
>> -	return get_irq_chip_data(at);
>> +	data = irq_get_irq_data(at);
>> +	if (res >= 0 && !data->chip_data)
>> +		data->chip_data = alloc_irq_cfg(at, node);
>> +	return data->chip_data;
>>  }
>>  
>>  static int alloc_irq_from(unsigned int from, int node)
> 
> yes, it fixes the problem.
> 
> but can you merge get_irq_cfg_at() and alloc_irq_and_cfg_at() ? 
> it's confusing to let get_...() to do the alloc work.

more:

[   80.725830] ------------[ cut here ]------------
[   80.726176] WARNING: at drivers/pci/intr_remapping.c:67 irq_2_iommu_alloc+0x52/0xdc()
[   80.745935] Hardware name: Sun Fire X4800
[   80.746179] irq_2_iommu!=NULL irq 8
[   80.746460] Modules linked in:
[   80.765852] Pid: 1, comm: swapper Not tainted 2.6.36-rc7-tip-yh-01782-g0d439ac-dirty #161
[   80.766500] Call Trace:
[   80.786032]  [<ffffffff810787a0>] warn_slowpath_common+0x85/0x9d
[   80.786503]  [<ffffffff8107885b>] warn_slowpath_fmt+0x46/0x48
[   80.805801]  [<ffffffff8141c5f2>] ? radix_tree_lookup+0xb/0xd
[   80.806304]  [<ffffffff8145f97c>] irq_2_iommu_alloc+0x52/0xdc
[   80.825786]  [<ffffffff81ccb2cb>] ? _raw_spin_lock_irqsave+0x6d/0x7b
[   80.826291]  [<ffffffff8145fb4d>] ? alloc_irte+0x97/0x168
[   80.845811]  [<ffffffff8145fbce>] alloc_irte+0x118/0x168
[   80.846200]  [<ffffffff810505ec>] setup_ioapic_irq+0x137/0x330
[   80.865804]  [<ffffffff810c3e73>] ? irq_to_desc+0x17/0x19
[   80.866236]  [<ffffffff810c5bcd>] ? irq_get_irq_data+0xe/0x10
[   80.885735]  [<ffffffff81051b42>] io_apic_set_pci_routing+0x119/0x12b
[   80.886229]  [<ffffffff810a5984>] ? debug_check_no_locks_freed+0x113/0x129
[   80.905778]  [<ffffffff8104c800>] mp_register_gsi+0x180/0x191
[   80.906225]  [<ffffffff815060c9>] ? dev_printk+0x45/0x47
[   80.925725]  [<ffffffff8104c85e>] acpi_register_gsi+0x4d/0x5b
[   80.926182]  [<ffffffff814b2d45>] pnpacpi_parse_allocated_irqresource+0xd0/0x107
[   80.945838]  [<ffffffff814b2dd9>] pnpacpi_allocated_resource+0x5d/0x2df
[   80.965584]  [<ffffffff8149c5cf>] ? acpi_rs_get_method_data+0x3b/0x45
[   80.966058]  [<ffffffff814b2d7c>] ? pnpacpi_allocated_resource+0x0/0x2df
[   80.985665]  [<ffffffff8149bc2e>] acpi_walk_resources+0x82/0xd3
[   80.986091]  [<ffffffff814b30ba>] pnpacpi_parse_allocated_resource+0x5f/0x87
[   81.005805]  [<ffffffff827f2e93>] pnpacpi_add_device_handler+0x199/0x220
[   81.025459]  [<ffffffff81494187>] acpi_ns_get_device_callback+0x14a/0x174
[   81.025960]  [<ffffffff81497237>] acpi_ns_walk_namespace+0xc0/0x181
[   81.045481]  [<ffffffff8149403d>] ? acpi_ns_get_device_callback+0x0/0x174
[   81.046027]  [<ffffffff81494026>] acpi_get_devices+0x66/0x7d
[   81.065529]  [<ffffffff827f2cfa>] ? pnpacpi_add_device_handler+0x0/0x220
[   81.085206]  [<ffffffff81477ef0>] ? register_acpi_bus_type+0x75/0x7b
[   81.085667]  [<ffffffff827f2bdd>] ? pnpacpi_init+0x0/0x8c
[   81.105175]  [<ffffffff827f2c3b>] pnpacpi_init+0x5e/0x8c
[   81.105587]  [<ffffffff810002da>] do_one_initcall+0x57/0x135
[   81.125214]  [<ffffffff827bff7a>] kernel_init+0x167/0x1f1
[   81.125633]  [<ffffffff81034954>] kernel_thread_helper+0x4/0x10
[   81.145165]  [<ffffffff81ccbdbc>] ? restore_args+0x0/0x30
[   81.145568]  [<ffffffff827bfe13>] ? kernel_init+0x0/0x1f1
[   81.165084]  [<ffffffff81034950>] ? kernel_thread_helper+0x0/0x10
[   81.165646] ---[ end trace 5003353dd8ff0030 ]---

  reply	other threads:[~2010-10-07  0:18 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-30 23:14 [patch 00/47] Sparse irq rework Thomas Gleixner
2010-09-30 23:14 ` [patch 01/47] x86: Plug memory leak in sparse irq Thomas Gleixner
2010-09-30 23:14 ` [patch 02/47] x86: Hpet: Fix bogus error check in hpet_assign_irq() Thomas Gleixner
2010-09-30 23:14 ` [patch 03/47] genirq: Provide status modifier Thomas Gleixner
2010-09-30 23:14 ` [patch 04/47] arm: Use irq " Thomas Gleixner
2010-09-30 23:14 ` [patch 05/47] genirq-sanitize-irq-data-accessors.patch Thomas Gleixner
2010-09-30 23:15 ` [patch 06/47] genirq: Distangle kernel/irq/handle.c Thomas Gleixner
2010-09-30 23:15 ` [patch 07/47] genirq: Remove early_init_irq_lock_class() Thomas Gleixner
2010-09-30 23:15 ` [patch 08/47] genirq: Move core only inlines to kernel/irq Thomas Gleixner
2010-09-30 23:15 ` [patch 09/47] isdn: hisax: Replace the bogus access to irq stats Thomas Gleixner
2010-09-30 23:15 ` [patch 10/47] genirq: Remove export of kstat_irqs_cpu Thomas Gleixner
2010-09-30 23:15 ` [patch 11/47] genirq: Provide default irq init flags Thomas Gleixner
2010-09-30 23:15 ` [patch 12/47] arm: Use ARCH_IRQ_INIT_FLAGS Thomas Gleixner
2010-09-30 23:15 ` [patch 13/47] powerpc: " Thomas Gleixner
2010-09-30 23:15 ` [patch 14/47] genirq: Implement a sane sparse_irq allocator Thomas Gleixner
2010-10-01  5:28   ` Yinghai Lu
2010-10-01 20:36     ` Thomas Gleixner
2010-09-30 23:15 ` [patch 15/47] genirq: Prepare proc for real sparse irq support Thomas Gleixner
2010-09-30 23:15 ` [patch 16/47] genirq: Implement sane enumeration Thomas Gleixner
2010-10-03 10:55   ` Grant Likely
2010-09-30 23:15 ` [patch 17/47] genirq-update-kerneldoc.patch Thomas Gleixner
2010-09-30 23:16 ` [patch 18/47] genirq: Use sane sparse allocator Thomas Gleixner
2010-09-30 23:16 ` [patch 19/47] genirq: Query arch for number of early descriptors Thomas Gleixner
2010-09-30 23:16 ` [patch 20/47] x86: Remove useless reinitialization of irq descriptors Thomas Gleixner
2010-10-03 15:21   ` Eric W. Biederman
2010-10-03 18:26     ` Thomas Gleixner
2010-09-30 23:16 ` [patch 21/47] x86: Sanitize apb timer interrupt handling Thomas Gleixner
2010-09-30 23:16 ` [patch 22/47] x86: lguest: Convert to new irq chip functions Thomas Gleixner
2010-09-30 23:16 ` [patch 23/47] x86: Cleanup visws interrupt handling Thomas Gleixner
2010-09-30 23:16 ` [patch 24/47] x86: i8259: Convert to new irq_chip functions Thomas Gleixner
2010-09-30 23:16 ` [patch 25/47] x86: Cleanup io_apic Thomas Gleixner
2010-09-30 23:16 ` [patch 26/47] x86: io_apic: Convert startup to new irq_chip function Thomas Gleixner
2010-09-30 23:16 ` [patch 27/47] x86: ioapic: Convert mask " Thomas Gleixner
2010-09-30 23:16 ` [patch 28/47] x86: ioapic/hpet: Convert to new chip functions Thomas Gleixner
2010-09-30 23:16 ` [patch 29/47] pci: Convert msi to new irq_chip functions Thomas Gleixner
2010-10-11 17:09   ` Jesse Barnes
2010-09-30 23:16 ` [patch 30/47] dmar: Convert to new irq chip functions Thomas Gleixner
2010-09-30 23:17 ` [patch 31/47] ht: Convert to new irq_chip functions Thomas Gleixner
2010-09-30 23:17 ` [patch 32/47] x86: ioapic: Clean up the direct access to irq_desc Thomas Gleixner
2010-09-30 23:17 ` [patch 33/47] pci: Cleanup the irq_desc mess in msi Thomas Gleixner
2010-10-11 17:08   ` Jesse Barnes
2010-09-30 23:17 ` [patch 34/47] x86: ioapic: Convert irq affinity to new chip functions Thomas Gleixner
2010-09-30 23:17 ` [patch 35/47] x86: ioapic: Cleanup some more Thomas Gleixner
2010-09-30 23:17 ` [patch 36/47] x86: ioapic: Cleanup sparse irq code Thomas Gleixner
2010-09-30 23:17 ` [patch 37/47] x86: uv: Clean up the direct access to irq_desc Thomas Gleixner
2010-09-30 23:17 ` [patch 38/47] x86: Use sane enumeration Thomas Gleixner
2010-09-30 23:17 ` [patch 39/47] genirq: Remove arch_init_chip_data() Thomas Gleixner
2010-09-30 23:17 ` [patch 40/47] genirq: Sanitize dynamic irq handling Thomas Gleixner
2010-10-01  5:47   ` Yinghai Lu
2010-09-30 23:18 ` [patch 41/47] arm: davinci: Cleanup irq_desc access Thomas Gleixner
2010-09-30 23:18 ` [patch 42/47] genirq: Remove the now unused sparse irq leftovers Thomas Gleixner
2010-09-30 23:18 ` [patch 43/47] x86: xen: Sanitise sparse_irq handling Thomas Gleixner
2010-09-30 23:18 ` [patch 44/47] sh: Sanitize sparse irq Thomas Gleixner
2010-09-30 23:18 ` [patch 45/47] x86: lguest: Use new irq allocator Thomas Gleixner
2010-09-30 23:18 ` [patch 46/47] powerpc: " Thomas Gleixner
2010-10-01  0:42   ` Benjamin Herrenschmidt
2010-10-01 13:07     ` Thomas Gleixner
2010-10-01 20:46       ` Benjamin Herrenschmidt
2010-10-01 21:11         ` Grant Likely
2010-10-01 21:17           ` Benjamin Herrenschmidt
2010-10-03 16:53       ` Eric W. Biederman
2010-10-03 18:34         ` Thomas Gleixner
2010-10-03 20:04           ` Thomas Gleixner
2010-10-03 22:54         ` Benjamin Herrenschmidt
2010-10-04  0:15           ` Eric W. Biederman
2010-10-04  0:37             ` Benjamin Herrenschmidt
2010-10-04 16:46           ` Grant Likely
2010-09-30 23:18 ` [patch 47/47] genirq: Remove the old sparse irq allocator function Thomas Gleixner
2010-10-01  3:32 ` [patch 00/47] Sparse irq rework Linus Torvalds
2010-10-01  5:54 ` Yinghai Lu
2010-10-01 20:35   ` Thomas Gleixner
2010-10-03 11:23 ` Grant Likely
2010-10-03 11:29   ` Russell King - ARM Linux
2010-10-03 11:57     ` Grant Likely
2010-10-03 13:48       ` Thomas Gleixner
2010-10-05 10:22         ` Thomas Gleixner
2010-10-06 22:45           ` Yinghai Lu
2010-10-06 22:52             ` Thomas Gleixner
2010-10-06 23:37               ` Yinghai Lu
2010-10-07  0:16                 ` Yinghai Lu [this message]
2010-10-07  4:01                   ` Thomas Gleixner
2010-10-07  4:38                     ` Yinghai Lu
2010-10-08 21:50                       ` Thomas Gleixner
2010-10-08 21:54                         ` Thomas Gleixner
2010-10-09  4:26                           ` Yinghai Lu
2010-10-09  5:44                             ` Yinghai Lu
2010-10-09  6:34                               ` Thomas Gleixner
2010-10-09  7:08                                 ` Yinghai Lu
2010-10-09  7:08                                   ` Yinghai Lu
2010-10-09 12:08                                   ` Thomas Gleixner
2010-10-10  9:32                                   ` Thomas Gleixner
2010-10-10 13:30                                     ` Anca Emanuel
2010-10-11  2:20                                     ` Yinghai Lu
2010-10-11  2:20                                       ` Yinghai Lu
2010-10-11  3:50                                     ` Yinghai Lu
2010-10-11  3:50                                       ` Yinghai Lu
2010-10-11  8:16                                       ` Thomas Gleixner
2010-10-11 11:34                                         ` Benjamin Herrenschmidt
2010-10-11 16:19                                         ` Yinghai Lu
2010-10-11 16:19                                           ` Yinghai Lu
2010-10-12 20:23                               ` [tip:irq/core] x86: Don't setup ioapic irq for sci twice tip-bot for Yinghai Lu
2010-10-09  6:10                             ` [patch 00/47] Sparse irq rework Thomas Gleixner
2010-10-09  7:03                               ` Yinghai Lu
2010-10-09 12:12                                 ` Thomas Gleixner
2010-10-10  2:32                                   ` Yinghai Lu
2010-10-10  2:32                                     ` Yinghai Lu
2010-10-10  5:11                                   ` Yinghai Lu
2010-10-10  5:11                                     ` Yinghai Lu
2010-10-10  8:20                                     ` Thomas Gleixner
2010-10-03 16:41 ` Eric W. Biederman
2010-10-03 16:41   ` Eric W. Biederman
2010-10-03 19:16   ` Thomas Gleixner
2010-10-03 22:57     ` Benjamin Herrenschmidt
2010-10-04 16:31       ` Grant Likely
2010-10-04  0:49     ` Eric W. Biederman
2010-10-04  8:05       ` Thomas Gleixner
2010-10-04  1:13     ` Eric W. Biederman
2010-10-04  6:36       ` Ingo Molnar

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=4CAD1154.3080403@kernel.org \
    --to=yinghai@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=dwmw2@infradead.org \
    --cc=ebiederm@xmission.com \
    --cc=grant.likely@secretlab.ca \
    --cc=jbarnes@virtuousgeek.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@osdl.org \
    --cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.