Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Pete Popov <ppopov@mvista.com>
To: Ralf Baechle <ralf@uni-koblenz.de>
Cc: "linux-mips@oss.sgi.com" <linux-mips@oss.sgi.com>
Subject: Re: test9 problems
Date: Sun, 21 Jan 2001 13:26:32 -0800	[thread overview]
Message-ID: <3A6B5408.81B5DDEC@mvista.com> (raw)
In-Reply-To: 20010121022649.C853@bacchus.dhis.org

Ralf Baechle wrote:
> 
> On Sat, Jan 20, 2001 at 05:58:03PM -0800, Pete Popov wrote:
> 
> > I've got a 5231-based board running a test9-ish kernel. The board is
> > quite stable and I don't have any problems using the serial console,
> > running Bonnie, etc.  However, when I enable a virtual terminal and ps2
> > keyboard, I have problems running commands at the virt terminal.  I
> > traced it to the init task seg faulting and getting killed by the
> > kernel, which in turn kills my system. One of the easiest way to
> > reproduce this problem is to try filename completion, such as "ls
> > /etc/nss <tab>" -- hangs just about all the time.  Has anyone else
> > experienced similar problems with any other mips workstation/board?
> 
> Seems to work with other machines.

Thanks Ralf, knowing that helped.  The command line completion failed
when there are more than one matching files or no matching files at all,
which results in an error bell.  A quick experiment definitely pointed
to the error bell as the problem.  I took a look at drivers/char/vt.c
and found this:


#if defined(__i386__) || defined(__alpha__) || defined(__powerpc__) \
    || (defined(__mips__) && defined(CONFIG_ISA)) \
    || (defined(__arm__) && defined(CONFIG_HOST_FOOTBRIDGE))
 
static void
kd_nosound(unsigned long ignored)
{
        /* disable counter 2 */
        outb(inb_p(0x61)&0xFC, 0x61);
        return;
}
 
void
_kd_mksound(unsigned int hz, unsigned int ticks)
{
        static struct timer_list sound_timer = { function: kd_nosound };
        unsigned int count = 0;
        unsigned long flags;
 
        if (hz > 20 && hz < 32767)
                count = 1193180 / hz;
 
        save_flags(flags);
        cli();
        del_timer(&sound_timer);
        if (count) {
                /* enable counter 2 */
                outb_p(inb_p(0x61)|3, 0x61);
                /* set command for counter 2, 2 byte write */
                outb_p(0xB6, 0x43);
                /* select desired HZ */
                outb_p(count & 0xff, 0x42);
                outb((count >> 8) & 0xff, 0x42);
 
                if (ticks) {
                        sound_timer.expires = jiffies+ticks;
                        add_timer(&sound_timer);
                }
        } else
                kd_nosound(0);
        restore_flags(flags);
        return;
}
 
#else
 
void
_kd_mksound(unsigned int hz, unsigned int ticks)
{
}                                 

#endif

I see other mips systems which have defined CONFIG_ISA and I guess I'm
rather surprised that it works on those systems.  I suppose if you
define mips_io_port_base to be equal to the ISA start address, then the
above would work. But then the PCI IO accesses wouldn't work with the
inb(), outb(), etc macros, if the PCI IO space is discontinous from the
ISA IO space -- which it typically is.  The whole inb()/outb() design,
thanks to the x86, really doesn't work all that great for embedded mips
boards -- especially when you start supporting legally ISA devices.

Pete

      parent reply	other threads:[~2001-01-21 21:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-21  1:58 test9 problems Pete Popov
     [not found] ` <20010121022649.C853@bacchus.dhis.org>
2001-01-21 21:26   ` Pete Popov [this message]

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=3A6B5408.81B5DDEC@mvista.com \
    --to=ppopov@mvista.com \
    --cc=linux-mips@oss.sgi.com \
    --cc=ralf@uni-koblenz.de \
    /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