From: Sergei Shtylyov <sshtylyov@mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled
Date: Tue, 21 Dec 2010 16:26:20 +0300 [thread overview]
Message-ID: <4D10AAFC.3060308@mvista.com> (raw)
In-Reply-To: <1292936565-24677-1-git-send-email-monstr@monstr.eu>
Hello.
On 21-12-2010 16:02, Michal Simek wrote:
> Microblaze implement enable/disable interrupts through MSR
> that's why disable_interrupts function should return 1 when interrupt
> was enabled. Return 0 when interrupt was disabled.
> Signed-off-by: John Linn<john.linn@xilinx.com>
> Signed-off-by: Michal Simek<monstr@monstr.eu>
[...]
> diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c
> index e9d53c1..054e09f 100644
> --- a/arch/microblaze/cpu/interrupts.c
> +++ b/arch/microblaze/cpu/interrupts.c
> @@ -41,8 +41,10 @@ void enable_interrupts (void)
>
> int disable_interrupts (void)
> {
> + unsigned int msr;
Empty line wouldn't hurt here...
> + MFS(msr, rmsr);
> MSRCLR(0x2);
> - return 0;
> + return ((msr & 0x2) != 0);
External pair of () not needed.
WBR, Sergei
next prev parent reply other threads:[~2010-12-21 13:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-21 13:02 [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled Michal Simek
2010-12-21 13:26 ` Sergei Shtylyov [this message]
2010-12-21 13:49 ` Wolfgang Denk
2010-12-21 14:45 ` 于会
2010-12-21 15:10 ` [U-Boot] Porting Questions - was: " Wolfgang Denk
2011-01-09 21:27 ` [U-Boot] " Wolfgang Denk
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=4D10AAFC.3060308@mvista.com \
--to=sshtylyov@mvista.com \
--cc=u-boot@lists.denx.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