All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] mlseep() --> Kernel hangs with i2c-i801 driver?
@ 2005-12-15 17:38 MK GU
  2005-12-16  3:57 ` Mark M. Hoffman
  0 siblings, 1 reply; 2+ messages in thread
From: MK GU @ 2005-12-15 17:38 UTC (permalink / raw)
  To: lm-sensors

Hi All
   
  I am using the i2c-i801 bus driver for our own device driver. In my project, the SMB Alert signal is used to generate an interrupt (IRQ 11 for our ICH6 SMBus controller on my host). I call the function i2c_smbus_xfer() to do data transfers. I got error messages and my kernel hangs when this function is called in a tasklet handler function set by my interrupt handler. But there is no problem when calling this function outside the interrupt handler and its tasklet handler. Further debug messages show that the error messages occured during the call to function msleep(1) in i801_block_transaction(). Part of the error messages is shown below:
   
  BUG: scheduling while atomic: swapper/0x00000101/0
 [<c032cedb>] (8)
 [<c0103c74>] (4)
 [<c0102266>] (4)
 [<c011ae66>] (28)
 [<c032d04d>] (20)
 [<c032da30>] (12)
 [<c011ba60>] (20)
 [<c011be4f>] (24)
 [<e003f631>] (8)
 [<e003fd6b>] (40)
 [<e002c07a>] (56)
 [<e003016c>] (60)
 [<c01354f6>] (44)
 [<c013570f>] (32)
 [<e0030ea3>] (20)
 [<e0030fbe>] (36)
 [<c0117a34>] (32)
 [<c01176e2>] (16)
 [<c011777f>] (28)
 [<c01177d6>] (12)
 [<c01178a9>] (8)
 [<c0103c6f>] (4)
 [<c01025ba>] (4)
 [<c01006e3>] (44)
 [<c0100668>] (20)
 [<c03d4756>] (8)
BUG: scheduling from the idle thread!
 [<c032ce1d>] (8)
 [<c0103c74>] (8)
 [<c0102266>] (4)
 [<c011ae66>] (28)
 [<c032d04d>] (20)
 [<c032da30>] (12)
 [<c011ba60>] (20)
 [<c011be4f>] (24)
 [<e003f631>] (8)
 [<e003fd6b>] (40)
 [<e002c07a>] (56)
 [<e003016c>] (60)
 [<c01354f6>] (44)
 [<c013570f>] (32)
 [<e0030ea3>] (20)
 [<e0030fbe>] (36)
 [<c0117a34>] (32)
 [<c01176e2>] (16)
 [<c011777f>] (28)
 [<c01177d6>] (12)
 [<c01178a9>] (8)
 [<c0103c6f>] (4)
 [<c01025ba>] (4)
 [<c01006e3>] (44)
 [<c0100668>] (20)
 [<c03d4756>] (8)
BUG: Unable to handle kernel NULL pointer dereference at virtual address 0000000
4
 printing eip:
c010e00b
*pde = 00000000
Oops: 0000 [#1]
PREEMPT
Modules linked in: i2c_i801 fbd evdev i2c_core ehci_hcd uhci_hcd
CPU:    0
EIP:    0060:[<c010e00b>]    Not tainted VLI
EFLAGS: 00010046   (2.6.10_dev-pc_target)
eax: 00000000   ebx: c0375b20   ecx: 00000103   edx: c0375b20
esi: 00000000   edi: c033c854   ebp: c03d3d8c   esp: c03d3d84
ds: 007b   es: 007b   ss: 0068   preempt: 00000104
Process swapper (pid: 0, threadinfo¿3d2000 task¿375b20)
Stack: c0375b20 84e79cbe c03d3da0 c010e389 c0375b20 00000000 c0375b20 c03d3de0
       c032cd4c c0375b20 c03fc5c0 c0103c74 c0102266 001a1060 001a101a c03d2000
       02e7eff2 87cf8cb0 00000501 c0375c7c c03d2000 c03d3df4 e0040223 c03d3dec
Call Trace:
 [<c010e389>] (16)
 [<c032cd4c>] (20)
 [<c0103c74>] (12)
 [<c0102266>] (4)
 [<c032d04d>] (48)
 [<c032da30>] (12)
 [<c011ba60>] (20)
 [<c011be4f>] (24)
 [<e003f631>] (8)
 [<e003fd6b>] (40)
 [<e002c07a>] (56)
 [<e003016c>] (60)
 [<c01354f6>] (44)
 [<c013570f>] (32)
 [<e0030ea3>] (20)
 [<e0030fbe>] (36)
 [<c0117a34>] (32)
 [<c01176e2>] (16)
 [<c011777f>] (28)
 [<c01177d6>] (12)
 [<c01178a9>] (8)
 [<c0103c6f>] (4)
 [<c01025ba>] (4)
 [<c01006e3>] (44)
 [<c0100668>] (20)
 [<c03d4756>] (8)
Code: 55 89 e5 fa b8 00 e0 ff ff 21 e0 8b 48 14 41 89 48 14 b8 c0 c5 3f c0 5d c3
 8d b4 26 00 00 00 00 55 89 e5 56 53 8b 75 0c 8b 55 08 <8b> 5e 04 4b 89 5e 04 8d
 5a 20 8b 42 20 8b 4b 04 89 48 04 c7 43
 <0>Kernel panic - not syncing: Fatal exception in interrupt

   
  Any comments and advices on solving this problem are appreciated very much.
   
  Thanks.
  Michael Gu
   

		
---------------------------------
Find your next car at Yahoo! Canada Autos

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [lm-sensors] mlseep() --> Kernel hangs with i2c-i801 driver?
  2005-12-15 17:38 [lm-sensors] mlseep() --> Kernel hangs with i2c-i801 driver? MK GU
@ 2005-12-16  3:57 ` Mark M. Hoffman
  0 siblings, 0 replies; 2+ messages in thread
From: Mark M. Hoffman @ 2005-12-16  3:57 UTC (permalink / raw)
  To: lm-sensors

Hi:

Please use linefeeds.  Please start a new thread when appropriate.

* MK GU <mkgu_2005 at yahoo.ca> [2005-12-15 12:38:18 -0500]:
>   I am using the i2c-i801 bus driver for our own device driver. In my
> project, the SMB Alert signal is used to generate an interrupt (IRQ 11
> for our ICH6 SMBus controller on my host). I call the function
> i2c_smbus_xfer() to do data transfers. I got error messages and my
> kernel hangs when this function is called in a tasklet handler function
> set by my interrupt handler. But there is no problem when calling this
> function outside the interrupt handler and its tasklet handler. Further
> debug messages show that the error messages occured during the call to
> function msleep(1) in i801_block_transaction(). Part of the error
> messages is shown below:
> [...]

Yeah, that's by design.  The function i2c_smbus_xfer() can sleep, which is
not allowed in a tasklet.  Use a workqueue instead.

Regards,

-- 
Mark M. Hoffman
mhoffman at lightlink.com



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-16  3:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-15 17:38 [lm-sensors] mlseep() --> Kernel hangs with i2c-i801 driver? MK GU
2005-12-16  3:57 ` Mark M. Hoffman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.