* pxa_camera: Oops in pxa_camera_probe.
@ 2009-07-01 9:25 Antonio Ospite
0 siblings, 0 replies; 7+ messages in thread
From: Antonio Ospite @ 2009-07-01 9:25 UTC (permalink / raw)
To: linux-media; +Cc: Guennadi Liakhovetski
[-- Attachment #1: Type: text/plain, Size: 3205 bytes --]
Hi,
I get this with pxa-camera in linux-2.6.31-rc1.
If this could be useful, I haven't converted my board code to the new platform_data
style yet.
i2c /dev entries driver
Linux video capture interface: v2.00
Unable to handle kernel NULL pointer dereference at virtual address 00000060
pgd = c0004000
[00000060] *pgd=00000000
Internal error: Oops: f5 [#1] PREEMPT
Modules linked in:
CPU: 0 Tainted: G W (2.6.31-rc1-ezxdev #34)
PC is at dev_driver_string+0x0/0x38
LR is at pxa_camera_probe+0x144/0x428
pc : [<c0167fa8>] lr : [<c028d440>] psr: 20000013
sp : cc81feb0 ip : cc81e000 fp : c0382400
r10: c0381dc0 r9 : 00000000 r8 : c0381dc8
r7 : 0632ea00 r6 : 018cba80 r5 : 02faf080 r4 : cc878a60
r3 : 00000020 r2 : 000028a0 r1 : 0632ea00 r0 : 00000000
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0000397f Table: a0004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xcc81e278)
Stack: (0xcc81feb0 to 0xcc820000)
fea0: 00000001 c00e5528 cc871878 00000021
fec0: 00000000 c0381dc8 c039bb08 c039bb08 c039bb08 00000000 00000000 c0398d28
fee0: 00000000 c016c4a0 c039bb08 c016b658 c0381dc8 c039bb08 c0381dfc c016b76c
ff00: 00000000 cc81ff10 c016b70c c016aa70 cc823eb4 cc865b8c 00000000 c039bb08
ff20: c039bb08 cc9784c0 00000000 c016b030 c0312ba0 c012e0f8 c039bb08 00000000
ff40: 00000000 00000000 00000000 00000001 c001cb98 c016ba68 00000000 c03a4eec
ff60: 00000000 00000000 00000000 00000000 c001cb98 c00282d4 00000000 cc81ff88
ff80: c00de0a0 c028ec24 cc81ffc6 c03190e8 c0888f00 00000140 cc81ffc6 cc847140
ffa0: cc81ffc6 000000b8 c0888f94 c00de200 c00754d0 cc8471c0 c038dff4 c00754f0
ffc0: 00000000 38312c20 00000034 00000000 c00245ac 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 c00086fc 00000000 c0029e7c 41e5ced4 c1a4d9f9
[<c0167fa8>] (dev_driver_string+0x0/0x38) from [<c028d440>] (pxa_camera_probe+0x144/0x428)
[<c028d440>] (pxa_camera_probe+0x144/0x428) from [<c016c4a0>] (platform_drv_probe+0x1c/0x24)
[<c016c4a0>] (platform_drv_probe+0x1c/0x24) from [<c016b658>] (driver_probe_device+0xc0/0x174)
[<c016b658>] (driver_probe_device+0xc0/0x174) from [<c016b76c>] (__driver_attach+0x60/0x84)
[<c016b76c>] (__driver_attach+0x60/0x84) from [<c016aa70>] (bus_for_each_dev+0x48/0x80)
[<c016aa70>] (bus_for_each_dev+0x48/0x80) from [<c016b030>] (bus_add_driver+0xa0/0x224)
[<c016b030>] (bus_add_driver+0xa0/0x224) from [<c016ba68>] (driver_register+0xac/0x138)
[<c016ba68>] (driver_register+0xac/0x138) from [<c00282d4>] (do_one_initcall+0x4c/0x184)
[<c00282d4>] (do_one_initcall+0x4c/0x184) from [<c00086fc>] (kernel_init+0x8c/0x104)
[<c00086fc>] (kernel_init+0x8c/0x104) from [<c0029e7c>] (kernel_thread_exit+0x0/0x8)
Code: e8bd80f0 00002710 0001a36e 000f423f (e5903060)
---[ end trace 1b75b31a2719ed1d ]---
Regards,
Antonio
--
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* pxa_camera: Oops in pxa_camera_probe.
@ 2009-07-01 18:43 Antonio Ospite
2009-07-03 14:11 ` Antonio Ospite
0 siblings, 1 reply; 7+ messages in thread
From: Antonio Ospite @ 2009-07-01 18:43 UTC (permalink / raw)
To: linux-media; +Cc: Guennadi Liakhovetski
[-- Attachment #1: Type: text/plain, Size: 3155 bytes --]
Hi,
I get this with pxa-camera in mainline linux (from today).
I haven't touched my board code which used to work in 2.6.30
Linux video capture interface: v2.00
Unable to handle kernel NULL pointer dereference at virtual address 00000060
pgd = c0004000
[00000060] *pgd=00000000
Internal error: Oops: f5 [#1] PREEMPT
Modules linked in:
CPU: 0 Tainted: G W (2.6.31-rc1-ezxdev #1)
PC is at dev_driver_string+0x0/0x38
LR is at pxa_camera_probe+0x144/0x428
pc : [<c0168090>] lr : [<c028d598>] psr: 20000013
sp : cc81feb0 ip : cc81e000 fp : c0382360
r10: c0381d20 r9 : 00000000 r8 : c0381d28
r7 : 0632ea00 r6 : 018cba80 r5 : 02faf080 r4 : cc8dea60
r3 : 00000020 r2 : 000028a0 r1 : 0632ea00 r0 : 00000000
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0000397f Table: a0004000 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xcc81e278)
Stack: (0xcc81feb0 to 0xcc820000)
fea0: 00000001 c00e55e4 cc84f878 00000021
fec0: 00000000 c0381d28 c039ba68 c039ba68 c039ba68 00000000 00000000 c0398c88
fee0: 00000000 c016c588 c039ba68 c016b740 c0381d28 c039ba68 c0381d5c c016b854
ff00: 00000000 cc81ff10 c016b7f4 c016ab58 cc823eb4 cc865b8c 00000000 c039ba68
ff20: c039ba68 cc9204c0 00000000 c016b118 c0312e28 c012e1d8 c039ba68 00000000
ff40: 00000000 00000000 00000000 00000001 c001cb98 c016bb50 00000000 c03a4e4c
ff60: 00000000 00000000 00000000 00000000 c001cb98 c00282f4 00000000 cc81ff88
ff80: c00de15c c028ed7c cc81ffc6 c0319370 c0888e00 00000140 cc81ffc6 cc847140
ffa0: cc81ffc6 000000b8 c0888ef4 c00de2bc c00754f0 cc8471c0 c038df54 c0075510
ffc0: 00000000 38312c20 00000034 00000000 c00245ac 00000000 00000000 00000000
ffe0: 00000000 00000000 00000000 c00086fc 00000000 c0029e9c 55aa55aa 55aa55aa
[<c0168090>] (dev_driver_string+0x0/0x38) from [<c028d598>] (pxa_camera_probe+0x144/0x428)
[<c028d598>] (pxa_camera_probe+0x144/0x428) from [<c016c588>] (platform_drv_probe+0x1c/0x24)
[<c016c588>] (platform_drv_probe+0x1c/0x24) from [<c016b740>] (driver_probe_device+0xc0/0x174)
[<c016b740>] (driver_probe_device+0xc0/0x174) from [<c016b854>] (__driver_attach+0x60/0x84)
[<c016b854>] (__driver_attach+0x60/0x84) from [<c016ab58>] (bus_for_each_dev+0x48/0x80)
[<c016ab58>] (bus_for_each_dev+0x48/0x80) from [<c016b118>] (bus_add_driver+0xa0/0x224)
[<c016b118>] (bus_add_driver+0xa0/0x224) from [<c016bb50>] (driver_register+0xac/0x138)
[<c016bb50>] (driver_register+0xac/0x138) from [<c00282f4>] (do_one_initcall+0x4c/0x184)
[<c00282f4>] (do_one_initcall+0x4c/0x184) from [<c00086fc>] (kernel_init+0x8c/0x104)
[<c00086fc>] (kernel_init+0x8c/0x104) from [<c0029e9c>] (kernel_thread_exit+0x0/0x8)
Code: e8bd80f0 00002710 0001a36e 000f423f (e5903060)
---[ end trace 1b75b31a2719ed1d ]---
Regards,
Antonio
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: pxa_camera: Oops in pxa_camera_probe.
2009-07-01 18:43 pxa_camera: Oops in pxa_camera_probe Antonio Ospite
@ 2009-07-03 14:11 ` Antonio Ospite
2009-07-03 20:03 ` Guennadi Liakhovetski
0 siblings, 1 reply; 7+ messages in thread
From: Antonio Ospite @ 2009-07-03 14:11 UTC (permalink / raw)
To: linux-media; +Cc: Guennadi Liakhovetski, Robert Jarzmik
[-- Attachment #1.1: Type: text/plain, Size: 1640 bytes --]
On Wed, 1 Jul 2009 20:43:25 +0200
Antonio Ospite <ospite@studenti.unina.it> wrote:
> Hi,
>
> I get this with pxa-camera in mainline linux (from today).
> I haven't touched my board code which used to work in 2.6.30
>
I think I've tracked down the cause. The board code is triggering a
bug in pxa_camera. The same should apply to mioa701 as well.
> Linux video capture interface: v2.00
> Unable to handle kernel NULL pointer dereference at virtual address 00000060
> pgd = c0004000
> [00000060] *pgd=00000000
> Internal error: Oops: f5 [#1] PREEMPT
> Modules linked in:
> CPU: 0 Tainted: G W (2.6.31-rc1-ezxdev #1)
> PC is at dev_driver_string+0x0/0x38
> LR is at pxa_camera_probe+0x144/0x428
The offending dev_driver_str() here is the one in the dev_warn() call in
mclk_get_divisor().
This is what is happening: in struct pxacamera_platform_data I have:
.mclk_10khz = 5000,
which makes the > test in mclk_get_divisor() succeed calling dev_warn
to report that the clock has been limited, but pcdev->soc_host.dev is
still uninitialized at this time.
I could lower the value in my platform data and avoid the bug, but it
would be good to have this fixed ASAP anyway.
The attached rough patch fixes the problem, but you will surely come
out with a better one :)
Thanks,
Antonio
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: pxa_camera_oops_in_mclk_get_divisor_dev_driver_string.patch --]
[-- Type: text/x-diff; name="pxa_camera_oops_in_mclk_get_divisor_dev_driver_string.patch", Size: 935 bytes --]
mclk_get_divisor uses pcdev->soc_host.dev, make sure it is initialized.
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
index 46e0d8a..e048d25 100644
--- a/drivers/media/video/pxa_camera.c
+++ b/drivers/media/video/pxa_camera.c
@@ -1579,6 +1579,7 @@ static int __devinit pxa_camera_probe(struct platform_device *pdev)
pcdev->mclk = 20000000;
}
+ pcdev->soc_host.dev = &pdev->dev;
pcdev->mclk_divisor = mclk_get_divisor(pcdev);
INIT_LIST_HEAD(&pcdev->capture);
@@ -1644,7 +1645,6 @@ static int __devinit pxa_camera_probe(struct platform_device *pdev)
pcdev->soc_host.drv_name = PXA_CAM_DRV_NAME;
pcdev->soc_host.ops = &pxa_soc_camera_host_ops;
pcdev->soc_host.priv = pcdev;
- pcdev->soc_host.dev = &pdev->dev;
pcdev->soc_host.nr = pdev->id;
err = soc_camera_host_register(&pcdev->soc_host);
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: pxa_camera: Oops in pxa_camera_probe.
2009-07-03 14:11 ` Antonio Ospite
@ 2009-07-03 20:03 ` Guennadi Liakhovetski
2009-07-03 21:41 ` Antonio Ospite
0 siblings, 1 reply; 7+ messages in thread
From: Guennadi Liakhovetski @ 2009-07-03 20:03 UTC (permalink / raw)
To: Antonio Ospite; +Cc: Linux Media Mailing List, Robert Jarzmik, rsc
On Fri, 3 Jul 2009, Antonio Ospite wrote:
> On Wed, 1 Jul 2009 20:43:25 +0200
> Antonio Ospite <ospite@studenti.unina.it> wrote:
>
> > Hi,
> >
> > I get this with pxa-camera in mainline linux (from today).
> > I haven't touched my board code which used to work in 2.6.30
> >
>
> I think I've tracked down the cause. The board code is triggering a
> bug in pxa_camera. The same should apply to mioa701 as well.
>
> > Linux video capture interface: v2.00
> > Unable to handle kernel NULL pointer dereference at virtual address 00000060
> > pgd = c0004000
> > [00000060] *pgd=00000000
> > Internal error: Oops: f5 [#1] PREEMPT
> > Modules linked in:
> > CPU: 0 Tainted: G W (2.6.31-rc1-ezxdev #1)
> > PC is at dev_driver_string+0x0/0x38
> > LR is at pxa_camera_probe+0x144/0x428
>
> The offending dev_driver_str() here is the one in the dev_warn() call in
> mclk_get_divisor().
>
> This is what is happening: in struct pxacamera_platform_data I have:
> .mclk_10khz = 5000,
>
> which makes the > test in mclk_get_divisor() succeed calling dev_warn
> to report that the clock has been limited, but pcdev->soc_host.dev is
> still uninitialized at this time.
>
> I could lower the value in my platform data and avoid the bug, but it
> would be good to have this fixed ASAP anyway.
>
> The attached rough patch fixes the problem, but you will surely come
> out with a better one :)
Why should I? Your patch seems correct to me so far, thanks. I'll push it
for 2.6.31. Please, next time inline your patch as described in
Documentation/SubmittingPatches.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: pxa_camera: Oops in pxa_camera_probe.
2009-07-03 20:03 ` Guennadi Liakhovetski
@ 2009-07-03 21:41 ` Antonio Ospite
2009-07-04 19:35 ` Robert Jarzmik
0 siblings, 1 reply; 7+ messages in thread
From: Antonio Ospite @ 2009-07-03 21:41 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: Linux Media Mailing List, Robert Jarzmik, rsc
[-- Attachment #1: Type: text/plain, Size: 1940 bytes --]
On Fri, 3 Jul 2009 22:03:27 +0200 (CEST)
Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
> On Fri, 3 Jul 2009, Antonio Ospite wrote:
>
> > > Linux video capture interface: v2.00
> > > Unable to handle kernel NULL pointer dereference at virtual address 00000060
> > > pgd = c0004000
> > > [00000060] *pgd=00000000
> > > Internal error: Oops: f5 [#1] PREEMPT
> > > Modules linked in:
> > > CPU: 0 Tainted: G W (2.6.31-rc1-ezxdev #1)
> > > PC is at dev_driver_string+0x0/0x38
> > > LR is at pxa_camera_probe+0x144/0x428
> >
> > The offending dev_driver_str() here is the one in the dev_warn() call in
> > mclk_get_divisor().
> >
> > This is what is happening: in struct pxacamera_platform_data I have:
> > .mclk_10khz = 5000,
> >
> > which makes the > test in mclk_get_divisor() succeed calling dev_warn
> > to report that the clock has been limited, but pcdev->soc_host.dev is
> > still uninitialized at this time.
> >
> > I could lower the value in my platform data and avoid the bug, but it
> > would be good to have this fixed ASAP anyway.
> >
> > The attached rough patch fixes the problem, but you will surely come
> > out with a better one :)
>
> Why should I? Your patch seems correct to me so far, thanks. I'll push it
> for 2.6.31. Please, next time inline your patch as described in
> Documentation/SubmittingPatches.
>
Well, it should be correct, I just thought it could be considered
unpretty with the pcdev->soc_host initializations scattered here and
there, that's what I was referring to.
But, if this is ok to you, it's ok to me too :)
Ciao,
Antonio
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: pxa_camera: Oops in pxa_camera_probe.
2009-07-03 21:41 ` Antonio Ospite
@ 2009-07-04 19:35 ` Robert Jarzmik
2009-07-04 20:07 ` Antonio Ospite
0 siblings, 1 reply; 7+ messages in thread
From: Robert Jarzmik @ 2009-07-04 19:35 UTC (permalink / raw)
To: Antonio Ospite; +Cc: Guennadi Liakhovetski, Linux Media Mailing List, rsc
Antonio Ospite <ospite@studenti.unina.it> writes:
> On Fri, 3 Jul 2009 22:03:27 +0200 (CEST)
> Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote:
>
>> On Fri, 3 Jul 2009, Antonio Ospite wrote:
>>
>> > > Linux video capture interface: v2.00
>> > > Unable to handle kernel NULL pointer dereference at virtual address 00000060
>> > > pgd = c0004000
>> > > [00000060] *pgd=00000000
>> > > Internal error: Oops: f5 [#1] PREEMPT
>> > > Modules linked in:
>> > > CPU: 0 Tainted: G W (2.6.31-rc1-ezxdev #1)
>> > > PC is at dev_driver_string+0x0/0x38
>> > > LR is at pxa_camera_probe+0x144/0x428
>> >
>> > The offending dev_driver_str() here is the one in the dev_warn() call in
>> > mclk_get_divisor().
>> >
>> > This is what is happening: in struct pxacamera_platform_data I have:
>> > .mclk_10khz = 5000,
>> >
>> > which makes the > test in mclk_get_divisor() succeed calling dev_warn
>> > to report that the clock has been limited, but pcdev->soc_host.dev is
>> > still uninitialized at this time.
Antonio,
Would you check [1] and see if your stack does correspond to the one I reported
some time ago ? As this is fresh in your memory, you'll be far quicker that me.
Ah, and by the way, I like your patch too, agree that mioa701 is touched, and I
think it should go upstream.
Cheers.
--
Robert
[1] http://osdir.com/ml/linux-media/2009-04/msg00874.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: pxa_camera: Oops in pxa_camera_probe.
2009-07-04 19:35 ` Robert Jarzmik
@ 2009-07-04 20:07 ` Antonio Ospite
0 siblings, 0 replies; 7+ messages in thread
From: Antonio Ospite @ 2009-07-04 20:07 UTC (permalink / raw)
To: Robert Jarzmik; +Cc: Guennadi Liakhovetski, Linux Media Mailing List, rsc
[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]
On Sat, 04 Jul 2009 21:35:22 +0200
Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> >> > The offending dev_driver_str() here is the one in the dev_warn() call in
> >> > mclk_get_divisor().
> >> >
> >> > This is what is happening: in struct pxacamera_platform_data I have:
> >> > .mclk_10khz = 5000,
> >> >
> >> > which makes the > test in mclk_get_divisor() succeed calling dev_warn
> >> > to report that the clock has been limited, but pcdev->soc_host.dev is
> >> > still uninitialized at this time.
>
> Antonio,
>
> Would you check [1] and see if your stack does correspond to the one I reported
> some time ago ? As this is fresh in your memory, you'll be far quicker that me.
>
...
> [1] http://osdir.com/ml/linux-media/2009-04/msg00874.html
Yes, I think that is it. The offsets are different of course but the
call stack is pretty much the same.
Regards,
Antonio
--
Antonio Ospite
http://ao2.it
PGP public key ID: 0x4553B001
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-07-04 20:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-01 18:43 pxa_camera: Oops in pxa_camera_probe Antonio Ospite
2009-07-03 14:11 ` Antonio Ospite
2009-07-03 20:03 ` Guennadi Liakhovetski
2009-07-03 21:41 ` Antonio Ospite
2009-07-04 19:35 ` Robert Jarzmik
2009-07-04 20:07 ` Antonio Ospite
-- strict thread matches above, loose matches on Subject: below --
2009-07-01 9:25 Antonio Ospite
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox