linux-mips
[Top] [All Lists]

sti() does not work.

To: <linux-mips@oss.sgi.com>
Subject: sti() does not work.
From: "Steven Liu" <stevenliu@psdc.com>
Date: Tue, 3 Jul 2001 15:48:04 -0700
Cc: "stevenliu@psdc.com" <jeff@moke.com>
Sender: owner-linux-mips@oss.sgi.com
Thread-index: AcEEEjekGV8jj/u2RbiXlO7KL288IQ==
Thread-topic: sti() does not work.
Hi All:

I am working on the porting Linux to mips R3000 and  have a problem
about sti( ) which is called in start_kernel( ).

As we know, sti() is defined as __sti( ) in the
include/asm-mips/system.h:
 
extern __inline__ void  __sti(void)
{
        __asm__ __volatile__(
                ".set\tnoreorder\n\t"
                ".set\tnoat\n\t"
                "mfc0\t$1,$12\n\t"
                "ori\t$1,0x1f\n\t"
                "xori\t$1,0x1e\n\t"
                "mtc0\t$1,$12\n\t"               /* <----- problem  here
! */
                ".set\tat\n\t"
                ".set\treorder"
                : /* no outputs */
                : /* no inputs */
                : "$1", "memory");
}

Before calling this function, status_register = 0x1000fc00 and
cause_register=0x00008000. 
Clearly, this is an interrupt of the CPU timer. 

When mtc0 instruction above is executed, the system hangs and the
control does not go to the timer handler.

Any help is greatly appreciated.

Thank you.

Steven liu

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