From: Rodolfo Giometti <giometti@linux.it>
To: linux-mips@linux-mips.org
Subject: Re: power management status for au1100
Date: Tue, 12 Jul 2005 20:10:13 +0200 [thread overview]
Message-ID: <20050712181013.GC9234@gundam.enneenne.com> (raw)
In-Reply-To: <20050712142202.GB9234@gundam.enneenne.com>
[-- Attachment #1: Type: text/plain, Size: 5356 bytes --]
Looking at linux-2.6.10 I notice that the function
startup_match20_interrupt() has been mofified as follow:
#ifdef CONFIG_PM
-void startup_match20_interrupt(void)
+void startup_match20_interrupt(void (*handler)(int, void *, struct
pt_regs *))
{
+ static struct irqaction action;
+ /* This is a big problem.... since we didn't use request_irq
+ when kernel/irq.c calls probe_irq_xxx this interrupt will
+ be probed for usage. This will end up disabling the device :(
+
+ Give it a bogus "action" pointer -- this will keep it from
+ getting auto-probed!
+
+ By setting the status to match that of request_irq() we
+ can avoid it. --cgray
+ */
+ action.dev_id = handler;
+ action.flags = 0;
+ action.mask = 0;
+ action.name = "Au1xxx TOY";
+ action.handler = handler;
+ action.next = NULL;
+
+ irq_desc[AU1000_TOY_MATCH2_INT].action = &action;
+ irq_desc[AU1000_TOY_MATCH2_INT].status
+ &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING |
IRQ_INPROGRESS);
+
local_enable_irq(AU1000_TOY_MATCH2_INT);
}
#endif
and the irq dispatcher has been modified as follow:
irq = au_ffs(intc0_req1) - 1;
intc0_req1 &= ~(1<<irq);
-#ifdef CONFIG_PM
- if (irq == AU1000_TOY_MATCH2_INT) {
- mask_and_ack_rise_edge_irq(irq);
- counter0_irq(irq, NULL, regs);
- local_enable_irq(irq);
- }
- else
-#endif
- {
- do_IRQ(irq, regs);
- }
+ do_IRQ(irq, regs);
}
Well, running old code on my au1100 I have no problem but using new one I
got:
Linux version 2.6.12 (giometti@vvonth) (gcc version 3.4.3) #29 Tue Jul 12 19:41:24 CEST 2005
CPU revision is: 02030204
AMD Alchemy WWPC Board
(PRId 02030204) @ 396MHZ
BCLK switching enabled!
Determined physical RAM map:
memory: 04000000 @ 00000000 (usable)
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/nfs rw nfsroot=192.168.32.254:/home/develop/embedded/mipsel/distro/_geek ip=192.168.32.23:192.168.32.254::255.255.255.0:wwpc:eth0:off
Primary instruction cache 16kB, physically tagged, 4-way, linesize 32 bytes.
Primary data cache 16kB, 4-way, linesize 32 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 512 (order: 9, 8192 bytes)
calculating r4koff... 00060ae0(396000)
CPU frequency 396.00 MHz
Console: colour dummy device 80x25
Break instruction in kernel code in arch/mips/kernel/traps.c::do_bp, line 629[#1]:
Cpu 0
$ 0 : 00000000 10007c00 00000000 000f41fa
$ 4 : 80462000 000f41fa 00000000 00000000
$ 8 : 26aa8a40 000f41fa 80462000 00000000
$12 : 0000006e fffffffa ffffffff 0000000a
$16 : 00000af8 804d0000 80461ef0 804d0000
$20 : 80461e18 80462000 00000002 00000000
$24 : 00000001 80461dea
$28 : 80460000 80461e08 83fc92b8 8010277c
Hi : 000f41fa
Lo : 26aa8a40
epc : 80148b28 run_posix_cpu_timers+0x804/0x86c Not tainted
ra : 8010277c counter0_irq+0x98/0x168
Status: 10007c03 KERNEL EXL IE
Cause : 00808024
PrId : 02030204
Modules linked in:
Process swapper (pid: 0, threadinfo=80460000, task=80462000)
Stack : 000003f4 000003f4 38313932 804c8934 80461e18 80461e18 00000000 00000000
80462000 00000000 00000af8 804d0000 80461ef0 804d0000 00000b1b 00000011
00000002 00000000 83fc92b8 8010277c 804de270 00000013 804de270 80461ec8
804cf9d4 00000000 00000000 00000001 80461ef0 80150964 804e0000 80435d90
00000002 10007c00 804a4220 00000011 804cf9d4 804e0000 80461ef0 83f43c00
...
Call Trace:
[<8010277c>] counter0_irq+0x98/0x168
[<80150964>] handle_IRQ_event+0x7c/0x134
[<80150b24>] __do_IRQ+0x108/0x194
[<804be264>] uart_set_options+0xe0/0x178
[<8010600c>] do_IRQ+0x1c/0x34
[<80101390>] au1000_IRQ+0x150/0x1a0
[<801292d8>] __call_console_drivers+0x80/0xac
[<80416fc4>] _etext+0x0/0x8f03c
[<804a6700>] start_kernel+0x11c/0x254
[<804a6710>] start_kernel+0x12c/0x254
[<804a6134>] unknown_bootoption+0x0/0x310
Code: aea30140 08052103 aea4013c <0200000d> 080520de 8ea4013c 2404001e 24050001 0c04e2c9
Kernel panic - not syncing: Aiee, killing interrupt handler!
I suppose the problem is when function startup_match20_interrupt()
tries to install the irq handler for the counter0.
Why did you modify such function?
Where could be the problem in the new code?
Should we come back to the old code? ;-p
Thanks,
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-12 18:09 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 [this message]
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 ` power management status for au1100 Rodolfo Giometti
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=20050712181013.GC9234@gundam.enneenne.com \
--to=giometti@linux.it \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox