intel / edison-linux

Other
48 stars 48 forks source link

Boot irq warning #8

Closed agherzan closed 8 years ago

agherzan commented 8 years ago

Using current head of 3.19 WIP branch I always get the following warning when booting my edison:

[    2.213782] Driver 'mmcblk' needs updating - please use bus_type methods
[    2.213879] sdhci: Secure Digital Host Controller Interface driver
[    2.213894] sdhci: Copyright(c) Pierre Ossman
[    2.213997] sdhci-pci 0000:00:01.0: SDHCI controller found [8086:1190] (rev 1)
[    2.214050] ------------[ cut here ]------------
[    2.214085] WARNING: CPU: 1 PID: 1 at /home/andrei/work/resin/resin-edison/build/tmp/work-shared/edison/kernel-source/kernel/irq/irqdomain.c:284 irq_domain_associate+0x1a3/0x200()
[    2.214100] error: virq0 is already associated
[    2.214111] Modules linked in:

[    2.214142] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.19.5-yocto-standard #1
[    2.214156] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 466 2014.06.23:19.20.05
[    2.214169]  00000000 00000000 f6e0fc00 c19f08d7 f6e0fc40 f6e0fc30 c1253157 c1c24014
[    2.214219]  f6e0fc5c 00000001 c1c23f40 0000011c c12a4563 c12a4563 f6c05e00 f675e480
[    2.214267]  00000000 f6e0fc48 c12531c3 00000009 f6e0fc40 c1c24014 f6e0fc5c f6e0fc7c
[    2.214314] Call Trace:
[    2.214349]  [<c19f08d7>] dump_stack+0x4b/0x75
[    2.214375]  [<c1253157>] warn_slowpath_common+0x87/0xc0
[    2.214402]  [<c12a4563>] ? irq_domain_associate+0x1a3/0x200
[    2.214426]  [<c12a4563>] ? irq_domain_associate+0x1a3/0x200
[    2.214449]  [<c12531c3>] warn_slowpath_fmt+0x33/0x40
[    2.214475]  [<c12a4563>] irq_domain_associate+0x1a3/0x200
[    2.214502]  [<c12a45ff>] irq_domain_associate_many+0x3f/0xa0
[    2.214528]  [<c19f559d>] ? mutex_unlock+0xd/0x10
[    2.214551]  [<c19ecb88>] ? __irq_alloc_descs+0xe8/0x1b0
[    2.214578]  [<c12a46a2>] irq_create_strict_mappings+0x42/0x50
[    2.214605]  [<c12338fa>] mp_map_pin_to_irq+0x1ca/0x200
[    2.214631]  [<c1233f40>] mp_map_gsi_to_irq+0x90/0xc0
[    2.214658]  [<c184fb59>] intel_mid_pci_irq_enable+0x59/0x80
[    2.214683]  [<c1850390>] pcibios_enable_device+0x30/0x40
[    2.214708]  [<c1618f6f>] do_pci_enable_device+0x4f/0xd0
[    2.214732]  [<c1619e4d>] pci_enable_device_flags+0x9d/0xe0
[    2.214757]  [<c1619ee2>] pci_enable_device+0x12/0x20
[    2.214782]  [<c17dc4b2>] sdhci_pci_probe+0xd2/0x950
[    2.214810]  [<c161bb5f>] pci_device_probe+0x6f/0xd0
[    2.214834]  [<c13ba2a5>] ? sysfs_create_link+0x25/0x50
[    2.214860]  [<c16ada0f>] driver_probe_device+0x7f/0x3c0
[    2.214885]  [<c161ba92>] ? pci_match_device+0xd2/0x100
[    2.214910]  [<c16ade09>] __driver_attach+0x79/0x80
[    2.214933]  [<c16add90>] ? __device_attach+0x40/0x40
[    2.214955]  [<c16abdaf>] bus_for_each_dev+0x4f/0x80
[    2.214979]  [<c16ad51e>] driver_attach+0x1e/0x20
[    2.215001]  [<c16add90>] ? __device_attach+0x40/0x40
[    2.215024]  [<c16ad157>] bus_add_driver+0x157/0x240
[    2.215049]  [<c1e01c8f>] ? sdhci_drv_init+0x1b/0x1b
[    2.215072]  [<c1e01c8f>] ? sdhci_drv_init+0x1b/0x1b
[    2.215095]  [<c16ae56d>] driver_register+0x5d/0xf0
[    2.215119]  [<c1351cce>] ? kfree+0x9e/0x1d0
[    2.215144]  [<c15eb7d0>] ? kvasprintf+0x40/0x50
[    2.215168]  [<c161ab9a>] __pci_register_driver+0x4a/0x50
[    2.215192]  [<c1e01ca3>] sdhci_driver_init+0x14/0x16
[    2.215216]  [<c120044a>] do_one_initcall+0xaa/0x1e0
[    2.215239]  [<c1e01c8f>] ? sdhci_drv_init+0x1b/0x1b
[    2.215263]  [<c1dcc4e3>] ? repair_env_string+0x12/0x54
[    2.215288]  [<c126d0a9>] ? parse_args+0x299/0x510
[    2.215317]  [<c1dccbeb>] kernel_init_freeable+0x147/0x1ef
[    2.215345]  [<c1273a63>] ? preempt_count_sub+0xb3/0x110
[    2.215368]  [<c127262d>] ? finish_task_switch+0x5d/0xd0
[    2.215392]  [<c19eb630>] kernel_init+0x10/0xe0
[    2.215415]  [<c19f7441>] ret_from_kernel_thread+0x21/0x30
[    2.215436]  [<c19eb620>] ? rest_init+0x80/0x80
[    2.215476] ---[ end trace 96410e869c63de19 ]---
[    2.215566] flis_addr mapped addr: f8498900
[    2.215694] sdhci-pci 0000:00:01.0: rte_addr mapped addr: f849c000
[    2.317076] mmc0: BKOPS_EN bit is not set
[    2.324368] mmc0: new HS200 MMC card at address 0001
[    2.325192] mmcblk0: mmc0:0001 H4G1d 3.64 GiB 
[    2.332236]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11
[    2.337906] mmc0: SDHCI controller on PCI [0000:00:01.0] using ADMA

Regards, Andrei

zhenmingx commented 8 years ago

This issue is caused by re-enable duplicate APIC IRQ number which is sharing same irqdomain with SDHCI PCI, so association with this irqdomain has already been created, not necessary to associate again. That's not big issue for normal running. Close it now.

agherzan commented 8 years ago

So the resolution is won't fix?

andy-shev commented 8 years ago

Look into upstream solution for this issue as well: http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=x86/platform&id=bb27570525a71f48347ed0e0c265063e7952bb61

agherzan commented 8 years ago

Yes, I was aware of this workaround. But don't understand why was this issue closed.

andy-shev commented 8 years ago

I have no idea.

zhenmingx commented 8 years ago

Very thankful for Linux member's support. Very welcome to author and introduction of appliable patches from Linux Community. Sorry to my last brief comments.

First of all, the patch mentioned is good for workaround, though not very compatible with our codebase(Linux 3.19.5). In the codebase before this patch from Andy-shev's, it will fail to enable other PCI devices using IRQ0, that was a serious problem on a BIOS platform and need Message Bus work.

But in our codebase, it processes OK, no reaction of fail path as return, probe&init process works OK, just report a warn to avoid repeated association and continue the process. And we could let it be ease because it is not from MP interrupt source record, so this device is still wokring in our codebase, only cause one newed IRQ description struct alone.. and our platform don't need BIOS and MBI function work,

And like the description of this issue, currently no related functional or side-effect problems have reported, and I don't have enough time to dig deeply enough to kill it from the root for this kind of warning issues, so I recommend ignore it until if a new opened issue could be related to this issue.

andy-shev commented 8 years ago

Basically the issue is in firmware which assigns resources (IRQ) wrongly in PCI config space. PCI specification doesn't allow interrupt to be enabled and be 0. So, eMMC0 shouldn't use IRQ0 in the first place. Second issue is so called "global configuration space for HS UART" which by some reason is represented as PCI device (00:04.0).

P.S. I'm sorry I didn't get how mentioned patch from the upstream makes MailBox not working. MBI, as far as I know, doesn't require any interrupt and thus just work w/o it. Ah, you don't use it at all.