* 2.6.31-rc7 : kernel BUG at drivers/rtc/rtc-ps3.c:36!
@ 2009-08-24 7:01 Sachin Sant
2009-08-24 7:39 ` Michael Ellerman
0 siblings, 1 reply; 7+ messages in thread
From: Sachin Sant @ 2009-08-24 7:01 UTC (permalink / raw)
To: linuxppc-dev; +Cc: cbe-oss-dev
While trying to boot 2.6.31-rc7 on a power6 machine came
across the following Bug.
Starting udev: ------------[ cut here ]------------
kernel BUG at drivers/rtc/rtc-ps3.c:36!
cpu 0x0: Vector: 700 (Program Check) at [c0000000f70f3570]
pc: c00000000059a020: .ps3_get_time+0x3c/0x84
lr: c00000000059a018: .ps3_get_time+0x34/0x84
sp: c0000000f70f37f0
msr: 8000000000029032
current = 0xc0000000f8d14ee0
paca = 0xc0000000012cc300
pid = 159, comm = hwclock
kernel BUG at drivers/rtc/rtc-ps3.c:36!
enter ? for help
[c0000000f70f3890] c000000000593918 .rtc_read_time+0xac/0xe8
[c0000000f70f3930] c000000000594508 .rtc_dev_ioctl+0x358/0x5a4
[c0000000f70f3a40] c0000000001df868 .vfs_ioctl+0x70/0x10c
[c0000000f70f3af0] c0000000001e00a0 .do_vfs_ioctl+0x6d8/0x748
[c0000000f70f3be0] c0000000001e0198 .SyS_ioctl+0x88/0xd0
[c0000000f70f3ca0] c000000000221fc8 .do_ioctl32_pointer+0x3c/0x5c
[c0000000f70f3d40] c000000000226ef0 .compat_sys_ioctl+0x43c/0x4c4
[c0000000f70f3e30] c0000000000085f0 syscall_exit+0x0/0x40
--- Exception: c01 (System Call) at 000000000fee33e8
SP (ffe0c7d0) is in userspace
0:mon>
0:mon> di $.ps3_get_time
c000000000599fe4 7c0802a6 mflr r0
c000000000599fe8 f8010010 std r0,16(r1)
c000000000599fec fb81ffe0 std r28,-32(r1)
c000000000599ff0 fba1ffe8 std r29,-24(r1)
c000000000599ff4 fbe1fff8 std r31,-8(r1)
c000000000599ff8 f821ff61 stdu r1,-160(r1)
c000000000599ffc 7c3f0b78 mr r31,r1
c00000000059a000 7c9d2378 mr r29,r4
c00000000059a004 60000000 nop
...
c00000000059a00c 387f0070 addi r3,r31,112
c00000000059a010 389f0078 addi r4,r31,120
c00000000059a014 4baf1235 bl c00000000008b248 #
._lv1_get_rtc+0x0/0x3c
c00000000059a018 60000000 nop
c00000000059a01c 7c6307b4 extsw r3,r3
c00000000059a020 0b030000 tdnei r3,0
0:mon>
0:mon> r
R00 = c00000000059a018 R16 = 0000000000000000
R01 = c0000000f70f37f0 R17 = 00000000ffe0cb50
R02 = c000000001274d30 R18 = 0000000000000000
R03 = fffffffffffffffe R19 = 0000000010020000
R04 = c0000000f70f3868 R20 = 0000000000000000
R05 = 0000000000000004 R21 = 0000000000033790
R06 = c0000000f70f39d4 R22 = 000000004a923592
R07 = 0000000000000000 R23 = 0000000000000001
R08 = 07c0000000000000 R24 = 0000000040247009
R09 = c00000000125d708 R25 = c000000000783208
R10 = c0000000f742cf80 R26 = ffffffffffffffea
R11 = c0000000f70f3868 R27 = c0000000f70f39b0
R12 = 0000000000004000 R28 = c0000000f742cd10
R13 = c0000000012cc300 R29 = c0000000f70f39b0
R14 = 0000000010019d40 R30 = c000000001213148
R15 = 00000000ffe0cc7b R31 = c0000000f70f37f0
pc = c00000000059a020 .ps3_get_time+0x3c/0x84
lr = c00000000059a018 .ps3_get_time+0x34/0x84
msr = 8000000000029032 cr = 44222424
ctr = c000000000599fe4 xer = 0000000000000001 trap = 700
0:mon>
Corresponding c code is :
static u64 read_rtc(void)
{
....
result = lv1_get_rtc(&rtc_val, &tb_val);
BUG_ON(result);
I had never tried enabling CONFIG_RTC_DRV_PS3 option before
so not sure if this is a new problem or an old one.
Thanks
-Sachin
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.31-rc7 : kernel BUG at drivers/rtc/rtc-ps3.c:36!
2009-08-24 7:01 2.6.31-rc7 : kernel BUG at drivers/rtc/rtc-ps3.c:36! Sachin Sant
@ 2009-08-24 7:39 ` Michael Ellerman
2009-08-24 8:53 ` Geert Uytterhoeven
2009-08-24 8:54 ` [PATCH for 2.6.31] powerpc/ps3: Add missing check for PS3 to rtc-ps3 platform device registration Geert Uytterhoeven
0 siblings, 2 replies; 7+ messages in thread
From: Michael Ellerman @ 2009-08-24 7:39 UTC (permalink / raw)
To: Sachin Sant; +Cc: Geert.Uytterhoeven, linuxppc-dev, cbe-oss-dev
[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]
On Mon, 2009-08-24 at 12:31 +0530, Sachin Sant wrote:
> While trying to boot 2.6.31-rc7 on a power6 machine came
> across the following Bug.
>
> Starting udev: ------------[ cut here ]------------
> kernel BUG at drivers/rtc/rtc-ps3.c:36!
> cpu 0x0: Vector: 700 (Program Check) at [c0000000f70f3570]
> pc: c00000000059a020: .ps3_get_time+0x3c/0x84
> lr: c00000000059a018: .ps3_get_time+0x34/0x84
> sp: c0000000f70f37f0
> msr: 8000000000029032
> current = 0xc0000000f8d14ee0
> paca = 0xc0000000012cc300
> pid = 159, comm = hwclock
> kernel BUG at drivers/rtc/rtc-ps3.c:36!
> static u64 read_rtc(void)
> {
> ....
> result = lv1_get_rtc(&rtc_val, &tb_val);
> BUG_ON(result);
>
> I had never tried enabling CONFIG_RTC_DRV_PS3 option before
> so not sure if this is a new problem or an old one.
Looks like an old one, or at least as long as the driver has existed.
The code needs to cope with being called on something other than a PS3.
Either the platform driver is only registered if the machine is a PS3,
or ps3_rtc_probe() actually does something to check it's on a PS3 before
registering the rtc_device.
cheers
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.31-rc7 : kernel BUG at drivers/rtc/rtc-ps3.c:36!
2009-08-24 7:39 ` Michael Ellerman
@ 2009-08-24 8:53 ` Geert Uytterhoeven
2009-08-24 8:54 ` [PATCH for 2.6.31] powerpc/ps3: Add missing check for PS3 to rtc-ps3 platform device registration Geert Uytterhoeven
1 sibling, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2009-08-24 8:53 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, cbe-oss-dev
On Mon, 24 Aug 2009, Michael Ellerman wrote:
> On Mon, 2009-08-24 at 12:31 +0530, Sachin Sant wrote:
> > While trying to boot 2.6.31-rc7 on a power6 machine came
> > across the following Bug.
> >
> > Starting udev: ------------[ cut here ]------------
> > kernel BUG at drivers/rtc/rtc-ps3.c:36!
> > cpu 0x0: Vector: 700 (Program Check) at [c0000000f70f3570]
> > pc: c00000000059a020: .ps3_get_time+0x3c/0x84
> > lr: c00000000059a018: .ps3_get_time+0x34/0x84
> > sp: c0000000f70f37f0
> > msr: 8000000000029032
> > current = 0xc0000000f8d14ee0
> > paca = 0xc0000000012cc300
> > pid = 159, comm = hwclock
> > kernel BUG at drivers/rtc/rtc-ps3.c:36!
>
> > static u64 read_rtc(void)
> > {
> > ....
> > result = lv1_get_rtc(&rtc_val, &tb_val);
> > BUG_ON(result);
> >
> > I had never tried enabling CONFIG_RTC_DRV_PS3 option before
> > so not sure if this is a new problem or an old one.
>
> Looks like an old one, or at least as long as the driver has existed.
>
> The code needs to cope with being called on something other than a PS3.
> Either the platform driver is only registered if the machine is a PS3,
> or ps3_rtc_probe() actually does something to check it's on a PS3 before
> registering the rtc_device.
Bummer, how could we have missed that one?
Cooking a patch...
With kind regards,
Geert Uytterhoeven
Software Architect
Techsoft Centre
Technology and Software Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH for 2.6.31] powerpc/ps3: Add missing check for PS3 to rtc-ps3 platform device registration
2009-08-24 7:39 ` Michael Ellerman
2009-08-24 8:53 ` Geert Uytterhoeven
@ 2009-08-24 8:54 ` Geert Uytterhoeven
2009-08-24 9:07 ` Sachin Sant
2009-08-24 18:41 ` Geoff Levand
1 sibling, 2 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2009-08-24 8:54 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Geoff Levand; +Cc: Linux/PPC Development, cbe-oss-dev
On non-PS3, we get:
| kernel BUG at drivers/rtc/rtc-ps3.c:36!
because the rtc-ps3 platform device is registered unconditionally in a kernel
with builtin support for PS3.
Reported-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
---
arch/powerpc/platforms/ps3/time.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/ps3/time.c b/arch/powerpc/platforms/ps3/time.c
index b178a1e..40b5cb4 100644
--- a/arch/powerpc/platforms/ps3/time.c
+++ b/arch/powerpc/platforms/ps3/time.c
@@ -21,6 +21,7 @@
#include <linux/kernel.h>
#include <linux/platform_device.h>
+#include <asm/firmware.h>
#include <asm/rtc.h>
#include <asm/lv1call.h>
#include <asm/ps3.h>
@@ -84,6 +85,9 @@ static int __init ps3_rtc_init(void)
{
struct platform_device *pdev;
+ if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
+ return -ENODEV;
+
pdev = platform_device_register_simple("rtc-ps3", -1, NULL, 0);
if (IS_ERR(pdev))
return PTR_ERR(pdev);
--
1.6.2.4
With kind regards,
Geert Uytterhoeven
Software Architect
Techsoft Centre
Technology and Software Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH for 2.6.31] powerpc/ps3: Add missing check for PS3 to rtc-ps3 platform device registration
2009-08-24 8:54 ` [PATCH for 2.6.31] powerpc/ps3: Add missing check for PS3 to rtc-ps3 platform device registration Geert Uytterhoeven
@ 2009-08-24 9:07 ` Sachin Sant
2009-08-24 9:29 ` Geert Uytterhoeven
2009-08-24 18:41 ` Geoff Levand
1 sibling, 1 reply; 7+ messages in thread
From: Sachin Sant @ 2009-08-24 9:07 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: cbe-oss-dev, Linux/PPC Development
Geert Uytterhoeven wrote:
> On non-PS3, we get:
>
> | kernel BUG at drivers/rtc/rtc-ps3.c:36!
>
> because the rtc-ps3 platform device is registered unconditionally in a kernel
> with builtin support for PS3.
>
> Reported-by: Sachin Sant <sachinp@in.ibm.com>
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> ---
> arch/powerpc/platforms/ps3/time.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
Thanks, boots fine now.
Tested-by : Sachin Sant <sachinp@in.ibm.com>
Regards
-Sachin
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH for 2.6.31] powerpc/ps3: Add missing check for PS3 to rtc-ps3 platform device registration
2009-08-24 9:07 ` Sachin Sant
@ 2009-08-24 9:29 ` Geert Uytterhoeven
0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2009-08-24 9:29 UTC (permalink / raw)
To: Sachin Sant, Benjamin Herrenschmidt; +Cc: Linux/PPC Development, cbe-oss-dev
On Mon, 24 Aug 2009, Sachin Sant wrote:
> Geert Uytterhoeven wrote:
> > On non-PS3, we get:
> >
> > | kernel BUG at drivers/rtc/rtc-ps3.c:36!
> >
> > because the rtc-ps3 platform device is registered unconditionally in a
> > kernel
> > with builtin support for PS3.
> >
> > Reported-by: Sachin Sant <sachinp@in.ibm.com>
> > Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> > ---
> > arch/powerpc/platforms/ps3/time.c | 4 ++++
> > 1 files changed, 4 insertions(+), 0 deletions(-)
> Thanks, boots fine now.
>
> Tested-by : Sachin Sant <sachinp@in.ibm.com>
Thanks for testing! We want this for 2.6.30-stable, too.
With kind regards,
Geert Uytterhoeven
Software Architect
Techsoft Centre
Technology and Software Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH for 2.6.31] powerpc/ps3: Add missing check for PS3 to rtc-ps3 platform device registration
2009-08-24 8:54 ` [PATCH for 2.6.31] powerpc/ps3: Add missing check for PS3 to rtc-ps3 platform device registration Geert Uytterhoeven
2009-08-24 9:07 ` Sachin Sant
@ 2009-08-24 18:41 ` Geoff Levand
1 sibling, 0 replies; 7+ messages in thread
From: Geoff Levand @ 2009-08-24 18:41 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: cbe-oss-dev, Linux/PPC Development
On 08/24/2009 01:54 AM, Geert Uytterhoeven wrote:
> On non-PS3, we get:
>
> | kernel BUG at drivers/rtc/rtc-ps3.c:36!
>
> because the rtc-ps3 platform device is registered unconditionally in a kernel
> with builtin support for PS3.
>
> Reported-by: Sachin Sant <sachinp@in.ibm.com>
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> ---
> arch/powerpc/platforms/ps3/time.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-08-24 19:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-24 7:01 2.6.31-rc7 : kernel BUG at drivers/rtc/rtc-ps3.c:36! Sachin Sant
2009-08-24 7:39 ` Michael Ellerman
2009-08-24 8:53 ` Geert Uytterhoeven
2009-08-24 8:54 ` [PATCH for 2.6.31] powerpc/ps3: Add missing check for PS3 to rtc-ps3 platform device registration Geert Uytterhoeven
2009-08-24 9:07 ` Sachin Sant
2009-08-24 9:29 ` Geert Uytterhoeven
2009-08-24 18:41 ` Geoff Levand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).