disable interrput under ppc?

Wang, Baojun wangbj at lzu.edu.cn
Tue Sep 4 12:44:14 EST 2007


hi, list

  How can I disable interrput like `cli' in x86? I want the following code 
freeze the box but it doesn't, $MSR is altered however the box is still 
alive, how can I freeze the box like `cli' in x86? Thanks very much!

static
void cli(void)
{
        unsigned long msr;
        __asm__ __volatile__("": : :"memory");
        msr = mfmsr();
        printk("msr: 0x%lx\n", msr);

        __asm__ __volatile__("sync" : : :"memory");
        __asm__ __volatile__("wrteei 0" : : :"memory");

        msr = mfmsr();
        printk("msr: 0x%lx\n", msr);
        printk(KERN_EMERG"!!msr: 0x%lx\n", msr);
}

P.S: the box is BOOKE compatible, the printk has shown is altered!

  Regards,
Wang
-- 
Wang, Baojun                                        Lanzhou University
Distributed & Embedded System Lab              http://dslab.lzu.edu.cn
School of Information Science and Engeneering        wangbj at lzu.edu.cn
Tianshui South Road 222. Lanzhou 730000                     .P.R.China
Tel:+86-931-8912025                                Fax:+86-931-8912022
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20070904/9f9f40b6/attachment.pgp 


More information about the Linuxppc-embedded mailing list