linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Wang, Baojun" <wangbj@lzu.edu.cn>
To: linuxppc-embedded@ozlabs.org
Subject: disable interrput under ppc?
Date: Tue, 4 Sep 2007 10:44:14 +0800	[thread overview]
Message-ID: <388935922.07297@eyou.net> (raw)
Message-ID: <200709041044.16525.wangbj@lzu.edu.cn> (raw)

[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]

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@lzu.edu.cn
Tianshui South Road 222. Lanzhou 730000                     .P.R.China
Tel:+86-931-8912025                                Fax:+86-931-8912022

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2007-09-04  2:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200709041044.16525.wangbj@lzu.edu.cn>
2007-09-04  2:44 ` Wang, Baojun [this message]
2007-09-04 18:24 ` disable interrput under ppc? Scott Wood
2007-09-04 18:37   ` Josh Boyer
     [not found]   ` <388931546.05165@lzu.edu.cn>
     [not found]     ` <200709051000.46281.wangbj@lzu.edu.cn>
2007-09-05  2:00       ` Wang, Baojun
2007-09-05 16:31       ` Scott Wood

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=388935922.07297@eyou.net \
    --to=wangbj@lzu.edu.cn \
    --cc=linuxppc-embedded@ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).