[Top] [All Lists]

Re: Remove GIO interface

To: "Maciej W. Rozycki" <>
Subject: Re: Remove GIO interface
From: Ladislav Michl <>
Date: Wed, 8 Jan 2003 14:08:19 +0100
Cc: linux-mips <>, Ralf Baechle <>, Guido Guenther <>
In-reply-to: <>; from on Wed, Jan 08, 2003 at 01:41:41PM +0100
Original-recipient: rfc822;
References: <> <>
User-agent: Mutt/1.2.5i
On Wed, Jan 08, 2003 at 01:41:41PM +0100, Maciej W. Rozycki wrote:
> On Wed, 8 Jan 2003, Ladislav Michl wrote:
> > * Even in case everything work as stated in documentation, we are unable
> >   to use this mechanism to detect Newport for console driver (the main
> >   reason why I created this interface was to provide neccessary
> >   informations to Xserver), because our DBE handling doesn't work until
> >   modules are initialized (in case we are building kernel with modules
> >   support).
>  That is a bug and it should be fixed.  What are the symptoms?

the most notable symptom is machine hang at boot time :-) it doesn't apply
to cvs kernel, just to my private one where I called get_dbe in console_init.
you cannot use get_dbe _before_ init_modules is called (ie. in board_irq_init).
reason is following (copy&paste from traps.c). read "READ HERE".

static inline unsigned long
search_dbe_table(unsigned long addr)
        unsigned long ret = 0;

        /* There is only the kernel to search.  */
        ret = search_one_table(__start___dbe_table, __stop___dbe_table-1, addr);
        return ret;
        unsigned long flags;

        /* The kernel is the last "module" -- no need to treat it special.  */
        struct module *mp;
        struct archdata *ap;

        spin_lock_irqsave(&modlist_lock, flags);
        for (mp = module_list; mp != NULL; mp = mp->next) {
                if (!mod_member_present(mp, archdata_end) ||
                    !mod_archdata_member_present(mp, struct archdata,
                ap = (struct archdata *)(mp->archdata_start);

                if (ap->dbe_table_start == NULL ||
                    !(mp->flags & (MOD_RUNNING | MOD_INITIALIZING)))
/* READ HERE: we don't reach this point because kernel is the last module
 * and it is not initialized yet, so it has no archdata */
                ret = search_one_table(ap->dbe_table_start,
                                       ap->dbe_table_end - 1, addr);
                if (ret)
        spin_unlock_irqrestore(&modlist_lock, flags);
        return ret;

so although traps are initialized one cannot use them and have to wait
until modules are initialized too.

anyway, even if you fix this issue it is not reason for keeping GIO


<Prev in Thread] Current Thread [Next in Thread>