From: "Nicolas FR" <nicolasfr@gmail.com>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: sc3200 cpu + apm module kernel crash
Date: Sun, 5 Nov 2006 22:33:58 +0100 [thread overview]
Message-ID: <b9481e140611051333p7250179ax6ba3629fcf0ad9e3@mail.gmail.com> (raw)
In-Reply-To: <1162750917.31873.38.camel@localhost.localdomain>
I have finally traced down the bug (Tatung webpad TWN-5213CU with SC3200 CPU):
- in apm_mainloop there is an for(;;) loop, which set a
scheduler_timeout (1second) and then calls apm_event_handler().
- apm_event_handler does some checks and calls check_events();
- check_events has a loop:
while ((event = get_event()) != 0) { switch (event) {...} }
The module was "crashing" on my box because it keeps on receiving
events=APM_UPDATE_TIME meaning that it would never get out of the
while() loop in check_events. I need to do some tests but I might
simply fix this by ignoring APM_UPDATE_TIME events. I first thought
replacing the "while ((event = get_event()) != 0)" by an "if ((event =
get_event()) != 0)" but maybe I would miss other events doing this?
Best regards,
Nicolas.
PS: btw, thanks for your email that's really nice to answer every
message on this mailing list.
On 11/5/06, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> Ar Sad, 2006-11-04 am 00:06 +0100, ysgrifennodd Nicolas FR:
> > I have thrown a bunch of "printk(KERN_INFO "apm: I am here\n");" and
> > noticed the crash is happening just when calling apm_event_handler();
> > and does not even execute any instruction in this function... This is
> > the point I don't understand, how can it crash just on calling a
> > function and not executing the first statement in this function?
>
> APM is BIOS code so the assembler inlines trap into the firmware and the
> firmware sometimes isn't very good, particularly the 32bit entry points
> which are not used by a certain other vendors products.
>
> In those cases you need to trace the asm code in the firmware and see if
> the firmware is buggy.
>
>
next prev parent reply other threads:[~2006-11-05 21:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-03 23:06 Nicolas FR
2006-11-05 18:21 ` Alan Cox
2006-11-05 21:33 ` Nicolas FR [this message]
2006-11-05 23:21 ` Alan Cox
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=b9481e140611051333p7250179ax6ba3629fcf0ad9e3@mail.gmail.com \
--to=nicolasfr@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®