LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-25-2010, 12:13 AM   #1
sjremya
LQ Newbie
 
Registered: Aug 2010
Location: India
Distribution: open suse
Posts: 26

Rep: Reputation: 1
Kernel panic - not syncing: Attempted to kill init! - with rtc configuration


Hi all

Please help me to debug this issue.

I have linux kernel2-6.20.

I could compile the source with CONFIG_RTC_DRV_PCF8583=y. But while booting, kernel is throwing "Kernel panic - not syncing: Attempted to kill init!" . Without RTC configuration, its booting fine.

Help me to find what I am doing wrong.

Regards
SJR
 
Old 10-25-2010, 02:34 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Try to compile the driver as module. Then start dumping kernel logs and load it. With some luck you'll get an error message before the crash.
 
Old 10-26-2010, 01:47 AM   #3
sjremya
LQ Newbie
 
Registered: Aug 2010
Location: India
Distribution: open suse
Posts: 26

Original Poster
Rep: Reputation: 1
@Mara : thanks for the quick response.

I have tried the same idea many time, but failed to create .ko module with my kernel.

I am using ARM architecture.

Code:
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_KMOD=y


CONFIG_RTC_DRV_ISL1208=m 
This is the configuration I added for "loadable module support" for RTC driver module. But failed to create rtc.ko module. Instead of this, its compiling the driver as a part of kernel.

What else to be taken care , when we build a loadable module. I am sure, I'm missing some lines in .config file. Because, its the same case for other drivers also.

Please help me

Regards
SJR
 
Old 10-26-2010, 02:00 AM   #4
sjremya
LQ Newbie
 
Registered: Aug 2010
Location: India
Distribution: open suse
Posts: 26

Original Poster
Rep: Reputation: 1
Hi I could resolve the issue. It was a variable size issue. I changed the size to "unsigned short" from "unsigned long"
 
Old 10-26-2010, 03:17 AM   #5
sjremya
LQ Newbie
 
Registered: Aug 2010
Location: India
Distribution: open suse
Posts: 26

Original Poster
Rep: Reputation: 1
rtc driver is not working ..

but still my rtc driver is not working

I am getting "Invalid probe address" when my driver is calling i2c_probe_address(). I m using isl1208 rtc chip.

The log message is as shown

Quote:
p^/À”_/À8?À8Fðà : Invalid probe address 0x200
BUG: at kernel/mutex.c:133 __mutex_lock_common()
[<c0027f48>] (dump_stack+0x0/0x14) from [<c024b824>] (__mutex_lock_slowpath+0xbc/0x220)
[<c024b768>] (__mutex_lock_slowpath+0x0/0x220) from [<c024b9ac>] (mutex_lock+0x24/0x2c)
r7 = C02FD530 r6 = C02FC28C r5 = 00000008 r4 = C02FC28C
[<c024b988>] (mutex_lock+0x0/0x2c) from [<c01bfea4>] (i2c_check_addr+0x20/0x40)
r4 = C02FC244
[<c01bfe84>] (i2c_check_addr+0x0/0x40) from [<c01c07ac>] (i2c_probe_address+0x88/0x178)
r6 = 00000008 r5 = C02FC244 r4 = C02FC508
[<c01c0724>] (i2c_probe_address+0x0/0x178) from [<c01c0988>] (i2c_probe+0xec/0x350)
[<c01c089c>] (i2c_probe+0x0/0x350) from [<c01c3b0c>] (max6875_attach_adapter+0x18/0x24)
[<c01c3af4>] (max6875_attach_adapter+0x0/0x24) from [<c01c19d8>] (i2c_register_driver+0xec/0x154)
[<c01c18ec>] (i2c_register_driver+0x0/0x154) from [<c001bac0>] (max6875_init+0x18/0x20)
r6 = C03D0000 r5 = C001F9C8 r4 = C001FF04
[<c001baa8>] (max6875_init+0x0/0x20) from [<c00230c8>] (init+0x9c/0x2b8)
[<c002302c>] (init+0x0/0x2b8) from [<c003be58>] (do_exit+0x0/0x804)
r7 = 00000000 r6 = 00000000 r5 = 00000000 r4 = 00000000
What could be the reason ?

Regards SJR
 
Old 10-26-2010, 08:07 AM   #6
sjremya
LQ Newbie
 
Registered: Aug 2010
Location: India
Distribution: open suse
Posts: 26

Original Poster
Rep: Reputation: 1
rtc driver not working

Hi

I would like to make my problem more clear here.

The error message "Kernel panic - not syncing: Attempted to kill init!" , which appear after adding rtc driver module, disappear with a small change in code

I have done the change in drivers/i2c/i2c-core.c
Code:
//unsigned short **forces = address_data->forces; 
unsigned long **forces = address_data->forces;
This removed the "panic" error

But my RTC driver is not working still. Its giving message

Code:
Invalid probe address [ in i2c_probe_address function]
      drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
help me pls
 
Old 10-27-2010, 08:39 AM   #7
sjremya
LQ Newbie
 
Registered: Aug 2010
Location: India
Distribution: open suse
Posts: 26

Original Poster
Rep: Reputation: 1
@mara

as adviced, i tried rtc driver as a module.

Panic error disappeared, but getting segmentation fault as folows

Code:
Unable to handle kernel paging request at virtual address dead4eb9
pgd = c36f8000
[dead4eb9] *pgd=00000000
Internal error: Oops: 1 [#1]
Modules linked in: rtc_isl1221
CPU: 0
PC is at i2c_probe+0x194/0x3ac
LR is at i2c_probe+0x198/0x3ac
pc : [<c01b0d84>]    lr : [<c01b0d88>]    Not tainted
sp : c36afe80  ip : 00000000  fp : c36afeb8
r10: 00000124  r9 : 00000000  r8 : bf002478
r7 : 00000004  r6 : c02d5a50  r5 : bf0025e8  r4 : c02d5a50
r3 : dead4ead  r2 : c02c56e0  r1 : c0297e2c  r0 : c02d5a50
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 5317F
Table: 236F8000  DAC: 00000015
Process insmod (pid: 801, stack limit = 0xc36ae250)
Stack: (0xc36afe80 to 0xc36b0000)
fe80: c48ed000 c48fea94 bf000ae0 00000001 c02d5a50 bf002380 00000000 c3eb0498 
fea0: 00000026 c48ed000 c48fea94 c36afecc c36afebc bf000074 c01b0c00 c02d5d14 
fec0: c36afee8 c36afed0 c01b1cdc bf000050 c3eb046c c3eb02a8 bf002660 c36afef8 
fee0: c36afeec bf00404c c01b1c00 c36affa4 c36afefc c00575b0 bf004010 00000000 
ff00: 00094008 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
ff20: 00000000 00000000 00000000 00000000 00000000 0000000a c49057e4 c3eb8b3c 
ff40: c48ff034 c48fecec c48ff05c 00000000 000000a9 000000a9 bf00266c c48fe959 
ff60: 00000026 c023da18 c48ff084 0000003c 00000024 00000000 00000000 00018dee 
ff80: 000909bc 0007bd78 00000080 c0022f04 c36ae000 bee5ee44 00000000 c36affa8 
ffa0: c0022d60 c00562a4 000909bc 0007bd78 00900080 00094018 00018dee 00094008 
ffc0: 00018dee 000909bc 0007bd78 00000000 bee5ef1a 00000002 bee5ee44 00000000 
ffe0: bee5ec30 bee5ec24 0003fe6c 401e2520 60000010 00900080 00000000 00000000 
Backtrace: 
[<c01b0bf0>] (i2c_probe+0x0/0x3ac) from [<bf000074>] (isl1221_attach_adapter+0x34/0x50 [rtc_isl1221])
[<bf000040>] (isl1221_attach_adapter+0x0/0x50 [rtc_isl1221]) from [<c01b1cdc>] (i2c_register_driver+0xec/0x154)
 r4 = C02D5D14 
[<c01b1bf0>] (i2c_register_driver+0x0/0x154) from [<bf00404c>] (isl1221_init+0x4c/0x7c [rtc_isl1221])
 r6 = BF002660  r5 = C3EB02A8  r4 = C3EB046C 
[<bf004000>] (isl1221_init+0x0/0x7c [rtc_isl1221]) from [<c00575b0>] (sys_init_module+0x131c/0x1428)
[<c0056294>] (sys_init_module+0x0/0x1428) from [<c0022d60>] (ret_fast_syscall+0x0/0x2c)
Code: ebfa1f76 e596300c e1a00006 e1a0e00f (e593f00c) 
 Segmentation fault

regards

SJR
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel panic not syncing attempted to kill init rabeeque1 Linux - General 1 09-15-2010 05:59 AM
/sbin/init: Kernel panic - not syncing: Attempted to kill init! jalejo08 Linux - Kernel 7 07-02-2009 01:16 PM
kernel panic - not syncing: Attempted to kill init! Stoneperson Linux - Kernel 2 06-29-2009 06:50 PM
Kernel Panic - not syncing: Attempted to kill init! Adimelo Fedora - Installation 7 07-06-2007 07:25 PM
kernel panic - not syncing: attempted to kill init! asif2k Fedora 3 02-14-2007 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 09:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration