Skip to contentSkip to conversation

disable interrput under ppc?

DISCUSSION Wang, Baojun 1 participant 1 message Sep 4, 2007

lore
Share & tools
lore
#0 lore raw

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

Signature · 5 lines
Wang, Baojun                                        Lanzhou University
Distributed & Embedded System Lab              http://dslab.lzu.edu.cn
School of Information Science and Engeneering        [email protected]
Tianshui South Road 222. Lanzhou 730000                     .P.R.China
Tel:+86-931-8912025                                Fax:+86-931-8912022