From: diak sim <sim.diak@yahoo.com.cn>
To: linuxppc-embedded@ozlabs.org
Subject: port linux-2.6 to ml410, problem on disabling external interrupts
Date: Tue, 8 Jan 2008 21:40:32 +0800 (CST) [thread overview]
Message-ID: <486779.44671.qm@web92013.mail.cnb.yahoo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2157 bytes --]
there is a strange problem.
my platform is ml410, port linux-2.6.23rc2 vertex kernel to it. the toolchain is generated by crosstool. the cross-gcc is powerpc-405-linux-gnu-gcc 4.0.2.when i complete the kernel compiling and download it to the board to run, there are a few questions.
at first, i can't see anything output after "Now booting the kernel". through debugging i found that init_IRQ() function in init/main.c can't run to the end. so i cut it and rerun the kernel. it runs so long until the rootfs is mounted. the problem occurs in executing /linuxrc. it says "init has generated signal 4 but has no handler for it". the reason, i've known, is that i disabled the init_IRQ() function. then i get down to search for the wrong point.
the init_IRQ() called in init/main.c is defined in arch/powerpc/kernel/irq.c. init_IRQ() calls ppc_md.init_IRQ(). ppc_md is a variable of "struct machdep_calls". the ppc_md.init_IRQ is evaluated in arch/ppc/syslib/ppc4xx_setup.c. the statement is ppc_md.init_IRQ = ppc4xx_init_IRQ. and the ppc4xx_init_IRQ() calls ppc4xx_pic_init() defined in arch/ppc/syslib/xilinx_pic.c.
tracing into ppc4xx_pic_init() function, i located the problem at "intc_out_be32(intc + IER, 0)". "intc_out_be32" is a macro as the real form "out_be32((addr), (mask))". the out_be32() is a function defined in include/asm-ppc/io.h.
extern inline void out_be32(volatile unsigned __iomem *addr, int val)
{
__asm__ __volatile__("sync; stw%U0%X0 %1,%0" : "=m" (*addr) : "r" (val));
}
i replace "intc_out_be32(intc + IER, 0)" with the assemble statements and rerun, nothing changes.
XPS's debugger points out that the kernel stop in _delay() function. but there is not any call to this function. only the 2 assemble statements are there.
dividing the "sync" and "stw" into 2 __asm__ ones, "sync" is passed but "stw" makes a strange _delay() calling.
so strange it is, who can help me?
thanks.
___________________________________________________________
雅虎邮箱传递新年祝福,个性贺卡送亲朋!
http://cn.mail.yahoo.com/gc/index.html?entry=5&souce=mail_mailletter_tagline
[-- Attachment #2: Type: text/html, Size: 2401 bytes --]
reply other threads:[~2008-01-08 13:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=486779.44671.qm@web92013.mail.cnb.yahoo.com \
--to=sim.diak@yahoo.com.cn \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox