linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Trace
@ 2008-09-01  9:16 Sébastien Chrétien
  2008-09-01  9:23 ` Trace Benjamin Herrenschmidt
  2008-09-01 10:00 ` Trace Jenkins, Clive
  0 siblings, 2 replies; 14+ messages in thread
From: Sébastien Chrétien @ 2008-09-01  9:16 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1766 bytes --]

Hello,

I am triying to write a tty_driver under ppc. And I get a kernel panic.
Can somebody explain me how finding the source of the error with a kernel
panic trace :
thanks

Unable to handle kernel paging request for data at address 0x575555f9
Faulting instruction address: 0xc0110ddc
Oops: Kernel access of bad area, sig: 11 [#1]
Modules linked in:
NIP: c0110ddc LR: c011118c CTR: 00000000
REGS: cf01bcb0 TRAP: 0300   Not tainted  (2.6.26)
MSR: 00009032 <EE,ME,IR,DR>  CR: 44002022  XER: 20000000
DAR: 575555f9, DSISR: 40000000
TASK = cf01c000[1] 'swapper' THREAD: cf01a000
GPR00: 0000000c cf01bd60 cf01c000 cf04c300 ffffffff cf01bdbc 00000000
c01d0000
GPR08: 00001249 fffffffc 00000000 cf000420 84002022 00000000 10000b00
007fff00
GPR16: 0fffa1d0 00000000 00000004 cf01bdbc 007ffec0 00000000 00000000
00800000
GPR24: 00000000 c01b7650 00000002 c01d0000 ffffffff ce4a6700 cf04c300
57555541
NIP [c0110ddc] init_dev+0x2bc/0x584
LR [c011118c] tty_open+0xe8/0x3e0
Call Trace:
[cf01bd60] [cf01bd78] 0xcf01bd78 (unreliable)
[cf01bdb0] [c011118c] tty_open+0xe8/0x3e0
[cf01bde0] [c00742c8] chrdev_open+0x114/0x1b0
[cf01be10] [c006fb5c] __dentry_open+0x190/0x2e8
[cf01be40] [c006fdac] nameidata_to_filp+0x38/0x70
[cf01be60] [c007bc60] do_filp_open+0x200/0x7d0
[cf01bf10] [c00700b4] do_sys_open+0x74/0x114
[cf01bf40] [c0003c94] init_post+0x34/0x258
[cf01bf60] [c019ca64] kernel_init+0x258/0x270
[cf01bff0] [c0011b3c] kernel_thread+0x44/0x60
Instruction dump:
7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 2f800001
409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 801e0060
---[ end trace b7795a387aeb7786 ]---
Kernel panic - not syncing: Attempted to kill init!
allocation failed: out of vmalloc space - use vmalloc=<size> to increase
size.

[-- Attachment #2: Type: text/html, Size: 1976 bytes --]

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

* Re: Trace
  2008-09-01  9:16 Trace Sébastien Chrétien
@ 2008-09-01  9:23 ` Benjamin Herrenschmidt
  2008-09-01 10:00 ` Trace Jenkins, Clive
  1 sibling, 0 replies; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2008-09-01  9:23 UTC (permalink / raw)
  To: Sébastien Chrétien; +Cc: linuxppc-dev

On Mon, 2008-09-01 at 11:16 +0200, Sébastien Chrétien wrote:
> Hello,
> 
> I am triying to write a tty_driver under ppc. And I get a kernel
> panic.
> Can somebody explain me how finding the source of the error with a
> kernel panic trace : 
> thanks

What kind of device are you writing a tty driver for ?

I don't see anything much relevant in your backtrace, you went through a
crap pointer in init_dev, could be anything at this stage...

Can you post your driver to the list ?

Ben.

> Unable to handle kernel paging request for data at address 0x575555f9
> Faulting instruction address: 0xc0110ddc
> Oops: Kernel access of bad area, sig: 11 [#1]
> Modules linked in:
> NIP: c0110ddc LR: c011118c CTR: 00000000
> REGS: cf01bcb0 TRAP: 0300   Not tainted  (2.6.26)
> MSR: 00009032 <EE,ME,IR,DR>  CR: 44002022  XER: 20000000
> DAR: 575555f9, DSISR: 40000000
> TASK = cf01c000[1] 'swapper' THREAD: cf01a000
> GPR00: 0000000c cf01bd60 cf01c000 cf04c300 ffffffff cf01bdbc 00000000
> c01d0000 
> GPR08: 00001249 fffffffc 00000000 cf000420 84002022 00000000 10000b00
> 007fff00 
> GPR16: 0fffa1d0 00000000 00000004 cf01bdbc 007ffec0 00000000 00000000
> 00800000 
> GPR24: 00000000 c01b7650 00000002 c01d0000 ffffffff ce4a6700 cf04c300
> 57555541 
> NIP [c0110ddc] init_dev+0x2bc/0x584
> LR [c011118c] tty_open+0xe8/0x3e0
> Call Trace:
> [cf01bd60] [cf01bd78] 0xcf01bd78 (unreliable)
> [cf01bdb0] [c011118c] tty_open+0xe8/0x3e0
> [cf01bde0] [c00742c8] chrdev_open+0x114/0x1b0
> [cf01be10] [c006fb5c] __dentry_open+0x190/0x2e8
> [cf01be40] [c006fdac] nameidata_to_filp+0x38/0x70
> [cf01be60] [c007bc60] do_filp_open+0x200/0x7d0
> [cf01bf10] [c00700b4] do_sys_open+0x74/0x114
> [cf01bf40] [c0003c94] init_post+0x34/0x258
> [cf01bf60] [c019ca64] kernel_init+0x258/0x270
> [cf01bff0] [c0011b3c] kernel_thread+0x44/0x60
> Instruction dump:
> 7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062
> 2f800001 
> 409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0
> 801e0060 
> ---[ end trace b7795a387aeb7786 ]---
> Kernel panic - not syncing: Attempted to kill init!
> allocation failed: out of vmalloc space - use vmalloc=<size> to
> increase size.
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

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

* RE: Trace
  2008-09-01  9:16 Trace Sébastien Chrétien
  2008-09-01  9:23 ` Trace Benjamin Herrenschmidt
@ 2008-09-01 10:00 ` Jenkins, Clive
  2008-09-01 12:25   ` Trace Sébastien Chrétien
  1 sibling, 1 reply; 14+ messages in thread
From: Jenkins, Clive @ 2008-09-01 10:00 UTC (permalink / raw)
  To: Sébastien Chrétien, linuxppc-dev

The instruction that caused the fault is at this address:
> NIP [c0110ddc] init_dev+0x2bc/0x584

The hex value of the instruction is also highlighted between <> here:
> Instruction dump:
> 7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 =
2f800001=20
> 409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 =
801e0060=20

Disassemble your kernel and look at offset 0x2BC relative to the label =
init_dev
=20
________________________________

From: linuxppc-dev-bounces+clive.jenkins=3Dxerox.com@ozlabs.org =
[mailto:linuxppc-dev-bounces+clive.jenkins=3Dxerox.com@ozlabs.org] On =
Behalf Of S=E9bastien Chr=E9tien
Sent: 01 September 2008 10:16
To: linuxppc-dev@ozlabs.org
Subject: Trace


Hello,

I am triying to write a tty_driver under ppc. And I get a kernel panic.
Can somebody explain me how finding the source of the error with a =
kernel panic trace :=20
thanks

Unable to handle kernel paging request for data at address 0x575555f9
Faulting instruction address: 0xc0110ddc
Oops: Kernel access of bad area, sig: 11 [#1]
Modules linked in:
NIP: c0110ddc LR: c011118c CTR: 00000000
REGS: cf01bcb0 TRAP: 0300   Not tainted  (2.6.26)
MSR: 00009032 <EE,ME,IR,DR>  CR: 44002022  XER: 20000000
DAR: 575555f9, DSISR: 40000000
TASK =3D cf01c000[1] 'swapper' THREAD: cf01a000
GPR00: 0000000c cf01bd60 cf01c000 cf04c300 ffffffff cf01bdbc 00000000 =
c01d0000=20
GPR08: 00001249 fffffffc 00000000 cf000420 84002022 00000000 10000b00 =
007fff00=20
GPR16: 0fffa1d0 00000000 00000004 cf01bdbc 007ffec0 00000000 00000000 =
00800000=20
GPR24: 00000000 c01b7650 00000002 c01d0000 ffffffff ce4a6700 cf04c300 =
57555541=20
NIP [c0110ddc] init_dev+0x2bc/0x584
LR [c011118c] tty_open+0xe8/0x3e0
Call Trace:
[cf01bd60] [cf01bd78] 0xcf01bd78 (unreliable)
[cf01bdb0] [c011118c] tty_open+0xe8/0x3e0
[cf01bde0] [c00742c8] chrdev_open+0x114/0x1b0
[cf01be10] [c006fb5c] __dentry_open+0x190/0x2e8
[cf01be40] [c006fdac] nameidata_to_filp+0x38/0x70
[cf01be60] [c007bc60] do_filp_open+0x200/0x7d0
[cf01bf10] [c00700b4] do_sys_open+0x74/0x114
[cf01bf40] [c0003c94] init_post+0x34/0x258
[cf01bf60] [c019ca64] kernel_init+0x258/0x270
[cf01bff0] [c0011b3c] kernel_thread+0x44/0x60
Instruction dump:
7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 2f800001=20
409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 =
801e0060=20
---[ end trace b7795a387aeb7786 ]---
Kernel panic - not syncing: Attempted to kill init!
allocation failed: out of vmalloc space - use vmalloc=3D<size> to =
increase size.

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

* Re: Trace
  2008-09-01 10:00 ` Trace Jenkins, Clive
@ 2008-09-01 12:25   ` Sébastien Chrétien
  2008-09-01 13:54     ` Trace Jenkins, Clive
  0 siblings, 1 reply; 14+ messages in thread
From: Sébastien Chrétien @ 2008-09-01 12:25 UTC (permalink / raw)
  To: Jenkins, Clive; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 3112 bytes --]

I found where is the failure with your advices
In init_dev (tty_io.c), init_dev calls "tty = driver->ttys[idx]"
after this call, tty value is : tty = 0x57555541

Have I to initialize driver->ttys in my driver. If yes, how have I to
Initialize this ?

The driver tty is used in order to have a console on my serial port.
Thanks for your help


2008/9/1, Jenkins, Clive <Clive.Jenkins@xerox.com>:
>
> The instruction that caused the fault is at this address:
>
> > NIP [c0110ddc] init_dev+0x2bc/0x584
>
>
> The hex value of the instruction is also highlighted between <> here:
>
> > Instruction dump:
> > 7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 2f800001
> > 409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 801e0060
>
>
> Disassemble your kernel and look at offset 0x2BC relative to the label
> init_dev
>
> ________________________________
>
> From: linuxppc-dev-bounces+clive.jenkins=xerox.com@ozlabs.org [mailto:
> linuxppc-dev-bounces+clive.jenkins <linuxppc-dev-bounces%2Bclive.jenkins>=
> xerox.com@ozlabs.org] On Behalf Of Sébastien Chrétien
> Sent: 01 September 2008 10:16
> To: linuxppc-dev@ozlabs.org
> Subject: Trace
>
>
>
> Hello,
>
> I am triying to write a tty_driver under ppc. And I get a kernel panic.
> Can somebody explain me how finding the source of the error with a kernel
> panic trace :
> thanks
>
> Unable to handle kernel paging request for data at address 0x575555f9
> Faulting instruction address: 0xc0110ddc
> Oops: Kernel access of bad area, sig: 11 [#1]
> Modules linked in:
> NIP: c0110ddc LR: c011118c CTR: 00000000
> REGS: cf01bcb0 TRAP: 0300   Not tainted  (2.6.26)
> MSR: 00009032 <EE,ME,IR,DR>  CR: 44002022  XER: 20000000
> DAR: 575555f9, DSISR: 40000000
> TASK = cf01c000[1] 'swapper' THREAD: cf01a000
> GPR00: 0000000c cf01bd60 cf01c000 cf04c300 ffffffff cf01bdbc 00000000
> c01d0000
> GPR08: 00001249 fffffffc 00000000 cf000420 84002022 00000000 10000b00
> 007fff00
> GPR16: 0fffa1d0 00000000 00000004 cf01bdbc 007ffec0 00000000 00000000
> 00800000
> GPR24: 00000000 c01b7650 00000002 c01d0000 ffffffff ce4a6700 cf04c300
> 57555541
> NIP [c0110ddc] init_dev+0x2bc/0x584
> LR [c011118c] tty_open+0xe8/0x3e0
> Call Trace:
> [cf01bd60] [cf01bd78] 0xcf01bd78 (unreliable)
> [cf01bdb0] [c011118c] tty_open+0xe8/0x3e0
> [cf01bde0] [c00742c8] chrdev_open+0x114/0x1b0
> [cf01be10] [c006fb5c] __dentry_open+0x190/0x2e8
> [cf01be40] [c006fdac] nameidata_to_filp+0x38/0x70
> [cf01be60] [c007bc60] do_filp_open+0x200/0x7d0
> [cf01bf10] [c00700b4] do_sys_open+0x74/0x114
> [cf01bf40] [c0003c94] init_post+0x34/0x258
> [cf01bf60] [c019ca64] kernel_init+0x258/0x270
> [cf01bff0] [c0011b3c] kernel_thread+0x44/0x60
> Instruction dump:
> 7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 2f800001
> 409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 801e0060
> ---[ end trace b7795a387aeb7786 ]---
> Kernel panic - not syncing: Attempted to kill init!
> allocation failed: out of vmalloc space - use vmalloc=<size> to increase
> size.
>
>

[-- Attachment #2: Type: text/html, Size: 3759 bytes --]

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

* RE: Trace
  2008-09-01 12:25   ` Trace Sébastien Chrétien
@ 2008-09-01 13:54     ` Jenkins, Clive
  2008-09-01 13:58       ` Trace Jenkins, Clive
  0 siblings, 1 reply; 14+ messages in thread
From: Jenkins, Clive @ 2008-09-01 13:54 UTC (permalink / raw)
  To: Sébastien Chrétien; +Cc: linuxppc-dev

I'm not sure that is a failure. Why can't tty have value 0x57555541 ?

I think the code in tty_io.c initialises driver->ttys and you shouldn't =
need to do anything in your driver.
=20
If you are not already aware, a useful way to explore kernel code is to =
use LXR:
http://lxr.linux.no/linux+v2.6.26/include/linux/tty_driver.h#L212
This may help you understand the tty code.
=20
Good luck!
=20
________________________________

From: S=E9bastien Chr=E9tien =
[mailto:sebastien.chretien.enseirb@gmail.com]=20
Sent: 01 September 2008 13:25
To: Jenkins, Clive
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Trace


I found where is the failure with your advices=20
In init_dev (tty_io.c), init_dev calls "tty =3D driver->ttys[idx]"
after this call, tty value is : tty =3D 0x57555541

Have I to initialize driver->ttys in my driver. If yes, how have I to =
Initialize this ?

The driver tty is used in order to have a console on my serial port.
Thanks for your help



2008/9/1, Jenkins, Clive <Clive.Jenkins@xerox.com>:=20

	The instruction that caused the fault is at this address:
=09
	> NIP [c0110ddc] init_dev+0x2bc/0x584
=09
=09
	The hex value of the instruction is also highlighted between <> here:
=09
	> Instruction dump:
	> 7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 =
2f800001
	> 409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 =
801e0060
=09
=09
	Disassemble your kernel and look at offset 0x2BC relative to the label =
init_dev
=09
	________________________________
=09
	From: linuxppc-dev-bounces+clive.jenkins=3Dxerox.com@ozlabs.org =
[mailto:linuxppc-dev-bounces+clive.jenkins =
<mailto:linuxppc-dev-bounces%2Bclive.jenkins> =3Dxerox.com@ozlabs.org] =
On Behalf Of S=E9bastien Chr=E9tien
	Sent: 01 September 2008 10:16
	To: linuxppc-dev@ozlabs.org
	Subject: Trace
=09
=09
=09
	Hello,
=09
	I am triying to write a tty_driver under ppc. And I get a kernel panic.
	Can somebody explain me how finding the source of the error with a =
kernel panic trace :
	thanks
=09
	Unable to handle kernel paging request for data at address 0x575555f9
	Faulting instruction address: 0xc0110ddc
	Oops: Kernel access of bad area, sig: 11 [#1]
	Modules linked in:
	NIP: c0110ddc LR: c011118c CTR: 00000000
	REGS: cf01bcb0 TRAP: 0300   Not tainted  (2.6.26)
	MSR: 00009032 <EE,ME,IR,DR>  CR: 44002022  XER: 20000000
	DAR: 575555f9, DSISR: 40000000
	TASK =3D cf01c000[1] 'swapper' THREAD: cf01a000
	GPR00: 0000000c cf01bd60 cf01c000 cf04c300 ffffffff cf01bdbc 00000000 =
c01d0000
	GPR08: 00001249 fffffffc 00000000 cf000420 84002022 00000000 10000b00 =
007fff00
	GPR16: 0fffa1d0 00000000 00000004 cf01bdbc 007ffec0 00000000 00000000 =
00800000
	GPR24: 00000000 c01b7650 00000002 c01d0000 ffffffff ce4a6700 cf04c300 =
57555541
	NIP [c0110ddc] init_dev+0x2bc/0x584
	LR [c011118c] tty_open+0xe8/0x3e0
	Call Trace:
	[cf01bd60] [cf01bd78] 0xcf01bd78 (unreliable)
	[cf01bdb0] [c011118c] tty_open+0xe8/0x3e0
	[cf01bde0] [c00742c8] chrdev_open+0x114/0x1b0
	[cf01be10] [c006fb5c] __dentry_open+0x190/0x2e8
	[cf01be40] [c006fdac] nameidata_to_filp+0x38/0x70
	[cf01be60] [c007bc60] do_filp_open+0x200/0x7d0
	[cf01bf10] [c00700b4] do_sys_open+0x74/0x114
	[cf01bf40] [c0003c94] init_post+0x34/0x258
	[cf01bf60] [c019ca64] kernel_init+0x258/0x270
	[cf01bff0] [c0011b3c] kernel_thread+0x44/0x60
	Instruction dump:
	7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 2f800001
	409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 =
801e0060
	---[ end trace b7795a387aeb7786 ]---
	Kernel panic - not syncing: Attempted to kill init!
	allocation failed: out of vmalloc space - use vmalloc=3D<size> to =
increase size.
=09
=09

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

* RE: Trace
  2008-09-01 13:54     ` Trace Jenkins, Clive
@ 2008-09-01 13:58       ` Jenkins, Clive
  2008-09-01 16:33         ` Trace Sébastien Chrétien
  0 siblings, 1 reply; 14+ messages in thread
From: Jenkins, Clive @ 2008-09-01 13:58 UTC (permalink / raw)
  To: Jenkins, Clive, Sébastien Chrétien; +Cc: linuxppc-dev

>  Why can't tty have value 0x57555541 ?
To answer my own question, because it ends in 1 and is not word-aligned!

-----Original Message-----
From: linuxppc-dev-bounces+clive.jenkins=3Dxerox.com@ozlabs.org =
[mailto:linuxppc-dev-bounces+clive.jenkins=3Dxerox.com@ozlabs.org] On =
Behalf Of Jenkins, Clive
Sent: 01 September 2008 14:54
To: S=E9bastien Chr=E9tien
Cc: linuxppc-dev@ozlabs.org
Subject: RE: Trace

I'm not sure that is a failure. Why can't tty have value 0x57555541 ?

I think the code in tty_io.c initialises driver->ttys and you shouldn't =
need to do anything in your driver.
=20
If you are not already aware, a useful way to explore kernel code is to =
use LXR:
http://lxr.linux.no/linux+v2.6.26/include/linux/tty_driver.h#L212
This may help you understand the tty code.
=20
Good luck!
=20
________________________________

From: S=E9bastien Chr=E9tien =
[mailto:sebastien.chretien.enseirb@gmail.com]=20
Sent: 01 September 2008 13:25
To: Jenkins, Clive
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Trace


I found where is the failure with your advices=20
In init_dev (tty_io.c), init_dev calls "tty =3D driver->ttys[idx]"
after this call, tty value is : tty =3D 0x57555541

Have I to initialize driver->ttys in my driver. If yes, how have I to =
Initialize this ?

The driver tty is used in order to have a console on my serial port.
Thanks for your help



2008/9/1, Jenkins, Clive <Clive.Jenkins@xerox.com>:=20

	The instruction that caused the fault is at this address:
=09
	> NIP [c0110ddc] init_dev+0x2bc/0x584
=09
=09
	The hex value of the instruction is also highlighted between <> here:
=09
	> Instruction dump:
	> 7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 =
2f800001
	> 409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 =
801e0060
=09
=09
	Disassemble your kernel and look at offset 0x2BC relative to the label =
init_dev
=09
	________________________________
=09
	From: linuxppc-dev-bounces+clive.jenkins=3Dxerox.com@ozlabs.org =
[mailto:linuxppc-dev-bounces+clive.jenkins =
<mailto:linuxppc-dev-bounces%2Bclive.jenkins> =3Dxerox.com@ozlabs.org] =
On Behalf Of S=E9bastien Chr=E9tien
	Sent: 01 September 2008 10:16
	To: linuxppc-dev@ozlabs.org
	Subject: Trace
=09
=09
=09
	Hello,
=09
	I am triying to write a tty_driver under ppc. And I get a kernel panic.
	Can somebody explain me how finding the source of the error with a =
kernel panic trace :
	thanks
=09
	Unable to handle kernel paging request for data at address 0x575555f9
	Faulting instruction address: 0xc0110ddc
	Oops: Kernel access of bad area, sig: 11 [#1]
	Modules linked in:
	NIP: c0110ddc LR: c011118c CTR: 00000000
	REGS: cf01bcb0 TRAP: 0300   Not tainted  (2.6.26)
	MSR: 00009032 <EE,ME,IR,DR>  CR: 44002022  XER: 20000000
	DAR: 575555f9, DSISR: 40000000
	TASK =3D cf01c000[1] 'swapper' THREAD: cf01a000
	GPR00: 0000000c cf01bd60 cf01c000 cf04c300 ffffffff cf01bdbc 00000000 =
c01d0000
	GPR08: 00001249 fffffffc 00000000 cf000420 84002022 00000000 10000b00 =
007fff00
	GPR16: 0fffa1d0 00000000 00000004 cf01bdbc 007ffec0 00000000 00000000 =
00800000
	GPR24: 00000000 c01b7650 00000002 c01d0000 ffffffff ce4a6700 cf04c300 =
57555541
	NIP [c0110ddc] init_dev+0x2bc/0x584
	LR [c011118c] tty_open+0xe8/0x3e0
	Call Trace:
	[cf01bd60] [cf01bd78] 0xcf01bd78 (unreliable)
	[cf01bdb0] [c011118c] tty_open+0xe8/0x3e0
	[cf01bde0] [c00742c8] chrdev_open+0x114/0x1b0
	[cf01be10] [c006fb5c] __dentry_open+0x190/0x2e8
	[cf01be40] [c006fdac] nameidata_to_filp+0x38/0x70
	[cf01be60] [c007bc60] do_filp_open+0x200/0x7d0
	[cf01bf10] [c00700b4] do_sys_open+0x74/0x114
	[cf01bf40] [c0003c94] init_post+0x34/0x258
	[cf01bf60] [c019ca64] kernel_init+0x258/0x270
	[cf01bff0] [c0011b3c] kernel_thread+0x44/0x60
	Instruction dump:
	7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 2f800001
	409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 =
801e0060
	---[ end trace b7795a387aeb7786 ]---
	Kernel panic - not syncing: Attempted to kill init!
	allocation failed: out of vmalloc space - use vmalloc=3D<size> to =
increase size.
=09
=09


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

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

* Re: Trace
  2008-09-01 13:58       ` Trace Jenkins, Clive
@ 2008-09-01 16:33         ` Sébastien Chrétien
  2008-09-02  0:13           ` Trace Benjamin Herrenschmidt
  0 siblings, 1 reply; 14+ messages in thread
From: Sébastien Chrétien @ 2008-09-01 16:33 UTC (permalink / raw)
  To: Jenkins, Clive; +Cc: Sébastien Chrétien, linuxppc-dev

Thanks for your answer.
Your analyse of ttys is very well. It was not my answer. All adresses in 
system.map begin with 0xc... So I think it is the case for ttys too.

I found the mistake. It came from my board_device function in struct 
console(console ->device). It didn't change the value of the parameter 
int* index.
So Linux loaded a tty_structure which was in tiny_ttys[-1]

console.h is not very well documented about this.

Thanks
Sébastien Chrétien

Jenkins, Clive a écrit :
>>  Why can't tty have value 0x57555541 ?
>>     
> To answer my own question, because it ends in 1 and is not word-aligned!
>
> -----Original Message-----
> From: linuxppc-dev-bounces+clive.jenkins=xerox.com@ozlabs.org [mailto:linuxppc-dev-bounces+clive.jenkins=xerox.com@ozlabs.org] On Behalf Of Jenkins, Clive
> Sent: 01 September 2008 14:54
> To: Sébastien Chrétien
> Cc: linuxppc-dev@ozlabs.org
> Subject: RE: Trace
>
> I'm not sure that is a failure. Why can't tty have value 0x57555541 ?
>
> I think the code in tty_io.c initialises driver->ttys and you shouldn't need to do anything in your driver.
>  
> If you are not already aware, a useful way to explore kernel code is to use LXR:
> http://lxr.linux.no/linux+v2.6.26/include/linux/tty_driver.h#L212
> This may help you understand the tty code.
>  
> Good luck!
>  
> ________________________________
>
> From: Sébastien Chrétien [mailto:sebastien.chretien.enseirb@gmail.com] 
> Sent: 01 September 2008 13:25
> To: Jenkins, Clive
> Cc: linuxppc-dev@ozlabs.org
> Subject: Re: Trace
>
>
> I found where is the failure with your advices 
> In init_dev (tty_io.c), init_dev calls "tty = driver->ttys[idx]"
> after this call, tty value is : tty = 0x57555541
>
> Have I to initialize driver->ttys in my driver. If yes, how have I to Initialize this ?
>
> The driver tty is used in order to have a console on my serial port.
> Thanks for your help
>
>
>
> 2008/9/1, Jenkins, Clive <Clive.Jenkins@xerox.com>: 
>
> 	The instruction that caused the fault is at this address:
> 	
> 	> NIP [c0110ddc] init_dev+0x2bc/0x584
> 	
> 	
> 	The hex value of the instruction is also highlighted between <> here:
> 	
> 	> Instruction dump:
> 	> 7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 2f800001
> 	> 409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 801e0060
> 	
> 	
> 	Disassemble your kernel and look at offset 0x2BC relative to the label init_dev
> 	
> 	________________________________
> 	
> 	From: linuxppc-dev-bounces+clive.jenkins=xerox.com@ozlabs.org [mailto:linuxppc-dev-bounces+clive.jenkins <mailto:linuxppc-dev-bounces%2Bclive.jenkins> =xerox.com@ozlabs.org] On Behalf Of Sébastien Chrétien
> 	Sent: 01 September 2008 10:16
> 	To: linuxppc-dev@ozlabs.org
> 	Subject: Trace
> 	
> 	
> 	
> 	Hello,
> 	
> 	I am triying to write a tty_driver under ppc. And I get a kernel panic.
> 	Can somebody explain me how finding the source of the error with a kernel panic trace :
> 	thanks
> 	
> 	Unable to handle kernel paging request for data at address 0x575555f9
> 	Faulting instruction address: 0xc0110ddc
> 	Oops: Kernel access of bad area, sig: 11 [#1]
> 	Modules linked in:
> 	NIP: c0110ddc LR: c011118c CTR: 00000000
> 	REGS: cf01bcb0 TRAP: 0300   Not tainted  (2.6.26)
> 	MSR: 00009032 <EE,ME,IR,DR>  CR: 44002022  XER: 20000000
> 	DAR: 575555f9, DSISR: 40000000
> 	TASK = cf01c000[1] 'swapper' THREAD: cf01a000
> 	GPR00: 0000000c cf01bd60 cf01c000 cf04c300 ffffffff cf01bdbc 00000000 c01d0000
> 	GPR08: 00001249 fffffffc 00000000 cf000420 84002022 00000000 10000b00 007fff00
> 	GPR16: 0fffa1d0 00000000 00000004 cf01bdbc 007ffec0 00000000 00000000 00800000
> 	GPR24: 00000000 c01b7650 00000002 c01d0000 ffffffff ce4a6700 cf04c300 57555541
> 	NIP [c0110ddc] init_dev+0x2bc/0x584
> 	LR [c011118c] tty_open+0xe8/0x3e0
> 	Call Trace:
> 	[cf01bd60] [cf01bd78] 0xcf01bd78 (unreliable)
> 	[cf01bdb0] [c011118c] tty_open+0xe8/0x3e0
> 	[cf01bde0] [c00742c8] chrdev_open+0x114/0x1b0
> 	[cf01be10] [c006fb5c] __dentry_open+0x190/0x2e8
> 	[cf01be40] [c006fdac] nameidata_to_filp+0x38/0x70
> 	[cf01be60] [c007bc60] do_filp_open+0x200/0x7d0
> 	[cf01bf10] [c00700b4] do_sys_open+0x74/0x114
> 	[cf01bf40] [c0003c94] init_post+0x34/0x258
> 	[cf01bf60] [c019ca64] kernel_init+0x258/0x270
> 	[cf01bff0] [c0011b3c] kernel_thread+0x44/0x60
> 	Instruction dump:
> 	7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 2f800001
> 	409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 801e0060
> 	---[ end trace b7795a387aeb7786 ]---
> 	Kernel panic - not syncing: Attempted to kill init!
> 	allocation failed: out of vmalloc space - use vmalloc=<size> to increase size.
> 	
> 	
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
>
>   

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

* Re: Trace
  2008-09-01 16:33         ` Trace Sébastien Chrétien
@ 2008-09-02  0:13           ` Benjamin Herrenschmidt
  2008-09-02  5:13             ` Trace Sébastien CHRETIEN
  0 siblings, 1 reply; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2008-09-02  0:13 UTC (permalink / raw)
  To: Sébastien Chrétien; +Cc: linuxppc-dev, Jenkins, Clive

On Mon, 2008-09-01 at 18:33 +0200, Sébastien Chrétien wrote:
> Thanks for your answer.
> Your analyse of ttys is very well. It was not my answer. All adresses in 
> system.map begin with 0xc... So I think it is the case for ttys too.
> 
> I found the mistake. It came from my board_device function in struct 
> console(console ->device). It didn't change the value of the parameter 
> int* index.
> So Linux loaded a tty_structure which was in tiny_ttys[-1]
> 
> console.h is not very well documented about this.

You have a custom serial port ? Why not use the framework in
drivers/serial ? Or are you using it ?

Cheers,
Ben.

> Thanks
> Sébastien Chrétien
> 
> Jenkins, Clive a écrit :
> >>  Why can't tty have value 0x57555541 ?
> >>     
> > To answer my own question, because it ends in 1 and is not word-aligned!
> >
> > -----Original Message-----
> > From: linuxppc-dev-bounces+clive.jenkins=xerox.com@ozlabs.org [mailto:linuxppc-dev-bounces+clive.jenkins=xerox.com@ozlabs.org] On Behalf Of Jenkins, Clive
> > Sent: 01 September 2008 14:54
> > To: Sébastien Chrétien
> > Cc: linuxppc-dev@ozlabs.org
> > Subject: RE: Trace
> >
> > I'm not sure that is a failure. Why can't tty have value 0x57555541 ?
> >
> > I think the code in tty_io.c initialises driver->ttys and you shouldn't need to do anything in your driver.
> >  
> > If you are not already aware, a useful way to explore kernel code is to use LXR:
> > http://lxr.linux.no/linux+v2.6.26/include/linux/tty_driver.h#L212
> > This may help you understand the tty code.
> >  
> > Good luck!
> >  
> > ________________________________
> >
> > From: Sébastien Chrétien [mailto:sebastien.chretien.enseirb@gmail.com] 
> > Sent: 01 September 2008 13:25
> > To: Jenkins, Clive
> > Cc: linuxppc-dev@ozlabs.org
> > Subject: Re: Trace
> >
> >
> > I found where is the failure with your advices 
> > In init_dev (tty_io.c), init_dev calls "tty = driver->ttys[idx]"
> > after this call, tty value is : tty = 0x57555541
> >
> > Have I to initialize driver->ttys in my driver. If yes, how have I to Initialize this ?
> >
> > The driver tty is used in order to have a console on my serial port.
> > Thanks for your help
> >
> >
> >
> > 2008/9/1, Jenkins, Clive <Clive.Jenkins@xerox.com>: 
> >
> > 	The instruction that caused the fault is at this address:
> > 	
> > 	> NIP [c0110ddc] init_dev+0x2bc/0x584
> > 	
> > 	
> > 	The hex value of the instruction is also highlighted between <> here:
> > 	
> > 	> Instruction dump:
> > 	> 7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 2f800001
> > 	> 409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 801e0060
> > 	
> > 	
> > 	Disassemble your kernel and look at offset 0x2BC relative to the label init_dev
> > 	
> > 	________________________________
> > 	
> > 	From: linuxppc-dev-bounces+clive.jenkins=xerox.com@ozlabs.org [mailto:linuxppc-dev-bounces+clive.jenkins <mailto:linuxppc-dev-bounces%2Bclive.jenkins> =xerox.com@ozlabs.org] On Behalf Of Sébastien Chrétien
> > 	Sent: 01 September 2008 10:16
> > 	To: linuxppc-dev@ozlabs.org
> > 	Subject: Trace
> > 	
> > 	
> > 	
> > 	Hello,
> > 	
> > 	I am triying to write a tty_driver under ppc. And I get a kernel panic.
> > 	Can somebody explain me how finding the source of the error with a kernel panic trace :
> > 	thanks
> > 	
> > 	Unable to handle kernel paging request for data at address 0x575555f9
> > 	Faulting instruction address: 0xc0110ddc
> > 	Oops: Kernel access of bad area, sig: 11 [#1]
> > 	Modules linked in:
> > 	NIP: c0110ddc LR: c011118c CTR: 00000000
> > 	REGS: cf01bcb0 TRAP: 0300   Not tainted  (2.6.26)
> > 	MSR: 00009032 <EE,ME,IR,DR>  CR: 44002022  XER: 20000000
> > 	DAR: 575555f9, DSISR: 40000000
> > 	TASK = cf01c000[1] 'swapper' THREAD: cf01a000
> > 	GPR00: 0000000c cf01bd60 cf01c000 cf04c300 ffffffff cf01bdbc 00000000 c01d0000
> > 	GPR08: 00001249 fffffffc 00000000 cf000420 84002022 00000000 10000b00 007fff00
> > 	GPR16: 0fffa1d0 00000000 00000004 cf01bdbc 007ffec0 00000000 00000000 00800000
> > 	GPR24: 00000000 c01b7650 00000002 c01d0000 ffffffff ce4a6700 cf04c300 57555541
> > 	NIP [c0110ddc] init_dev+0x2bc/0x584
> > 	LR [c011118c] tty_open+0xe8/0x3e0
> > 	Call Trace:
> > 	[cf01bd60] [cf01bd78] 0xcf01bd78 (unreliable)
> > 	[cf01bdb0] [c011118c] tty_open+0xe8/0x3e0
> > 	[cf01bde0] [c00742c8] chrdev_open+0x114/0x1b0
> > 	[cf01be10] [c006fb5c] __dentry_open+0x190/0x2e8
> > 	[cf01be40] [c006fdac] nameidata_to_filp+0x38/0x70
> > 	[cf01be60] [c007bc60] do_filp_open+0x200/0x7d0
> > 	[cf01bf10] [c00700b4] do_sys_open+0x74/0x114
> > 	[cf01bf40] [c0003c94] init_post+0x34/0x258
> > 	[cf01bf60] [c019ca64] kernel_init+0x258/0x270
> > 	[cf01bff0] [c0011b3c] kernel_thread+0x44/0x60
> > 	Instruction dump:
> > 	7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 2f800001
> > 	409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 801e0060
> > 	---[ end trace b7795a387aeb7786 ]---
> > 	Kernel panic - not syncing: Attempted to kill init!
> > 	allocation failed: out of vmalloc space - use vmalloc=<size> to increase size.
> > 	
> > 	
> >
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-dev
> >
> >
> >   
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

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

* Re: Trace
  2008-09-02  0:13           ` Trace Benjamin Herrenschmidt
@ 2008-09-02  5:13             ` Sébastien CHRETIEN
  2008-09-02  5:45               ` Trace Benjamin Herrenschmidt
  0 siblings, 1 reply; 14+ messages in thread
From: Sébastien CHRETIEN @ 2008-09-02  5:13 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev, Sébastien Chrétien, Jenkins, Clive

My board has only a uart device on a FPGA. I don't use the serial layer 
because it isn't documented in Linux Device Driver 3rd. Only the tty 
layer is documented

Benjamin Herrenschmidt a écrit :
> On Mon, 2008-09-01 at 18:33 +0200, Sébastien Chrétien wrote:
>   
>> Thanks for your answer.
>> Your analyse of ttys is very well. It was not my answer. All adresses in 
>> system.map begin with 0xc... So I think it is the case for ttys too.
>>
>> I found the mistake. It came from my board_device function in struct 
>> console(console ->device). It didn't change the value of the parameter 
>> int* index.
>> So Linux loaded a tty_structure which was in tiny_ttys[-1]
>>
>> console.h is not very well documented about this.
>>     
>
> You have a custom serial port ? Why not use the framework in
> drivers/serial ? Or are you using it ?
>
> Cheers,
> Ben.
>
>   
>> Thanks
>> Sébastien Chrétien
>>
>> Jenkins, Clive a écrit :
>>     
>>>>  Why can't tty have value 0x57555541 ?
>>>>     
>>>>         
>>> To answer my own question, because it ends in 1 and is not word-aligned!
>>>
>>> -----Original Message-----
>>> From: linuxppc-dev-bounces+clive.jenkins=xerox.com@ozlabs.org [mailto:linuxppc-dev-bounces+clive.jenkins=xerox.com@ozlabs.org] On Behalf Of Jenkins, Clive
>>> Sent: 01 September 2008 14:54
>>> To: Sébastien Chrétien
>>> Cc: linuxppc-dev@ozlabs.org
>>> Subject: RE: Trace
>>>
>>> I'm not sure that is a failure. Why can't tty have value 0x57555541 ?
>>>
>>> I think the code in tty_io.c initialises driver->ttys and you shouldn't need to do anything in your driver.
>>>  
>>> If you are not already aware, a useful way to explore kernel code is to use LXR:
>>> http://lxr.linux.no/linux+v2.6.26/include/linux/tty_driver.h#L212
>>> This may help you understand the tty code.
>>>  
>>> Good luck!
>>>  
>>> ________________________________
>>>
>>> From: Sébastien Chrétien [mailto:sebastien.chretien.enseirb@gmail.com] 
>>> Sent: 01 September 2008 13:25
>>> To: Jenkins, Clive
>>> Cc: linuxppc-dev@ozlabs.org
>>> Subject: Re: Trace
>>>
>>>
>>> I found where is the failure with your advices 
>>> In init_dev (tty_io.c), init_dev calls "tty = driver->ttys[idx]"
>>> after this call, tty value is : tty = 0x57555541
>>>
>>> Have I to initialize driver->ttys in my driver. If yes, how have I to Initialize this ?
>>>
>>> The driver tty is used in order to have a console on my serial port.
>>> Thanks for your help
>>>
>>>
>>>
>>> 2008/9/1, Jenkins, Clive <Clive.Jenkins@xerox.com>: 
>>>
>>> 	The instruction that caused the fault is at this address:
>>> 	
>>> 	> NIP [c0110ddc] init_dev+0x2bc/0x584
>>> 	
>>> 	
>>> 	The hex value of the instruction is also highlighted between <> here:
>>> 	
>>> 	> Instruction dump:
>>> 	> 7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 2f800001
>>> 	> 409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 801e0060
>>> 	
>>> 	
>>> 	Disassemble your kernel and look at offset 0x2BC relative to the label init_dev
>>> 	
>>> 	________________________________
>>> 	
>>> 	From: linuxppc-dev-bounces+clive.jenkins=xerox.com@ozlabs.org [mailto:linuxppc-dev-bounces+clive.jenkins <mailto:linuxppc-dev-bounces%2Bclive.jenkins> =xerox.com@ozlabs.org] On Behalf Of Sébastien Chrétien
>>> 	Sent: 01 September 2008 10:16
>>> 	To: linuxppc-dev@ozlabs.org
>>> 	Subject: Trace
>>> 	
>>> 	
>>> 	
>>> 	Hello,
>>> 	
>>> 	I am triying to write a tty_driver under ppc. And I get a kernel panic.
>>> 	Can somebody explain me how finding the source of the error with a kernel panic trace :
>>> 	thanks
>>> 	
>>> 	Unable to handle kernel paging request for data at address 0x575555f9
>>> 	Faulting instruction address: 0xc0110ddc
>>> 	Oops: Kernel access of bad area, sig: 11 [#1]
>>> 	Modules linked in:
>>> 	NIP: c0110ddc LR: c011118c CTR: 00000000
>>> 	REGS: cf01bcb0 TRAP: 0300   Not tainted  (2.6.26)
>>> 	MSR: 00009032 <EE,ME,IR,DR>  CR: 44002022  XER: 20000000
>>> 	DAR: 575555f9, DSISR: 40000000
>>> 	TASK = cf01c000[1] 'swapper' THREAD: cf01a000
>>> 	GPR00: 0000000c cf01bd60 cf01c000 cf04c300 ffffffff cf01bdbc 00000000 c01d0000
>>> 	GPR08: 00001249 fffffffc 00000000 cf000420 84002022 00000000 10000b00 007fff00
>>> 	GPR16: 0fffa1d0 00000000 00000004 cf01bdbc 007ffec0 00000000 00000000 00800000
>>> 	GPR24: 00000000 c01b7650 00000002 c01d0000 ffffffff ce4a6700 cf04c300 57555541
>>> 	NIP [c0110ddc] init_dev+0x2bc/0x584
>>> 	LR [c011118c] tty_open+0xe8/0x3e0
>>> 	Call Trace:
>>> 	[cf01bd60] [cf01bd78] 0xcf01bd78 (unreliable)
>>> 	[cf01bdb0] [c011118c] tty_open+0xe8/0x3e0
>>> 	[cf01bde0] [c00742c8] chrdev_open+0x114/0x1b0
>>> 	[cf01be10] [c006fb5c] __dentry_open+0x190/0x2e8
>>> 	[cf01be40] [c006fdac] nameidata_to_filp+0x38/0x70
>>> 	[cf01be60] [c007bc60] do_filp_open+0x200/0x7d0
>>> 	[cf01bf10] [c00700b4] do_sys_open+0x74/0x114
>>> 	[cf01bf40] [c0003c94] init_post+0x34/0x258
>>> 	[cf01bf60] [c019ca64] kernel_init+0x258/0x270
>>> 	[cf01bff0] [c0011b3c] kernel_thread+0x44/0x60
>>> 	Instruction dump:
>>> 	7d808120 4e800020 7c832378 4bfa9ea9 7c7f1b79 418201f0 a81e0062 2f800001
>>> 	409efd98 83ff00d0 2c1f0000 4182fd90 <801f00b8> 70090080 408201b0 801e0060
>>> 	---[ end trace b7795a387aeb7786 ]---
>>> 	Kernel panic - not syncing: Attempted to kill init!
>>> 	allocation failed: out of vmalloc space - use vmalloc=<size> to increase size.
>>> 	
>>> 	
>>>
>>>
>>> _______________________________________________
>>> Linuxppc-dev mailing list
>>> Linuxppc-dev@ozlabs.org
>>> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>>>
>>>
>>>   
>>>       
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>>     
>
>
>   

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

* Re: Trace
  2008-09-02  5:13             ` Trace Sébastien CHRETIEN
@ 2008-09-02  5:45               ` Benjamin Herrenschmidt
  2008-09-02  7:34                 ` Trace Sébastien Chrétien
  0 siblings, 1 reply; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2008-09-02  5:45 UTC (permalink / raw)
  To: Sébastien CHRETIEN
  Cc: linuxppc-dev, Sébastien Chrétien, Jenkins, Clive

On Tue, 2008-09-02 at 07:13 +0200, Sébastien CHRETIEN wrote:
> My board has only a uart device on a FPGA. I don't use the serial layer 
> because it isn't documented in Linux Device Driver 3rd. Only the tty 
> layer is documented

You won't go very far in linux kernel dev. with using books like
that :-)

Look at other drivers in drivers/serial that should give you all the
information you need :-0

Cheers,
Ben.

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

* Re: Trace
  2008-09-02  5:45               ` Trace Benjamin Herrenschmidt
@ 2008-09-02  7:34                 ` Sébastien Chrétien
  2008-09-02  8:19                   ` Trace Benjamin Herrenschmidt
  0 siblings, 1 reply; 14+ messages in thread
From: Sébastien Chrétien @ 2008-09-02  7:34 UTC (permalink / raw)
  To: benh; +Cc: Sébastien CHRETIEN, linuxppc-dev, Jenkins, Clive

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

ok is it a bad way to write a tty driver ? why ?

2008/9/2, Benjamin Herrenschmidt <benh@kernel.crashing.org>:
>
> On Tue, 2008-09-02 at 07:13 +0200, Sébastien CHRETIEN wrote:
> > My board has only a uart device on a FPGA. I don't use the serial layer
> > because it isn't documented in Linux Device Driver 3rd. Only the tty
> > layer is documented
>
>
> You won't go very far in linux kernel dev. with using books like
> that :-)
>
> Look at other drivers in drivers/serial that should give you all the
> information you need :-0
>
> Cheers,
> Ben.
>
>
>

[-- Attachment #2: Type: text/html, Size: 865 bytes --]

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

* Re: Trace
  2008-09-02  7:34                 ` Trace Sébastien Chrétien
@ 2008-09-02  8:19                   ` Benjamin Herrenschmidt
  2008-09-02  8:44                     ` Trace Sébastien Chrétien
  2008-09-04 20:19                     ` Trace Sébastien Chrétien
  0 siblings, 2 replies; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2008-09-02  8:19 UTC (permalink / raw)
  To: Sébastien Chrétien
  Cc: Sébastien CHRETIEN, linuxppc-dev, Jenkins, Clive

On Tue, 2008-09-02 at 09:34 +0200, Sébastien Chrétien wrote:
> ok is it a bad way to write a tty driver ? why ?

Not necessarily, it's just overkill. The UART layer handles a lot
of stuff for you. The tty layer is tricky to get right.

Cheers,
Ben.

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

* Re: Trace
  2008-09-02  8:19                   ` Trace Benjamin Herrenschmidt
@ 2008-09-02  8:44                     ` Sébastien Chrétien
  2008-09-04 20:19                     ` Trace Sébastien Chrétien
  1 sibling, 0 replies; 14+ messages in thread
From: Sébastien Chrétien @ 2008-09-02  8:44 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

ok. I will try the serial layer

2008/9/2, Benjamin Herrenschmidt <benh@kernel.crashing.org>:
>
> On Tue, 2008-09-02 at 09:34 +0200, Sébastien Chrétien wrote:
> > ok is it a bad way to write a tty driver ? why ?
>
>
> Not necessarily, it's just overkill. The UART layer handles a lot
> of stuff for you. The tty layer is tricky to get right.
>
> Cheers,
> Ben.
>
>

[-- Attachment #2: Type: text/html, Size: 644 bytes --]

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

* Re: Trace
  2008-09-02  8:19                   ` Trace Benjamin Herrenschmidt
  2008-09-02  8:44                     ` Trace Sébastien Chrétien
@ 2008-09-04 20:19                     ` Sébastien Chrétien
  1 sibling, 0 replies; 14+ messages in thread
From: Sébastien Chrétien @ 2008-09-04 20:19 UTC (permalink / raw)
  To: benh; +Cc: Sébastien Chrétien, Jenkins, Clive, linuxppc-dev, EN


I followed your advice : I used the UART layer.
It is easier.
Thanks


Benjamin Herrenschmidt a écrit :
> On Tue, 2008-09-02 at 09:34 +0200, Sébastien Chrétien wrote:
>   
>> ok is it a bad way to write a tty driver ? why ?
>>     
>
> Not necessarily, it's just overkill. The UART layer handles a lot
> of stuff for you. The tty layer is tricky to get right.
>
> Cheers,
> Ben.
>
>
>   

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

end of thread, other threads:[~2008-09-04 20:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-01  9:16 Trace Sébastien Chrétien
2008-09-01  9:23 ` Trace Benjamin Herrenschmidt
2008-09-01 10:00 ` Trace Jenkins, Clive
2008-09-01 12:25   ` Trace Sébastien Chrétien
2008-09-01 13:54     ` Trace Jenkins, Clive
2008-09-01 13:58       ` Trace Jenkins, Clive
2008-09-01 16:33         ` Trace Sébastien Chrétien
2008-09-02  0:13           ` Trace Benjamin Herrenschmidt
2008-09-02  5:13             ` Trace Sébastien CHRETIEN
2008-09-02  5:45               ` Trace Benjamin Herrenschmidt
2008-09-02  7:34                 ` Trace Sébastien Chrétien
2008-09-02  8:19                   ` Trace Benjamin Herrenschmidt
2008-09-02  8:44                     ` Trace Sébastien Chrétien
2008-09-04 20:19                     ` Trace Sébastien Chrétien

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).