From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 12 Jul 2005 19:09:35 +0100 (BST) Received: from 81-174-11-161.f5.ngi.it ([IPv6:::ffff:81.174.11.161]:61313 "EHLO gundam.enneenne.com") by linux-mips.org with ESMTP id ; Tue, 12 Jul 2005 19:09:12 +0100 Received: from giometti by gundam.enneenne.com with local (Exim 3.36 #1 (Debian)) id 1DsPCv-0005cl-00 for ; Tue, 12 Jul 2005 20:10:13 +0200 Date: Tue, 12 Jul 2005 20:10:13 +0200 From: Rodolfo Giometti To: linux-mips@linux-mips.org Subject: Re: power management status for au1100 Message-ID: <20050712181013.GC9234@gundam.enneenne.com> References: <20050712142202.GB9234@gundam.enneenne.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4SFOXa2GPu3tIq4H" Content-Disposition: inline In-Reply-To: <20050712142202.GB9234@gundam.enneenne.com> Organization: Programmi e soluzioni GNU/Linux X-PGP-Key: gpg --keyserver keyserver.penguin.de --recv-keys D25A5633 User-Agent: Mutt/1.5.5.1+cvs20040105i Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 8465 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: giometti@linux.it Precedence: bulk X-list: linux-mips --4SFOXa2GPu3tIq4H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =3D handler; + action.flags =3D 0; + action.mask =3D 0; + action.name =3D "Au1xxx TOY"; + action.handler =3D handler; + action.next =3D NULL; + + irq_desc[AU1000_TOY_MATCH2_INT].action =3D &action; + irq_desc[AU1000_TOY_MATCH2_INT].status + &=3D ~(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 =3D au_ffs(intc0_req1) - 1; intc0_req1 &=3D ~(1<] 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 240400= 1e 24050001 0c04e2c9=20 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 --=20 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 --4SFOXa2GPu3tIq4H Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFC1AeFQaTCYNJaVjMRAsLlAJ48XrghsRDlwUJaPEt/ogPlWf2YxwCg0okm XZKTUCFS+CD/9gzycFFnE5c= =jyfE -----END PGP SIGNATURE----- --4SFOXa2GPu3tIq4H--