linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Latest OpenPic changes
@ 2000-02-11 16:43 Geert Uytterhoeven
  2000-02-11 17:05 ` Benjamin Herrenschmidt
  2000-02-11 17:11 ` Gabriel Paubert
  0 siblings, 2 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2000-02-11 16:43 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Linux/PPC Development, linuxppc-bk


	Hi Ben,

After two days of hacking I finally found out what went wrong. Your changes to
the OpenPIC code cause my machine to hang in openpic_enable_irq(). I added a
timeout to the do { ... } while (...) loop:

void openpic_enable_irq(u_int irq)
{
        int timeout = 1000000;
        check_arg_irq(irq);
        openpic_clearfield(&ISU[irq - open_pic_irq_offset].Vector_Priority, OPENPIC_MASK);
        /* make sure mask gets to controller before we return to user */
        do {
                mb(); /* sync is probably useless here */
        } while(openpic_readfield(&OpenPIC->Source[irq].Vector_Priority,
                        OPENPIC_MASK) && --timeout);
        if (!timeout)
            printk("openpic_enable_irq %d timeout status 0x%08x\n", irq, openpic_readfield(&OpenPIC->Source[irq].Vector_Priority,OPENPIC_MASK));
}

and OPENPIC_MASK is still set when the loop times out on enabling
IRQ_8259_CASCADE in chrp_init_IRQ(). How is this possible? There's an eieio()
after each register write and the mb() does sync.

Gr{oetje,eeting}s,
--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2000-02-12 14:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-02-11 16:43 Latest OpenPic changes Geert Uytterhoeven
2000-02-11 17:05 ` Benjamin Herrenschmidt
2000-02-11 17:16   ` Geert Uytterhoeven
2000-02-11 17:11 ` Gabriel Paubert
2000-02-11 17:16   ` Geert Uytterhoeven
2000-02-11 17:30     ` Gabriel Paubert
2000-02-11 21:17       ` Cort Dougan
2000-02-11 17:31   ` Benjamin Herrenschmidt
2000-02-11 17:49     ` Gabriel Paubert
2000-02-11 18:38       ` Benjamin Herrenschmidt
2000-02-11 20:25         ` Gabriel Paubert
2000-02-12 14:15           ` BenH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).