Re: Regression: OOPs on boot due to "wlcore: Add support for optional wakeirq"

2018-10-25 Thread Tony Lindgren
Hi,

* John Stultz  [181025 17:15]:
> On Thu, Oct 25, 2018 at 10:04 AM, John Stultz  wrote:
> > Should we check wakeirq before we set the second elements of res[]?
> 
> Here's my first swing at doing the above. It seems to work ok. Let me
> know if it looks reasonable and I'll submit it as a proper patch.
> 
> https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/hikey-mainline-WIP=383fb6e3abb71b8a721f196120a2e3a9da3315ac

Yes thanks for fixing it, looks good to me:

Acked-by: Tony Lindgren 


Re: Regression: OOPs on boot due to "wlcore: Add support for optional wakeirq"

2018-10-25 Thread Tony Lindgren
Hi,

* John Stultz  [181025 17:15]:
> On Thu, Oct 25, 2018 at 10:04 AM, John Stultz  wrote:
> > Should we check wakeirq before we set the second elements of res[]?
> 
> Here's my first swing at doing the above. It seems to work ok. Let me
> know if it looks reasonable and I'll submit it as a proper patch.
> 
> https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/hikey-mainline-WIP=383fb6e3abb71b8a721f196120a2e3a9da3315ac

Yes thanks for fixing it, looks good to me:

Acked-by: Tony Lindgren 


Re: Regression: OOPs on boot due to "wlcore: Add support for optional wakeirq"

2018-10-25 Thread Tony Lindgren
* John Stultz  [181025 17:04]:
> Hey Tony,
>   In testing linus/master on my hikey board, I'm hitting the following
> OOPS on bootup:
> 
> [1.870279] Unable to handle kernel read from unreadable memory at
...
> [1.870485]  wl1271_probe+0x210/0x350
> [1.870491]  sdio_bus_probe+0x100/0x128
...
> I've bisected it down to 3c83dd577c7f ("wlcore: Add support for
> optional wakeirq").
> 
> It seems since we don't have a wakeirq value in the dts, the wakeirq
> value in wl1271_probe() is zero, which then causes trouble in
> irqd_get_trigger_type(irq_get_irq_data(wakeirq)).
> 
> Should we check wakeirq before we set the second elements of res[]?

Oh sorry about that, yeah I'll take a look and post a patch ASAP.
Hmm for me value 0 there causes no errors looks like.

Regards,

Tony


Re: Regression: OOPs on boot due to "wlcore: Add support for optional wakeirq"

2018-10-25 Thread Tony Lindgren
* John Stultz  [181025 17:04]:
> Hey Tony,
>   In testing linus/master on my hikey board, I'm hitting the following
> OOPS on bootup:
> 
> [1.870279] Unable to handle kernel read from unreadable memory at
...
> [1.870485]  wl1271_probe+0x210/0x350
> [1.870491]  sdio_bus_probe+0x100/0x128
...
> I've bisected it down to 3c83dd577c7f ("wlcore: Add support for
> optional wakeirq").
> 
> It seems since we don't have a wakeirq value in the dts, the wakeirq
> value in wl1271_probe() is zero, which then causes trouble in
> irqd_get_trigger_type(irq_get_irq_data(wakeirq)).
> 
> Should we check wakeirq before we set the second elements of res[]?

Oh sorry about that, yeah I'll take a look and post a patch ASAP.
Hmm for me value 0 there causes no errors looks like.

Regards,

Tony


Re: Regression: OOPs on boot due to "wlcore: Add support for optional wakeirq"

2018-10-25 Thread John Stultz
On Thu, Oct 25, 2018 at 10:04 AM, John Stultz  wrote:
> Hey Tony,
>   In testing linus/master on my hikey board, I'm hitting the following
> OOPS on bootup:
>
> [1.870279] Unable to handle kernel read from unreadable memory at
> virtual address 0010
> [1.870283] Mem abort info:
> [1.870287]   ESR = 0x9605
> [1.870292]   Exception class = DABT (current EL), IL = 32 bits
> [1.870296]   SET = 0, FnV = 0
> [1.870299]   EA = 0, S1PTW = 0
> [1.870302] Data abort info:
> [1.870306]   ISV = 0, ISS = 0x0005
> [1.870309]   CM = 0, WnR = 0
> [1.870312] [0010] user address but active_mm is swapper
> [1.870318] Internal error: Oops: 9605 [#1] PREEMPT SMP
> [1.870327] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted
> 4.19.0-05129-gb3d1e8e #48
> [1.870331] Hardware name: HiKey Development Board (DT)
> [1.870350] Workqueue: events_freezable mmc_rescan
> [1.870358] pstate: 6045 (nZCv daif +PAN -UAO)
> [1.870366] pc : wl1271_probe+0x210/0x350
> [1.870371] lr : wl1271_probe+0x210/0x350
> [1.870374] sp : ff80080739b0
> [1.870377] x29: ff80080739b0 x28: 
> [1.870384] x27:  x26: 
> [1.870391] x25: 0036 x24: ffc074ecb598
> [1.870398] x23: ffc07ffdce78 x22: ffc0744ed808
> [1.870404] x21: ffc074ecbb98 x20: ff8008ff9000
> [1.870411] x19: ffc0744ed800 x18: ff8008ff9a48
> [1.870418] x17:  x16: 
> [1.870425] x15: ffc074ecb503 x14: 
> [1.870431] x13: ffc074ecb502 x12: 0030
> [1.870438] x11: 0101010101010101 x10: 0040
> [1.870444] x9 : ffc075400248 x8 : ffc075400270
> [1.870451] x7 :  x6 : 
> [1.870457] x5 :  x4 : 
> [1.870463] x3 :  x2 : 
> [1.870469] x1 : 0028 x0 : 
> [1.870477] Process kworker/0:0 (pid: 5, stack limit = 0x(ptrval))
> [1.870480] Call trace:
> [1.870485]  wl1271_probe+0x210/0x350
> [1.870491]  sdio_bus_probe+0x100/0x128
> [1.870500]  really_probe+0x1a8/0x2b8
> [1.870506]  driver_probe_device+0x58/0x100
> [1.870511]  __device_attach_driver+0x94/0xd8
> [1.870517]  bus_for_each_drv+0x70/0xc8
> [1.870522]  __device_attach+0xe0/0x140
> [1.870527]  device_initial_probe+0x10/0x18
> [1.870532]  bus_probe_device+0x94/0xa0
> [1.870537]  device_add+0x374/0x5b8
> [1.870542]  sdio_add_func+0x60/0x88
> [1.870546]  mmc_attach_sdio+0x1b0/0x358
> [1.870551]  mmc_rescan+0x2cc/0x390
> [1.870558]  process_one_work+0x12c/0x320
> [1.870563]  worker_thread+0x48/0x458
> [1.870569]  kthread+0xf8/0x128
> [1.870575]  ret_from_fork+0x10/0x18
> [1.870583] Code: 92400c21 b2760021 a90687a2 97e95bf9 (f9400803)
> [1.870587] ---[ end trace 1e15f81d3c139ca9 ]---
>
>
> I've bisected it down to 3c83dd577c7f ("wlcore: Add support for
> optional wakeirq").
>
> It seems since we don't have a wakeirq value in the dts, the wakeirq
> value in wl1271_probe() is zero, which then causes trouble in
> irqd_get_trigger_type(irq_get_irq_data(wakeirq)).
>
> Should we check wakeirq before we set the second elements of res[]?

Here's my first swing at doing the above. It seems to work ok. Let me
know if it looks reasonable and I'll submit it as a proper patch.

https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/hikey-mainline-WIP=383fb6e3abb71b8a721f196120a2e3a9da3315ac


thanks
-john


Re: Regression: OOPs on boot due to "wlcore: Add support for optional wakeirq"

2018-10-25 Thread John Stultz
On Thu, Oct 25, 2018 at 10:04 AM, John Stultz  wrote:
> Hey Tony,
>   In testing linus/master on my hikey board, I'm hitting the following
> OOPS on bootup:
>
> [1.870279] Unable to handle kernel read from unreadable memory at
> virtual address 0010
> [1.870283] Mem abort info:
> [1.870287]   ESR = 0x9605
> [1.870292]   Exception class = DABT (current EL), IL = 32 bits
> [1.870296]   SET = 0, FnV = 0
> [1.870299]   EA = 0, S1PTW = 0
> [1.870302] Data abort info:
> [1.870306]   ISV = 0, ISS = 0x0005
> [1.870309]   CM = 0, WnR = 0
> [1.870312] [0010] user address but active_mm is swapper
> [1.870318] Internal error: Oops: 9605 [#1] PREEMPT SMP
> [1.870327] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted
> 4.19.0-05129-gb3d1e8e #48
> [1.870331] Hardware name: HiKey Development Board (DT)
> [1.870350] Workqueue: events_freezable mmc_rescan
> [1.870358] pstate: 6045 (nZCv daif +PAN -UAO)
> [1.870366] pc : wl1271_probe+0x210/0x350
> [1.870371] lr : wl1271_probe+0x210/0x350
> [1.870374] sp : ff80080739b0
> [1.870377] x29: ff80080739b0 x28: 
> [1.870384] x27:  x26: 
> [1.870391] x25: 0036 x24: ffc074ecb598
> [1.870398] x23: ffc07ffdce78 x22: ffc0744ed808
> [1.870404] x21: ffc074ecbb98 x20: ff8008ff9000
> [1.870411] x19: ffc0744ed800 x18: ff8008ff9a48
> [1.870418] x17:  x16: 
> [1.870425] x15: ffc074ecb503 x14: 
> [1.870431] x13: ffc074ecb502 x12: 0030
> [1.870438] x11: 0101010101010101 x10: 0040
> [1.870444] x9 : ffc075400248 x8 : ffc075400270
> [1.870451] x7 :  x6 : 
> [1.870457] x5 :  x4 : 
> [1.870463] x3 :  x2 : 
> [1.870469] x1 : 0028 x0 : 
> [1.870477] Process kworker/0:0 (pid: 5, stack limit = 0x(ptrval))
> [1.870480] Call trace:
> [1.870485]  wl1271_probe+0x210/0x350
> [1.870491]  sdio_bus_probe+0x100/0x128
> [1.870500]  really_probe+0x1a8/0x2b8
> [1.870506]  driver_probe_device+0x58/0x100
> [1.870511]  __device_attach_driver+0x94/0xd8
> [1.870517]  bus_for_each_drv+0x70/0xc8
> [1.870522]  __device_attach+0xe0/0x140
> [1.870527]  device_initial_probe+0x10/0x18
> [1.870532]  bus_probe_device+0x94/0xa0
> [1.870537]  device_add+0x374/0x5b8
> [1.870542]  sdio_add_func+0x60/0x88
> [1.870546]  mmc_attach_sdio+0x1b0/0x358
> [1.870551]  mmc_rescan+0x2cc/0x390
> [1.870558]  process_one_work+0x12c/0x320
> [1.870563]  worker_thread+0x48/0x458
> [1.870569]  kthread+0xf8/0x128
> [1.870575]  ret_from_fork+0x10/0x18
> [1.870583] Code: 92400c21 b2760021 a90687a2 97e95bf9 (f9400803)
> [1.870587] ---[ end trace 1e15f81d3c139ca9 ]---
>
>
> I've bisected it down to 3c83dd577c7f ("wlcore: Add support for
> optional wakeirq").
>
> It seems since we don't have a wakeirq value in the dts, the wakeirq
> value in wl1271_probe() is zero, which then causes trouble in
> irqd_get_trigger_type(irq_get_irq_data(wakeirq)).
>
> Should we check wakeirq before we set the second elements of res[]?

Here's my first swing at doing the above. It seems to work ok. Let me
know if it looks reasonable and I'll submit it as a proper patch.

https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/hikey-mainline-WIP=383fb6e3abb71b8a721f196120a2e3a9da3315ac


thanks
-john


Regression: OOPs on boot due to "wlcore: Add support for optional wakeirq"

2018-10-25 Thread John Stultz
Hey Tony,
  In testing linus/master on my hikey board, I'm hitting the following
OOPS on bootup:

[1.870279] Unable to handle kernel read from unreadable memory at
virtual address 0010
[1.870283] Mem abort info:
[1.870287]   ESR = 0x9605
[1.870292]   Exception class = DABT (current EL), IL = 32 bits
[1.870296]   SET = 0, FnV = 0
[1.870299]   EA = 0, S1PTW = 0
[1.870302] Data abort info:
[1.870306]   ISV = 0, ISS = 0x0005
[1.870309]   CM = 0, WnR = 0
[1.870312] [0010] user address but active_mm is swapper
[1.870318] Internal error: Oops: 9605 [#1] PREEMPT SMP
[1.870327] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted
4.19.0-05129-gb3d1e8e #48
[1.870331] Hardware name: HiKey Development Board (DT)
[1.870350] Workqueue: events_freezable mmc_rescan
[1.870358] pstate: 6045 (nZCv daif +PAN -UAO)
[1.870366] pc : wl1271_probe+0x210/0x350
[1.870371] lr : wl1271_probe+0x210/0x350
[1.870374] sp : ff80080739b0
[1.870377] x29: ff80080739b0 x28: 
[1.870384] x27:  x26: 
[1.870391] x25: 0036 x24: ffc074ecb598
[1.870398] x23: ffc07ffdce78 x22: ffc0744ed808
[1.870404] x21: ffc074ecbb98 x20: ff8008ff9000
[1.870411] x19: ffc0744ed800 x18: ff8008ff9a48
[1.870418] x17:  x16: 
[1.870425] x15: ffc074ecb503 x14: 
[1.870431] x13: ffc074ecb502 x12: 0030
[1.870438] x11: 0101010101010101 x10: 0040
[1.870444] x9 : ffc075400248 x8 : ffc075400270
[1.870451] x7 :  x6 : 
[1.870457] x5 :  x4 : 
[1.870463] x3 :  x2 : 
[1.870469] x1 : 0028 x0 : 
[1.870477] Process kworker/0:0 (pid: 5, stack limit = 0x(ptrval))
[1.870480] Call trace:
[1.870485]  wl1271_probe+0x210/0x350
[1.870491]  sdio_bus_probe+0x100/0x128
[1.870500]  really_probe+0x1a8/0x2b8
[1.870506]  driver_probe_device+0x58/0x100
[1.870511]  __device_attach_driver+0x94/0xd8
[1.870517]  bus_for_each_drv+0x70/0xc8
[1.870522]  __device_attach+0xe0/0x140
[1.870527]  device_initial_probe+0x10/0x18
[1.870532]  bus_probe_device+0x94/0xa0
[1.870537]  device_add+0x374/0x5b8
[1.870542]  sdio_add_func+0x60/0x88
[1.870546]  mmc_attach_sdio+0x1b0/0x358
[1.870551]  mmc_rescan+0x2cc/0x390
[1.870558]  process_one_work+0x12c/0x320
[1.870563]  worker_thread+0x48/0x458
[1.870569]  kthread+0xf8/0x128
[1.870575]  ret_from_fork+0x10/0x18
[1.870583] Code: 92400c21 b2760021 a90687a2 97e95bf9 (f9400803)
[1.870587] ---[ end trace 1e15f81d3c139ca9 ]---


I've bisected it down to 3c83dd577c7f ("wlcore: Add support for
optional wakeirq").

It seems since we don't have a wakeirq value in the dts, the wakeirq
value in wl1271_probe() is zero, which then causes trouble in
irqd_get_trigger_type(irq_get_irq_data(wakeirq)).

Should we check wakeirq before we set the second elements of res[]?

thanks
-john


Regression: OOPs on boot due to "wlcore: Add support for optional wakeirq"

2018-10-25 Thread John Stultz
Hey Tony,
  In testing linus/master on my hikey board, I'm hitting the following
OOPS on bootup:

[1.870279] Unable to handle kernel read from unreadable memory at
virtual address 0010
[1.870283] Mem abort info:
[1.870287]   ESR = 0x9605
[1.870292]   Exception class = DABT (current EL), IL = 32 bits
[1.870296]   SET = 0, FnV = 0
[1.870299]   EA = 0, S1PTW = 0
[1.870302] Data abort info:
[1.870306]   ISV = 0, ISS = 0x0005
[1.870309]   CM = 0, WnR = 0
[1.870312] [0010] user address but active_mm is swapper
[1.870318] Internal error: Oops: 9605 [#1] PREEMPT SMP
[1.870327] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted
4.19.0-05129-gb3d1e8e #48
[1.870331] Hardware name: HiKey Development Board (DT)
[1.870350] Workqueue: events_freezable mmc_rescan
[1.870358] pstate: 6045 (nZCv daif +PAN -UAO)
[1.870366] pc : wl1271_probe+0x210/0x350
[1.870371] lr : wl1271_probe+0x210/0x350
[1.870374] sp : ff80080739b0
[1.870377] x29: ff80080739b0 x28: 
[1.870384] x27:  x26: 
[1.870391] x25: 0036 x24: ffc074ecb598
[1.870398] x23: ffc07ffdce78 x22: ffc0744ed808
[1.870404] x21: ffc074ecbb98 x20: ff8008ff9000
[1.870411] x19: ffc0744ed800 x18: ff8008ff9a48
[1.870418] x17:  x16: 
[1.870425] x15: ffc074ecb503 x14: 
[1.870431] x13: ffc074ecb502 x12: 0030
[1.870438] x11: 0101010101010101 x10: 0040
[1.870444] x9 : ffc075400248 x8 : ffc075400270
[1.870451] x7 :  x6 : 
[1.870457] x5 :  x4 : 
[1.870463] x3 :  x2 : 
[1.870469] x1 : 0028 x0 : 
[1.870477] Process kworker/0:0 (pid: 5, stack limit = 0x(ptrval))
[1.870480] Call trace:
[1.870485]  wl1271_probe+0x210/0x350
[1.870491]  sdio_bus_probe+0x100/0x128
[1.870500]  really_probe+0x1a8/0x2b8
[1.870506]  driver_probe_device+0x58/0x100
[1.870511]  __device_attach_driver+0x94/0xd8
[1.870517]  bus_for_each_drv+0x70/0xc8
[1.870522]  __device_attach+0xe0/0x140
[1.870527]  device_initial_probe+0x10/0x18
[1.870532]  bus_probe_device+0x94/0xa0
[1.870537]  device_add+0x374/0x5b8
[1.870542]  sdio_add_func+0x60/0x88
[1.870546]  mmc_attach_sdio+0x1b0/0x358
[1.870551]  mmc_rescan+0x2cc/0x390
[1.870558]  process_one_work+0x12c/0x320
[1.870563]  worker_thread+0x48/0x458
[1.870569]  kthread+0xf8/0x128
[1.870575]  ret_from_fork+0x10/0x18
[1.870583] Code: 92400c21 b2760021 a90687a2 97e95bf9 (f9400803)
[1.870587] ---[ end trace 1e15f81d3c139ca9 ]---


I've bisected it down to 3c83dd577c7f ("wlcore: Add support for
optional wakeirq").

It seems since we don't have a wakeirq value in the dts, the wakeirq
value in wl1271_probe() is zero, which then causes trouble in
irqd_get_trigger_type(irq_get_irq_data(wakeirq)).

Should we check wakeirq before we set the second elements of res[]?

thanks
-john