diff mbox

[v4.5-rc3,REGRESSION] rcar_sound-related WARN_ON()

Message ID 878u2ito0b.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State Not Applicable
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Kuninori Morimoto Feb. 18, 2016, 8:39 a.m. UTC
Hi Geert

> > [   59.144598] irq 311: nobody cared (try booting with the "irqpoll" option)
> > [   59.151419] CPU: 0 PID: 410 Comm: irq/311-da9210 Not tainted 4.5.0-rc3-02009-g83c516e #612
> 
> Ugh, the da9210 interrupt.
> 
> That probably means an event was set that isn't handled by
> da9210_irq_handler().
> 
> Is it reproducible? If yes, can you please print val in the !handled case?
> Thanks!

I tried this patch, but It didn't use this printk().
Am I wrong ?

-------------
---------

Comments

Geert Uytterhoeven Feb. 18, 2016, 8:43 a.m. UTC | #1
Hi Morimoto-san,

On Thu, Feb 18, 2016 at 9:39 AM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
>> > [   59.144598] irq 311: nobody cared (try booting with the "irqpoll" option)
>> > [   59.151419] CPU: 0 PID: 410 Comm: irq/311-da9210 Not tainted 4.5.0-rc3-02009-g83c516e #612
>>
>> Ugh, the da9210 interrupt.
>>
>> That probably means an event was set that isn't handled by
>> da9210_irq_handler().
>>
>> Is it reproducible? If yes, can you please print val in the !handled case?
>> Thanks!
>
> I tried this patch, but It didn't use this printk().
> Am I wrong ?
>
> -------------
> diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c
> index 01c0e37..85c1166 100644
> --- a/drivers/regulator/da9210-regulator.c
> +++ b/drivers/regulator/da9210-regulator.c
> @@ -167,6 +167,8 @@ static irqreturn_t da9210_irq_handler(int irq, void *data)
>                         goto error_i2c;
>
>                 ret = IRQ_HANDLED;
> +       } else if (val != handled) {
> +               printk("---val %x : %x\n", val, handled);
>         }

That's what I meant.
Do you still see the "irq 311: nobody cared"?
Do you have the DA9210 driver enabled?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Kuninori Morimoto Feb. 18, 2016, 8:56 a.m. UTC | #2
Hi Geert

> > I tried this patch, but It didn't use this printk().
> > Am I wrong ?
> >
> > -------------
> > diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c
> > index 01c0e37..85c1166 100644
> > --- a/drivers/regulator/da9210-regulator.c
> > +++ b/drivers/regulator/da9210-regulator.c
> > @@ -167,6 +167,8 @@ static irqreturn_t da9210_irq_handler(int irq, void *data)
> >                         goto error_i2c;
> >
> >                 ret = IRQ_HANDLED;
> > +       } else if (val != handled) {
> > +               printk("---val %x : %x\n", val, handled);
> >         }
> 
> That's what I meant.
> Do you still see the "irq 311: nobody cared"?
> Do you have the DA9210 driver enabled?

My .config

	> grep DA9210 .config
	CONFIG_REGULATOR_DA9210=y

My kernel log has this

	   ...
	   [    2.624405] NET: Registered protocol family 17
	   [    2.628934] Registering SWP/SWPB emulation handler
	=> [    2.634141] da9210 7-0068: I2C error : -6
	   [    2.636604] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
	   [    2.636606] [drm] No driver support for vblan
	   ...

And Yes, I still have "irq 311: nobody cared" panic after few second from boot
Kuninori Morimoto Feb. 18, 2016, 9:01 a.m. UTC | #3
Hi Geert, again

> > > I tried this patch, but It didn't use this printk().
> > > Am I wrong ?
> > >
> > > -------------
> > > diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c
> > > index 01c0e37..85c1166 100644
> > > --- a/drivers/regulator/da9210-regulator.c
> > > +++ b/drivers/regulator/da9210-regulator.c
> > > @@ -167,6 +167,8 @@ static irqreturn_t da9210_irq_handler(int irq, void *data)
> > >                         goto error_i2c;
> > >
> > >                 ret = IRQ_HANDLED;
> > > +       } else if (val != handled) {
> > > +               printk("---val %x : %x\n", val, handled);
> > >         }
> > 
> > That's what I meant.
> > Do you still see the "irq 311: nobody cared"?
> > Do you have the DA9210 driver enabled?

You can reproduce it by

	> git checkout git checkout renesas-drivers-2016-02-09-v4.5-rc3
	> cp ${Laurent's .config} ${LINUX}

and boot, and wait few second


----- log -------
...
[    2.625828] NET: Registered protocol family 17
[    2.630356] Registering SWP/SWPB emulation handler
[    2.635580] da9210 7-0068: I2C error : -6
[    2.637960] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.637963] [drm] No driver support for vblank timestamp query.
[    2.638840] [drm] Initialized rcar-du 1.0.0 20130110 on minor 0
[    2.640235] input: keyboard as /devices/platform/keyboard/input/input0
[    2.640559] hctosys: unable to open rtc device (rtc0)
[    2.727737] Micrel KSZ8041RNLI ee700000.etherne:01: attached PHY driver [Micrel KSZ8041RNLI] (mii_bus:phy_addr=ee700000.etherne:01, irq=312)
[    3.122720] random: nonblocking pool is initialized
[    5.557550] sh-eth ee700000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    5.595876] Sending DHCP requests ., OK
[    5.705886] IP-Config: Got DHCP answer from 192.168.10.77, my address is 192.168.10.107
[    5.713983] IP-Config: Complete:
[    5.717234]      device=eth0, hwaddr=2e:09:0a:00:6e:3a, ipaddr=192.168.10.107, mask=255.255.255.0, gw=192.168.10.77
[    5.727689]      host=192.168.10.107, domain=example.org, nis-domain=(none)
[    5.734656]      bootserver=192.168.10.77, rootserver=192.168.10.77, rootpath=/tftpboot/rootfs_arm     nameserver0=192.168.10.77
[    5.746285] SDHI0 Vcc: disabling
[    5.749518] SDHI2 Vcc: disabling
[    5.752749] SDHI0 VccQ: disabling
[    5.756079] SDHI2 VccQ: disabling
[    5.759857] sh-sci e6e60000.serial: dma_request_slave_channel_compat failed
[    5.766852] sh-sci e6e60000.serial: dma_request_slave_channel_compat failed
[    5.779229] VFS: Mounted root (nfs filesystem) on device 0:15.
[    5.785554] devtmpfs: mounted
[    5.789837] Freeing unused kernel memory: 2048K (c0a00000 - c0c00000)
Starting logging: OK
Initializing random number generator... done.
Starting network...
ip: RTNETLINK answers: File exists
# 
# 
# 
# 
# [   59.014541] irq 311: nobody cared (try booting with the "irqpoll" option)
[   59.021353] CPU: 0 PID: 411 Comm: irq/311-da9210 Not tainted 4.5.0-rc3-01980-ga34785b-dirty #620
[   59.030150] Hardware name: Generic R8A7790 (Flattened Device Tree)
[   59.036333] Backtrace: 
[   59.038808] [<c020c890>] (dump_backtrace) from [<c020cabc>] (show_stack+0x20/0x24)
[   59.046386]  r7:00000137 r6:60000193 r5:c0c1d96c r4:00000000
[   59.052094] [<c020ca9c>] (show_stack) from [<c03e9e00>] (dump_stack+0xa0/0xb4)
[   59.059333] [<c03e9d60>] (dump_stack) from [<c026ec94>] (__report_bad_irq+0x38/0xd0)
[   59.067084]  r7:00000137 r6:00000137 r5:00000000 r4:e9999d00
[   59.072788] [<c026ec5c>] (__report_bad_irq) from [<c026f0c4>] (note_interrupt+0x280/0x2d0)
[   59.081060]  r7:00000137 r6:00000137 r5:00000000 r4:e9999d00
[   59.086763] [<c026ee44>] (note_interrupt) from [<c026c138>] (handle_irq_event_percpu+0x1d0/0x238)
[   59.095644]  r10:00002088 r9:00000002 r8:e99f6000 r7:00000002 r6:00000137 r5:e9999d60
[   59.103526]  r4:00000000 r3:00000000
[   59.107126] [<c026bf68>] (handle_irq_event_percpu) from [<c026c20c>] (handle_irq_event+0x6c/0x90)
[   59.116005]  r10:00000000 r9:00000000 r8:f0852000 r7:ea1a9600 r6:ea1a9620 r5:e9999d60
[   59.123887]  r4:e9999d00
[   59.126434] [<c026c1a0>] (handle_irq_event) from [<c026f8d4>] (handle_level_irq+0xb0/0x15c)
[   59.134793]  r7:ea1a9600 r6:ea1a9620 r5:e9999d10 r4:e9999d00
[   59.140492] [<c026f824>] (handle_level_irq) from [<c026b58c>] (generic_handle_irq+0x34/0x44)
[   59.148938]  r5:c0c3ab60 r4:00000004
[   59.152537] [<c026b558>] (generic_handle_irq) from [<c040c54c>] (irqc_irq_handler+0x7c/0xac)
[   59.160986] [<c040c4d0>] (irqc_irq_handler) from [<c026bfdc>] (handle_irq_event_percpu+0x74/0x238)
[   59.169953]  r9:00000000 r8:e99f6000 r7:00000000 r6:00000020 r5:ea268ca0 r4:ea2699c0
[   59.177753] [<c026bf68>] (handle_irq_event_percpu) from [<c026c20c>] (handle_irq_event+0x6c/0x90)
[   59.186633]  r10:c026d32c r9:f0803000 r8:ea00a800 r7:00000000 r6:00000000 r5:ea268ca0
[   59.194516]  r4:ea268c40
[   59.197063] [<c026c1a0>] (handle_irq_event) from [<c026fa44>] (handle_fasteoi_irq+0xc4/0x1bc)
[   59.205595]  r7:00000000 r6:00000000 r5:c0c02d10 r4:ea268c40
[   59.211296] [<c026f980>] (handle_fasteoi_irq) from [<c026b58c>] (generic_handle_irq+0x34/0x44)
[   59.219915]  r7:00000000 r6:00000000 r5:00000020 r4:c0a61228
[   59.225617] [<c026b558>] (generic_handle_irq) from [<c026b8c0>] (__handle_domain_irq+0x6c/0xc4)
[   59.234327] [<c026b854>] (__handle_domain_irq) from [<c02014c4>] (gic_handle_irq+0x58/0x98)
[   59.242686]  r9:f0803000 r8:f0802000 r7:e99f7e80 r6:f080200c r5:c0c02d10 r4:c0c1dc58
[   59.250484] [<c020146c>] (gic_handle_irq) from [<c020d680>] (__irq_svc+0x40/0x54)
[   59.257975] Exception stack(0xe99f7e80 to 0xe99f7ec8)
[   59.263032] 7e80: e9999d78 60000013 00000001 000085ef e9999d78 60000013 00000003 00000001
[   59.271220] 7ea0: 00000000 e9827fc0 c026d32c e99f7edc e99f7ee0 e99f7ed0 c025fd90 c064397c
[   59.279406] 7ec0: 60000013 ffffffff
[   59.282896]  r9:e9827fc0 r8:00000000 r7:e99f7eb4 r6:ffffffff r5:60000013 r4:c064397c
[   59.290704] [<c064394c>] (_raw_spin_unlock_irqrestore) from [<c025fd90>] (__wake_up+0x54/0x5c)
[   59.299329] [<c025fd3c>] (__wake_up) from [<c026d4b0>] (wake_threads_waitq+0x50/0x54)
[   59.307167]  r8:e9999d00 r7:c026d660 r6:e9827fe4 r5:00000000 r4:e99f6000
[   59.313920] [<c026d460>] (wake_threads_waitq) from [<c026d71c>] (irq_thread+0x1a8/0x264)
[   59.322024] [<c026d574>] (irq_thread) from [<c0240a4c>] (kthread+0xf8/0x114)
[   59.329076]  r10:00000000 r9:00000000 r8:00000000 r7:c026d574 r6:e9827fc0 r5:e99a6fc0
[   59.336958]  r4:00000000
[   59.339506] [<c0240954>] (kthread) from [<c0208ba8>] (ret_from_fork+0x14/0x2c)
[   59.346735]  r7:00000000 r6:00000000 r5:c0240954 r4:e99a6fc0
[   59.352433] handlers:
[   59.354710] [<c026c230>] irq_default_primary_handler threaded [<c0454810>] da9210_irq_handler
[   59.363268] Disabling IRQ #311
-------------
Geert Uytterhoeven Feb. 18, 2016, 9:17 a.m. UTC | #4
Hi Morimoto-san,

On Thu, Feb 18, 2016 at 10:01 AM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
>> > > I tried this patch, but It didn't use this printk().
>> > > Am I wrong ?
>> > >
>> > > -------------
>> > > diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c
>> > > index 01c0e37..85c1166 100644
>> > > --- a/drivers/regulator/da9210-regulator.c
>> > > +++ b/drivers/regulator/da9210-regulator.c
>> > > @@ -167,6 +167,8 @@ static irqreturn_t da9210_irq_handler(int irq, void *data)
>> > >                         goto error_i2c;
>> > >
>> > >                 ret = IRQ_HANDLED;
>> > > +       } else if (val != handled) {
>> > > +               printk("---val %x : %x\n", val, handled);
>> > >         }
>> >
>> > That's what I meant.
>> > Do you still see the "irq 311: nobody cared"?
>> > Do you have the DA9210 driver enabled?
>
> You can reproduce it by
>
>         > git checkout git checkout renesas-drivers-2016-02-09-v4.5-rc3
>         > cp ${Laurent's .config} ${LINUX}

I don't have Laurent's config, and only remote access to Lager.

> and boot, and wait few second

Da9210 and da9063 share the same interrupt. Perhaps da9063 is keeping
the interrupt line asserted?

Do you have the DA9063 driver enabled?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Laurent Pinchart Feb. 18, 2016, 3:33 p.m. UTC | #5
Hi Geert,

On Thursday 18 February 2016 10:17:16 Geert Uytterhoeven wrote:
> On Thu, Feb 18, 2016 at 10:01 AM, Kuninori Morimoto wrote:
> >>>> I tried this patch, but It didn't use this printk().
> >>>> Am I wrong ?
> >>>> 
> >>>> -------------
> >>>> diff --git a/drivers/regulator/da9210-regulator.c
> >>>> b/drivers/regulator/da9210-regulator.c index 01c0e37..85c1166 100644
> >>>> --- a/drivers/regulator/da9210-regulator.c
> >>>> +++ b/drivers/regulator/da9210-regulator.c
> >>>> @@ -167,6 +167,8 @@ static irqreturn_t da9210_irq_handler(int irq,
> >>>> void *data)
> >>>>                         goto error_i2c;
> >>>>                 
> >>>>                 ret = IRQ_HANDLED;
> >>>> +       } else if (val != handled) {
> >>>> +               printk("---val %x : %x\n", val, handled);
> >>>>         }
> >>> 
> >>> That's what I meant.
> >>> Do you still see the "irq 311: nobody cared"?
> >>> Do you have the DA9210 driver enabled?
> > 
> > You can reproduce it by
> > 
> >         > git checkout git checkout renesas-drivers-2016-02-09-v4.5-rc3
> >         > cp ${Laurent's .config} ${LINUX}
> 
> I don't have Laurent's config, and only remote access to Lager.
> 
> > and boot, and wait few second
> 
> Da9210 and da9063 share the same interrupt. Perhaps da9063 is keeping
> the interrupt line asserted?
> 
> Do you have the DA9063 driver enabled?

I had CONFIG_REGULATOR_DA9210 enabled but CONFIG_REGULATOR_DA9063 disabled. 
After enabling CONFIG_REGULATOR_DA9063 the unhandled interrupt problem goes 
away.

I however got the following different (and totally unrelated as far as I can 
see) warning once:

[  310.252577] ------------[ cut here ]------------
[  310.257226] WARNING: CPU: 3 PID: 608 at 
/home/laurent/src/iob/renesas/linux/net/ipv4/af_inet.c:155 
inet_sock_destruct+0x188/0x1d8()
[  310.269088] Modules linked in: mmc_block rcar_jpu v4l2_mem2mem sata_rcar 
libata rcar_vin scsi_mod sh_mobile_sdhi soc_camera sh_mmcif tmio_mmc_core 
soc_mediabus mmc_core videobuf_core soc_scale_crop(Pa
[  310.294680] CPU: 3 PID: 608 Comm: kworker/3:1H Tainted: P                
4.5.0-rc3-00463-gd57d2d31ebee #581
[  310.304431] Hardware name: Generic R8A7790 (Flattened Device Tree)
[  310.310625] Workqueue: rpciod xprt_autoclose
[  310.314908] Backtrace: 
[  310.317380] [<c0014c38>] (dump_backtrace) from [<c0014f50>] 
(show_stack+0x20/0x24)
[  310.324959]  r6:c05be48c r5:00000000 r4:60000013 r3:e9a62000
[  310.330669] [<c0014f30>] (show_stack) from [<c01ed99c>] 
(dump_stack+0x8c/0xac)
[  310.337906] [<c01ed910>] (dump_stack) from [<c002aab0>] 
(warn_slowpath_common+0x88/0xc4)
[  310.346006]  r5:0000009b r4:00000000
[  310.349606] [<c002aa28>] (warn_slowpath_common) from [<c002ab18>] 
(warn_slowpath_null+0x2c/0x34)
[  310.358400]  r8:e9a248d8 r7:ea375364 r6:e9a248c4 r5:e9a248d8 r4:e9a247c0
[  310.365156] [<c002aaec>] (warn_slowpath_null) from [<c0405d24>] 
(inet_sock_destruct+0x188/0x1d8)
[  310.373958] [<c0405b9c>] (inet_sock_destruct) from [<c038a2e8>] 
(sk_destruct+0x28/0x118)
[  310.382057]  r6:e9d593c0 r5:e9a248d8 r4:e9a247c0 r3:c0405b9c
[  310.387763] [<c038a2c0>] (sk_destruct) from [<c038a40c>] 
(__sk_free+0x34/0xc0)
[  310.394994]  r5:e9a248d8 r4:e9a247c0
[  310.398595] [<c038a3d8>] (__sk_free) from [<c038a56c>] (sk_free+0x44/0x48)
[  310.405474]  r4:e9a247c0 r3:e9a2486c
[  310.409074] [<c038a528>] (sk_free) from [<c038a6ac>] 
(sk_common_release+0xf0/0xfc)
[  310.416662] [<c038a5bc>] (sk_common_release) from [<c03f79d8>] 
(udp_lib_close+0x10/0x14)
[  310.424761]  r5:e9d593c0 r4:e9a247c0
[  310.428367] [<c03f79c8>] (udp_lib_close) from [<c0405a6c>] 
(inet_release+0x54/0x80)
[  310.436041] [<c0405a18>] (inet_release) from [<c0384914>] 
(sock_release+0x30/0xac)
[  310.443620]  r5:00000000 r4:e9d593c0
[  310.447224] [<c03848e4>] (sock_release) from [<c0428960>] 
(xs_reset_transport+0xc4/0x138)
[  310.455411]  r5:e9a247c0 r4:ea375000
[  310.459012] [<c042889c>] (xs_reset_transport) from [<c04289f0>] 
(xs_close+0x1c/0x30)
[  310.466764]  r8:ff7c4300 r7:ea375228 r6:ea375000 r5:ea375278 r4:ea375000 
r3:c04289d4
[  310.474568] [<c04289d4>] (xs_close) from [<c0425de8>] 
(xprt_autoclose+0x40/0x74)
[  310.481972]  r4:ea375244 r3:c04289d4
[  310.485579] [<c0425da8>] (xprt_autoclose) from [<c004256c>] 
(process_one_work+0x170/0x430)
[  310.493853]  r7:c06a4878 r6:e876da00 r5:ea282880 r4:ea375244
[  310.499558] [<c00423fc>] (process_one_work) from [<c00428b0>] 
(worker_thread+0x3c/0x55c)
[  310.507658]  r10:e876da00 r9:c0660100 r8:00000008 r7:ea282898 r6:e876da18 
r5:e876da00
[  310.515544]  r4:ea282880
[  310.518096] [<c0042874>] (worker_thread) from [<c004893c>] 
(kthread+0xf4/0x114)
[  310.525414]  r10:00000000 r9:00000000 r8:00000000 r7:c0042874 r6:ea282880 
r5:00000000
[  310.533301]  r4:e9948d80
[  310.535850] [<c0048848>] (kthread) from [<c00119e8>] 
(ret_from_fork+0x14/0x2c)
[  310.543081]  r7:00000000 r6:00000000 r5:c0048848 r4:e9948d80
[  310.548803] ---[ end trace 02711a72b6e0a70c ]---
Magnus Damm Feb. 18, 2016, 4:02 p.m. UTC | #6
Hi Laurent,

On Fri, Feb 19, 2016 at 12:33 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Geert,
>
> On Thursday 18 February 2016 10:17:16 Geert Uytterhoeven wrote:
>> On Thu, Feb 18, 2016 at 10:01 AM, Kuninori Morimoto wrote:
>> >>>> I tried this patch, but It didn't use this printk().
>> >>>> Am I wrong ?
>> >>>>
>> >>>> -------------
>> >>>> diff --git a/drivers/regulator/da9210-regulator.c
>> >>>> b/drivers/regulator/da9210-regulator.c index 01c0e37..85c1166 100644
>> >>>> --- a/drivers/regulator/da9210-regulator.c
>> >>>> +++ b/drivers/regulator/da9210-regulator.c
>> >>>> @@ -167,6 +167,8 @@ static irqreturn_t da9210_irq_handler(int irq,
>> >>>> void *data)
>> >>>>                         goto error_i2c;
>> >>>>
>> >>>>                 ret = IRQ_HANDLED;
>> >>>> +       } else if (val != handled) {
>> >>>> +               printk("---val %x : %x\n", val, handled);
>> >>>>         }
>> >>>
>> >>> That's what I meant.
>> >>> Do you still see the "irq 311: nobody cared"?
>> >>> Do you have the DA9210 driver enabled?
>> >
>> > You can reproduce it by
>> >
>> >         > git checkout git checkout renesas-drivers-2016-02-09-v4.5-rc3
>> >         > cp ${Laurent's .config} ${LINUX}
>>
>> I don't have Laurent's config, and only remote access to Lager.
>>
>> > and boot, and wait few second
>>
>> Da9210 and da9063 share the same interrupt. Perhaps da9063 is keeping
>> the interrupt line asserted?
>>
>> Do you have the DA9063 driver enabled?
>
> I had CONFIG_REGULATOR_DA9210 enabled but CONFIG_REGULATOR_DA9063 disabled.
> After enabling CONFIG_REGULATOR_DA9063 the unhandled interrupt problem goes
> away.
>
> I however got the following different (and totally unrelated as far as I can
> see) warning once:
>
> [  310.252577] ------------[ cut here ]------------
> [  310.257226] WARNING: CPU: 3 PID: 608 at
> /home/laurent/src/iob/renesas/linux/net/ipv4/af_inet.c:155
> inet_sock_destruct+0x188/0x1d8()
> [  310.269088] Modules linked in: mmc_block rcar_jpu v4l2_mem2mem sata_rcar
> libata rcar_vin scsi_mod sh_mobile_sdhi soc_camera sh_mmcif tmio_mmc_core
> soc_mediabus mmc_core videobuf_core soc_scale_crop(Pa
> [  310.294680] CPU: 3 PID: 608 Comm: kworker/3:1H Tainted: P
> 4.5.0-rc3-00463-gd57d2d31ebee #581
> [  310.304431] Hardware name: Generic R8A7790 (Flattened Device Tree)
> [  310.310625] Workqueue: rpciod xprt_autoclose
> [  310.314908] Backtrace:
> [  310.317380] [<c0014c38>] (dump_backtrace) from [<c0014f50>]
> (show_stack+0x20/0x24)
> [  310.324959]  r6:c05be48c r5:00000000 r4:60000013 r3:e9a62000
> [  310.330669] [<c0014f30>] (show_stack) from [<c01ed99c>]
> (dump_stack+0x8c/0xac)
> [  310.337906] [<c01ed910>] (dump_stack) from [<c002aab0>]
> (warn_slowpath_common+0x88/0xc4)
> [  310.346006]  r5:0000009b r4:00000000
> [  310.349606] [<c002aa28>] (warn_slowpath_common) from [<c002ab18>]
> (warn_slowpath_null+0x2c/0x34)
> [  310.358400]  r8:e9a248d8 r7:ea375364 r6:e9a248c4 r5:e9a248d8 r4:e9a247c0
> [  310.365156] [<c002aaec>] (warn_slowpath_null) from [<c0405d24>]
> (inet_sock_destruct+0x188/0x1d8)
> [  310.373958] [<c0405b9c>] (inet_sock_destruct) from [<c038a2e8>]
> (sk_destruct+0x28/0x118)
> [  310.382057]  r6:e9d593c0 r5:e9a248d8 r4:e9a247c0 r3:c0405b9c
> [  310.387763] [<c038a2c0>] (sk_destruct) from [<c038a40c>]
> (__sk_free+0x34/0xc0)
> [  310.394994]  r5:e9a248d8 r4:e9a247c0
> [  310.398595] [<c038a3d8>] (__sk_free) from [<c038a56c>] (sk_free+0x44/0x48)
> [  310.405474]  r4:e9a247c0 r3:e9a2486c
> [  310.409074] [<c038a528>] (sk_free) from [<c038a6ac>]
> (sk_common_release+0xf0/0xfc)
> [  310.416662] [<c038a5bc>] (sk_common_release) from [<c03f79d8>]
> (udp_lib_close+0x10/0x14)
> [  310.424761]  r5:e9d593c0 r4:e9a247c0
> [  310.428367] [<c03f79c8>] (udp_lib_close) from [<c0405a6c>]
> (inet_release+0x54/0x80)
> [  310.436041] [<c0405a18>] (inet_release) from [<c0384914>]
> (sock_release+0x30/0xac)
> [  310.443620]  r5:00000000 r4:e9d593c0
> [  310.447224] [<c03848e4>] (sock_release) from [<c0428960>]
> (xs_reset_transport+0xc4/0x138)
> [  310.455411]  r5:e9a247c0 r4:ea375000
> [  310.459012] [<c042889c>] (xs_reset_transport) from [<c04289f0>]
> (xs_close+0x1c/0x30)
> [  310.466764]  r8:ff7c4300 r7:ea375228 r6:ea375000 r5:ea375278 r4:ea375000
> r3:c04289d4
> [  310.474568] [<c04289d4>] (xs_close) from [<c0425de8>]
> (xprt_autoclose+0x40/0x74)
> [  310.481972]  r4:ea375244 r3:c04289d4
> [  310.485579] [<c0425da8>] (xprt_autoclose) from [<c004256c>]
> (process_one_work+0x170/0x430)
> [  310.493853]  r7:c06a4878 r6:e876da00 r5:ea282880 r4:ea375244
> [  310.499558] [<c00423fc>] (process_one_work) from [<c00428b0>]
> (worker_thread+0x3c/0x55c)
> [  310.507658]  r10:e876da00 r9:c0660100 r8:00000008 r7:ea282898 r6:e876da18
> r5:e876da00
> [  310.515544]  r4:ea282880
> [  310.518096] [<c0042874>] (worker_thread) from [<c004893c>]
> (kthread+0xf4/0x114)
> [  310.525414]  r10:00000000 r9:00000000 r8:00000000 r7:c0042874 r6:ea282880
> r5:00000000
> [  310.533301]  r4:e9948d80
> [  310.535850] [<c0048848>] (kthread) from [<c00119e8>]
> (ret_from_fork+0x14/0x2c)
> [  310.543081]  r7:00000000 r6:00000000 r5:c0048848 r4:e9948d80
> [  310.548803] ---[ end trace 02711a72b6e0a70c ]---

I'm guessing that you enabled LPAE in your kernel configuration but
the ethernet driver only does 32-bit bus mastering?

Cheers,

/ magnus
Laurent Pinchart Feb. 18, 2016, 4:07 p.m. UTC | #7
Hi Magnus,

On Friday 19 February 2016 01:02:18 Magnus Damm wrote:
> On Fri, Feb 19, 2016 at 12:33 AM, Laurent Pinchart wrote:
> > On Thursday 18 February 2016 10:17:16 Geert Uytterhoeven wrote:
> >> On Thu, Feb 18, 2016 at 10:01 AM, Kuninori Morimoto wrote:
> >> >>>> I tried this patch, but It didn't use this printk().
> >> >>>> Am I wrong ?
> >> >>>> 
> >> >>>> -------------
> >> >>>> diff --git a/drivers/regulator/da9210-regulator.c
> >> >>>> b/drivers/regulator/da9210-regulator.c index 01c0e37..85c1166 100644
> >> >>>> --- a/drivers/regulator/da9210-regulator.c
> >> >>>> +++ b/drivers/regulator/da9210-regulator.c
> >> >>>> @@ -167,6 +167,8 @@ static irqreturn_t da9210_irq_handler(int irq,
> >> >>>> void *data)
> >> >>>> 
> >> >>>>                         goto error_i2c;
> >> >>>>                 
> >> >>>>                 ret = IRQ_HANDLED;
> >> >>>> 
> >> >>>> +       } else if (val != handled) {
> >> >>>> +               printk("---val %x : %x\n", val, handled);
> >> >>>> 
> >> >>>>         }
> >> >>> 
> >> >>> That's what I meant.
> >> >>> Do you still see the "irq 311: nobody cared"?
> >> >>> Do you have the DA9210 driver enabled?
> >> > 
> >> > You can reproduce it by
> >> > 
> >> >         > git checkout git checkout renesas-drivers-2016-02-09-v4.5-rc3
> >> >         > cp ${Laurent's .config} ${LINUX}
> >> 
> >> I don't have Laurent's config, and only remote access to Lager.
> >> 
> >> > and boot, and wait few second
> >> 
> >> Da9210 and da9063 share the same interrupt. Perhaps da9063 is keeping
> >> the interrupt line asserted?
> >> 
> >> Do you have the DA9063 driver enabled?
> > 
> > I had CONFIG_REGULATOR_DA9210 enabled but CONFIG_REGULATOR_DA9063
> > disabled.
> > After enabling CONFIG_REGULATOR_DA9063 the unhandled interrupt problem
> > goes
> > away.
> > 
> > I however got the following different (and totally unrelated as far as I
> > can see) warning once:
> > 
> > [  310.252577] ------------[ cut here ]------------
> > [  310.257226] WARNING: CPU: 3 PID: 608 at
> > /home/laurent/src/iob/renesas/linux/net/ipv4/af_inet.c:155
> > inet_sock_destruct+0x188/0x1d8()
> > [  310.269088] Modules linked in: mmc_block rcar_jpu v4l2_mem2mem
> > sata_rcar
> > libata rcar_vin scsi_mod sh_mobile_sdhi soc_camera sh_mmcif tmio_mmc_core
> > soc_mediabus mmc_core videobuf_core soc_scale_crop(Pa
> > [  310.294680] CPU: 3 PID: 608 Comm: kworker/3:1H Tainted: P
> > 4.5.0-rc3-00463-gd57d2d31ebee #581
> > [  310.304431] Hardware name: Generic R8A7790 (Flattened Device Tree)
> > [  310.310625] Workqueue: rpciod xprt_autoclose
> > [  310.314908] Backtrace:
> > [  310.317380] [<c0014c38>] (dump_backtrace) from [<c0014f50>]
> > (show_stack+0x20/0x24)
> > [  310.324959]  r6:c05be48c r5:00000000 r4:60000013 r3:e9a62000
> > [  310.330669] [<c0014f30>] (show_stack) from [<c01ed99c>]
> > (dump_stack+0x8c/0xac)
> > [  310.337906] [<c01ed910>] (dump_stack) from [<c002aab0>]
> > (warn_slowpath_common+0x88/0xc4)
> > [  310.346006]  r5:0000009b r4:00000000
> > [  310.349606] [<c002aa28>] (warn_slowpath_common) from [<c002ab18>]
> > (warn_slowpath_null+0x2c/0x34)
> > [  310.358400]  r8:e9a248d8 r7:ea375364 r6:e9a248c4 r5:e9a248d8
> > r4:e9a247c0
> > [  310.365156] [<c002aaec>] (warn_slowpath_null) from [<c0405d24>]
> > (inet_sock_destruct+0x188/0x1d8)
> > [  310.373958] [<c0405b9c>] (inet_sock_destruct) from [<c038a2e8>]
> > (sk_destruct+0x28/0x118)
> > [  310.382057]  r6:e9d593c0 r5:e9a248d8 r4:e9a247c0 r3:c0405b9c
> > [  310.387763] [<c038a2c0>] (sk_destruct) from [<c038a40c>]
> > (__sk_free+0x34/0xc0)
> > [  310.394994]  r5:e9a248d8 r4:e9a247c0
> > [  310.398595] [<c038a3d8>] (__sk_free) from [<c038a56c>]
> > (sk_free+0x44/0x48) [  310.405474]  r4:e9a247c0 r3:e9a2486c
> > [  310.409074] [<c038a528>] (sk_free) from [<c038a6ac>]
> > (sk_common_release+0xf0/0xfc)
> > [  310.416662] [<c038a5bc>] (sk_common_release) from [<c03f79d8>]
> > (udp_lib_close+0x10/0x14)
> > [  310.424761]  r5:e9d593c0 r4:e9a247c0
> > [  310.428367] [<c03f79c8>] (udp_lib_close) from [<c0405a6c>]
> > (inet_release+0x54/0x80)
> > [  310.436041] [<c0405a18>] (inet_release) from [<c0384914>]
> > (sock_release+0x30/0xac)
> > [  310.443620]  r5:00000000 r4:e9d593c0
> > [  310.447224] [<c03848e4>] (sock_release) from [<c0428960>]
> > (xs_reset_transport+0xc4/0x138)
> > [  310.455411]  r5:e9a247c0 r4:ea375000
> > [  310.459012] [<c042889c>] (xs_reset_transport) from [<c04289f0>]
> > (xs_close+0x1c/0x30)
> > [  310.466764]  r8:ff7c4300 r7:ea375228 r6:ea375000 r5:ea375278
> > r4:ea375000
> > r3:c04289d4
> > [  310.474568] [<c04289d4>] (xs_close) from [<c0425de8>]
> > (xprt_autoclose+0x40/0x74)
> > [  310.481972]  r4:ea375244 r3:c04289d4
> > [  310.485579] [<c0425da8>] (xprt_autoclose) from [<c004256c>]
> > (process_one_work+0x170/0x430)
> > [  310.493853]  r7:c06a4878 r6:e876da00 r5:ea282880 r4:ea375244
> > [  310.499558] [<c00423fc>] (process_one_work) from [<c00428b0>]
> > (worker_thread+0x3c/0x55c)
> > [  310.507658]  r10:e876da00 r9:c0660100 r8:00000008 r7:ea282898
> > r6:e876da18 r5:e876da00
> > [  310.515544]  r4:ea282880
> > [  310.518096] [<c0042874>] (worker_thread) from [<c004893c>]
> > (kthread+0xf4/0x114)
> > [  310.525414]  r10:00000000 r9:00000000 r8:00000000 r7:c0042874
> > r6:ea282880 r5:00000000
> > [  310.533301]  r4:e9948d80
> > [  310.535850] [<c0048848>] (kthread) from [<c00119e8>]
> > (ret_from_fork+0x14/0x2c)
> > [  310.543081]  r7:00000000 r6:00000000 r5:c0048848 r4:e9948d80
> > [  310.548803] ---[ end trace 02711a72b6e0a70c ]---
> 
> I'm guessing that you enabled LPAE in your kernel configuration but
> the ethernet driver only does 32-bit bus mastering?

You're always on top of LPAE, DMA mastering and IOMMU issues :-) Yes, that's 
the case. Do we have a fix planned ?
Magnus Damm Feb. 18, 2016, 4:16 p.m. UTC | #8
Hi Laurent,

On Fri, Feb 19, 2016 at 1:07 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Magnus,
>
> On Friday 19 February 2016 01:02:18 Magnus Damm wrote:
>> On Fri, Feb 19, 2016 at 12:33 AM, Laurent Pinchart wrote:
>> > On Thursday 18 February 2016 10:17:16 Geert Uytterhoeven wrote:
>> >> On Thu, Feb 18, 2016 at 10:01 AM, Kuninori Morimoto wrote:
>> >> >>>> I tried this patch, but It didn't use this printk().
>> >> >>>> Am I wrong ?
>> >> >>>>
>> >> >>>> -------------
>> >> >>>> diff --git a/drivers/regulator/da9210-regulator.c
>> >> >>>> b/drivers/regulator/da9210-regulator.c index 01c0e37..85c1166 100644
>> >> >>>> --- a/drivers/regulator/da9210-regulator.c
>> >> >>>> +++ b/drivers/regulator/da9210-regulator.c
>> >> >>>> @@ -167,6 +167,8 @@ static irqreturn_t da9210_irq_handler(int irq,
>> >> >>>> void *data)
>> >> >>>>
>> >> >>>>                         goto error_i2c;
>> >> >>>>
>> >> >>>>                 ret = IRQ_HANDLED;
>> >> >>>>
>> >> >>>> +       } else if (val != handled) {
>> >> >>>> +               printk("---val %x : %x\n", val, handled);
>> >> >>>>
>> >> >>>>         }
>> >> >>>
>> >> >>> That's what I meant.
>> >> >>> Do you still see the "irq 311: nobody cared"?
>> >> >>> Do you have the DA9210 driver enabled?
>> >> >
>> >> > You can reproduce it by
>> >> >
>> >> >         > git checkout git checkout renesas-drivers-2016-02-09-v4.5-rc3
>> >> >         > cp ${Laurent's .config} ${LINUX}
>> >>
>> >> I don't have Laurent's config, and only remote access to Lager.
>> >>
>> >> > and boot, and wait few second
>> >>
>> >> Da9210 and da9063 share the same interrupt. Perhaps da9063 is keeping
>> >> the interrupt line asserted?
>> >>
>> >> Do you have the DA9063 driver enabled?
>> >
>> > I had CONFIG_REGULATOR_DA9210 enabled but CONFIG_REGULATOR_DA9063
>> > disabled.
>> > After enabling CONFIG_REGULATOR_DA9063 the unhandled interrupt problem
>> > goes
>> > away.
>> >
>> > I however got the following different (and totally unrelated as far as I
>> > can see) warning once:
>> >
>> > [  310.252577] ------------[ cut here ]------------
>> > [  310.257226] WARNING: CPU: 3 PID: 608 at
>> > /home/laurent/src/iob/renesas/linux/net/ipv4/af_inet.c:155
>> > inet_sock_destruct+0x188/0x1d8()
>> > [  310.269088] Modules linked in: mmc_block rcar_jpu v4l2_mem2mem
>> > sata_rcar
>> > libata rcar_vin scsi_mod sh_mobile_sdhi soc_camera sh_mmcif tmio_mmc_core
>> > soc_mediabus mmc_core videobuf_core soc_scale_crop(Pa
>> > [  310.294680] CPU: 3 PID: 608 Comm: kworker/3:1H Tainted: P
>> > 4.5.0-rc3-00463-gd57d2d31ebee #581
>> > [  310.304431] Hardware name: Generic R8A7790 (Flattened Device Tree)
>> > [  310.310625] Workqueue: rpciod xprt_autoclose
>> > [  310.314908] Backtrace:
>> > [  310.317380] [<c0014c38>] (dump_backtrace) from [<c0014f50>]
>> > (show_stack+0x20/0x24)
>> > [  310.324959]  r6:c05be48c r5:00000000 r4:60000013 r3:e9a62000
>> > [  310.330669] [<c0014f30>] (show_stack) from [<c01ed99c>]
>> > (dump_stack+0x8c/0xac)
>> > [  310.337906] [<c01ed910>] (dump_stack) from [<c002aab0>]
>> > (warn_slowpath_common+0x88/0xc4)
>> > [  310.346006]  r5:0000009b r4:00000000
>> > [  310.349606] [<c002aa28>] (warn_slowpath_common) from [<c002ab18>]
>> > (warn_slowpath_null+0x2c/0x34)
>> > [  310.358400]  r8:e9a248d8 r7:ea375364 r6:e9a248c4 r5:e9a248d8
>> > r4:e9a247c0
>> > [  310.365156] [<c002aaec>] (warn_slowpath_null) from [<c0405d24>]
>> > (inet_sock_destruct+0x188/0x1d8)
>> > [  310.373958] [<c0405b9c>] (inet_sock_destruct) from [<c038a2e8>]
>> > (sk_destruct+0x28/0x118)
>> > [  310.382057]  r6:e9d593c0 r5:e9a248d8 r4:e9a247c0 r3:c0405b9c
>> > [  310.387763] [<c038a2c0>] (sk_destruct) from [<c038a40c>]
>> > (__sk_free+0x34/0xc0)
>> > [  310.394994]  r5:e9a248d8 r4:e9a247c0
>> > [  310.398595] [<c038a3d8>] (__sk_free) from [<c038a56c>]
>> > (sk_free+0x44/0x48) [  310.405474]  r4:e9a247c0 r3:e9a2486c
>> > [  310.409074] [<c038a528>] (sk_free) from [<c038a6ac>]
>> > (sk_common_release+0xf0/0xfc)
>> > [  310.416662] [<c038a5bc>] (sk_common_release) from [<c03f79d8>]
>> > (udp_lib_close+0x10/0x14)
>> > [  310.424761]  r5:e9d593c0 r4:e9a247c0
>> > [  310.428367] [<c03f79c8>] (udp_lib_close) from [<c0405a6c>]
>> > (inet_release+0x54/0x80)
>> > [  310.436041] [<c0405a18>] (inet_release) from [<c0384914>]
>> > (sock_release+0x30/0xac)
>> > [  310.443620]  r5:00000000 r4:e9d593c0
>> > [  310.447224] [<c03848e4>] (sock_release) from [<c0428960>]
>> > (xs_reset_transport+0xc4/0x138)
>> > [  310.455411]  r5:e9a247c0 r4:ea375000
>> > [  310.459012] [<c042889c>] (xs_reset_transport) from [<c04289f0>]
>> > (xs_close+0x1c/0x30)
>> > [  310.466764]  r8:ff7c4300 r7:ea375228 r6:ea375000 r5:ea375278
>> > r4:ea375000
>> > r3:c04289d4
>> > [  310.474568] [<c04289d4>] (xs_close) from [<c0425de8>]
>> > (xprt_autoclose+0x40/0x74)
>> > [  310.481972]  r4:ea375244 r3:c04289d4
>> > [  310.485579] [<c0425da8>] (xprt_autoclose) from [<c004256c>]
>> > (process_one_work+0x170/0x430)
>> > [  310.493853]  r7:c06a4878 r6:e876da00 r5:ea282880 r4:ea375244
>> > [  310.499558] [<c00423fc>] (process_one_work) from [<c00428b0>]
>> > (worker_thread+0x3c/0x55c)
>> > [  310.507658]  r10:e876da00 r9:c0660100 r8:00000008 r7:ea282898
>> > r6:e876da18 r5:e876da00
>> > [  310.515544]  r4:ea282880
>> > [  310.518096] [<c0042874>] (worker_thread) from [<c004893c>]
>> > (kthread+0xf4/0x114)
>> > [  310.525414]  r10:00000000 r9:00000000 r8:00000000 r7:c0042874
>> > r6:ea282880 r5:00000000
>> > [  310.533301]  r4:e9948d80
>> > [  310.535850] [<c0048848>] (kthread) from [<c00119e8>]
>> > (ret_from_fork+0x14/0x2c)
>> > [  310.543081]  r7:00000000 r6:00000000 r5:c0048848 r4:e9948d80
>> > [  310.548803] ---[ end trace 02711a72b6e0a70c ]---
>>
>> I'm guessing that you enabled LPAE in your kernel configuration but
>> the ethernet driver only does 32-bit bus mastering?
>
> You're always on top of LPAE, DMA mastering and IOMMU issues :-) Yes, that's
> the case. Do we have a fix planned ?

Well, not to sound too grumpy, but I recall asking the ethernet driver
developers assigned to do this years and years ago. That request must
have been lost in the mountain of white space and header sorting
fixes. And now with current state I guess focus is on the
new-and-improved device driver for the ethernet driver included in the
latest generation SoCs.

One way to check if it is related to LPAE is comment out the high
memory banks in the board DTS and only keep the first memory bank
enabled (which sits in 32-bit space). That way you can have LPAE
enabled in the kernel config but limit the addresses to 32-bit.

The proper fix is to update all the drivers to support 40-bit access
in case the hardware supports it. If not then we either need to use
IPMMU or restrict memory allocations to DMA zone somehow. DMA zone is
not very fun if we want to do zero copy buffer passing, so I guess
multimedia stuff needs to use IPMMU.

Good news (as you know) is that SYS-DMAC supports 40-bit addresses and
so does the rcar-dmac.c driver. It's just "the rest"...

Cheers,

/ magnus
diff mbox

Patch

diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c
index 01c0e37..85c1166 100644
--- a/drivers/regulator/da9210-regulator.c
+++ b/drivers/regulator/da9210-regulator.c
@@ -167,6 +167,8 @@  static irqreturn_t da9210_irq_handler(int irq, void *data)
                        goto error_i2c;
 
                ret = IRQ_HANDLED;
+       } else if (val != handled) {
+               printk("---val %x : %x\n", val, handled);
        }
 
        return ret;