From 68e99e54e9e3e0c1b3b45929dc94c26932b851d5 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Tue, 21 Dec 2010 08:30:39 +0100 Subject: microblaze: Disabling interrupt should return 1 if was enabled 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 Signed-off-by: Michal Simek Acked-by: Wolfgang Denk --- arch/microblaze/cpu/interrupts.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c index e9d53c1..5a13211 100644 --- a/arch/microblaze/cpu/interrupts.c +++ b/arch/microblaze/cpu/interrupts.c @@ -41,8 +41,11 @@ void enable_interrupts (void) int disable_interrupts (void) { + unsigned int msr; + + MFS(msr, rmsr); MSRCLR(0x2); - return 0; + return (msr & 0x2) != 0; } #ifdef CONFIG_SYS_INTC_0 -- cgit v1.1