From: Rodolfo Giometti <giometti@linux.it>
To: Dan Malek <dan@embeddededge.com>
Cc: linux-mips@linux-mips.org
Subject: Re: power management status for au1100
Date: Sat, 16 Jul 2005 17:19:50 +0200 [thread overview]
Message-ID: <20050716151950.GF26127@enneenne.com> (raw)
In-Reply-To: <a2882b70a3d6c0f32728086e0c63764c@embeddededge.com>
[-- Attachment #1: Type: text/plain, Size: 1934 bytes --]
Looking function mips_timer_interrupt() (which is the normal timer
interrupt when PM is not enabled) I noticed that it has called from
file «arch/mips/au1000/common/int-handler.S» as follow:
...
.text
.set macro
.set noat
.align 5
NESTED(au1000_IRQ, PT_SIZE, sp)
SAVE_ALL
CLI # Important: mark KERNEL mode !
mfc0 t0,CP0_CAUSE # get pending interrupts
mfc0 t1,CP0_STATUS # get enabled interrupts
and t0,t1 # isolate allowed ones
andi t0,0xff00 # isolate pending bits
beqz t0, 3f # spurious interrupt
andi a0, t0, CAUSEF_IP7
beq a0, zero, 1f
move a0, sp
jal mips_timer_interrupt
j ret_from_irq
...
Looking at «CLI» implementation into «include/asm/stackframe.h»:
/*
* Move to kernel mode and disable interrupts.
* Set cp0 enable bit as sign that we're running on the kernel stack
*/
.macro CLI
mfc0 t0, CP0_STATUS
li t1, ST0_CU0 | 0x1f
or t0, t1
xori t0, 0x1f
mtc0 t0, CP0_STATUS
irq_disable_hazard
.endm
I see that the CLI macro ensures that mips_timer_interrupt() will be
executed into «kernel mode».
What do you think about that? Can it cause the error «Break
instruction in kernel code in arch/mips/kernel/traps.c::do_bp, line
629[#1]:»?
If so, can someone help me in fixing such bug? I'm not a MIPS assembly
master! ;-p
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti@linux.it
Linux Device Driver giometti@enneenne.com
Embedded Systems home page: giometti.enneenne.com
UNIX programming phone: +39 349 2432127
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-07-16 15:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-12 14:22 power management status for au1100 Rodolfo Giometti
2005-07-12 15:56 ` Dan Malek
2005-07-12 18:10 ` Rodolfo Giometti
2005-07-12 18:52 ` Dan Malek
2005-07-16 14:45 ` Rodolfo Giometti
2005-07-16 14:49 ` Au1100 real time clock [was: power management status for au1100] Rodolfo Giometti
2005-07-16 15:19 ` Rodolfo Giometti [this message]
2005-07-18 17:30 ` Power Management for au1100 fixed! :) Rodolfo Giometti
2005-07-19 1:02 ` Dan Malek
2005-07-19 7:07 ` Pete Popov
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=20050716151950.GF26127@enneenne.com \
--to=giometti@linux.it \
--cc=dan@embeddededge.com \
--cc=linux-mips@linux-mips.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 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.