Skip to contentSkip to conversation

printk in m8xx_cpm_dpalloc() ???

DISCUSSION Steven Scholz 2 participants 3 messages Apr 24, 2002

lore
Share & tools
lore
#0 lore raw

Hi there,

I thought I put a printk just for debug reasons into the function m8xx_cpm_dpalloc (in arch/ppc/8xx_io/commproc.c).

But now the kernel hangs while starting the CPM UART driver!

...
Decrementer Frequency = 300000000/60
m8xx_cpm_dpalloc: 8 bytes @ 0x0808 !!!!!!!!!!!!!
m8xx_cpm_dpalloc: 16 bytes @ 0x0818 !!!!!!!!!!!!!
Calibrating delay loop... 79.66 BogoMIPS
Memory: 14596k available (1056k kernel code, 396k data, 52k init, 0k highmem)
Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes) Inode-cache hash table entries: 1024 (order: 1, 8192 bytes) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes) Page-cache hash table entries: 4096 (order: 2, 16384 bytes) POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket
Starting kswapd
CPM UART driver version 0.03
ttyS00 at 0x0280 is a SMC !!!!!!!!!!!!!
...
And nothing more happens!

Does anyone know why?

Cheers,

Steven

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw

I had the same problem. printk() uses the CPM UART driver, and the initialisation of the CPM UART driver uses m8xx_cpm_dpalloc(). If you make m8xx_cpm_dpalloc() use printk() then you create a dependency loop. Don't do it.

Alex

Quoted 29 lines · Steven Scholz

Hi there,

I thought I put a printk just for debug reasons into the function m8xx_cpm_dpalloc (in arch/ppc/8xx_io/commproc.c).

But now the kernel hangs while starting the CPM UART driver!

...
Decrementer Frequency = 300000000/60
m8xx_cpm_dpalloc: 8 bytes @ 0x0808 !!!!!!!!!!!!!
m8xx_cpm_dpalloc: 16 bytes @ 0x0818 !!!!!!!!!!!!!
Calibrating delay loop... 79.66 BogoMIPS
Memory: 14596k available (1056k kernel code, 396k data, 52k init, 0k highmem)
Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes) Inode-cache hash table entries: 1024 (order: 1, 8192 bytes) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes) Page-cache hash table entries: 4096 (order: 2, 16384 bytes) POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket
Starting kswapd
CPM UART driver version 0.03
ttyS00 at 0x0280 is a SMC !!!!!!!!!!!!!
...
And nothing more happens!

Quoted 8 lines

Does anyone know why?

Cheers,

Steven

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw
Quoted 3 lines · Alex Zeffertt

I had the same problem. printk() uses the CPM UART driver, and the initialisation of the CPM UART driver uses m8xx_cpm_dpalloc(). If you make m8xx_cpm_dpalloc() use printk() then you create a dependency loop. Don't do it.

Thanks for your fast reply.

But I am not sure if I understand the problem.

printk() is used long before the CPM UART driver is initialized (or am I wrong).

So how is printk done before this driver is started, i.e. rs_8xx_init is called?
And can I output some string to the console without using the CPM UART driver?

Steven

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/