public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][NOMMU] microblaze: fix interrupt state restore
@ 2010-02-01 12:34 steve
  2010-02-03 12:26 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: steve @ 2010-02-01 12:34 UTC (permalink / raw)
  To: microblaze-uclinux; +Cc: monstr, linux-kernel, Steven J. Magnani

Interrupts must be disabled while an interrupt state restore 
(prep for interrupt return) is in progress.
Code to do this was lost in the port to the mainline kernel.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
---
diff -uprN a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S
--- a/arch/microblaze/kernel/entry-nommu.S	2010-01-31 23:28:45.000000000 -0600
+++ b/arch/microblaze/kernel/entry-nommu.S	2010-01-31 23:31:35.000000000 -0600
@@ -122,7 +122,7 @@ ENTRY(_interrupt)
 
 ret_from_intr:
 	lwi	r11, r1, PT_MODE
-	bneid	r11, 3f
+	bneid	r11, no_intr_resched
 
 	lwi	r6, r31, TS_THREAD_INFO	/* get thread info */
 	lwi	r19, r6, TI_FLAGS	/* get flags in thread info */
@@ -133,16 +133,18 @@ ret_from_intr:
 	bralid	r15, schedule
 	nop
 1:	andi	r11, r19, _TIF_SIGPENDING
-	beqid	r11, no_intr_reshed
+	beqid	r11, no_intr_resched
 	addk	r5, r1, r0
 	addk	r7, r0, r0
 	bralid	r15, do_signal
 	addk	r6, r0, r0
 
-no_intr_reshed:
+no_intr_resched:
+	/* Disable interrupts, we are now committed to the state restore */
+	disable_irq
+
 	/* save mode indicator */
 	lwi	r11, r1, PT_MODE
-3:
 	swi	r11, r0, PER_CPU(KM)
 
 	/* save r31 */


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][NOMMU] microblaze: fix interrupt state restore
  2010-02-01 12:34 [PATCH][NOMMU] microblaze: fix interrupt state restore steve
@ 2010-02-03 12:26 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2010-02-03 12:26 UTC (permalink / raw)
  To: steve; +Cc: microblaze-uclinux, linux-kernel

steve@digidescorp.com wrote:
> Interrupts must be disabled while an interrupt state restore 
> (prep for interrupt return) is in progress.
> Code to do this was lost in the port to the mainline kernel.

nice catch. I tried to find out why I used this change and it was in any 
ancient version which were used as . John did this change 2 years ago 
and I haven't found that change description.

Can you please setup your name in email with patches? (From line should 
  contains your full name and email - you have just email there).
I had to change it manually. Your first patches has correct setting and 
I see that the later one not.

Documentation/SubmittingPatches.

The "from" line must be the very first line in the message body,
and has the form:

         From: Original Author <author@example.com>


Thanks,
Michal


> 
> Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
> ---
> diff -uprN a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S
> --- a/arch/microblaze/kernel/entry-nommu.S	2010-01-31 23:28:45.000000000 -0600
> +++ b/arch/microblaze/kernel/entry-nommu.S	2010-01-31 23:31:35.000000000 -0600
> @@ -122,7 +122,7 @@ ENTRY(_interrupt)
>  
>  ret_from_intr:
>  	lwi	r11, r1, PT_MODE
> -	bneid	r11, 3f
> +	bneid	r11, no_intr_resched
>  
>  	lwi	r6, r31, TS_THREAD_INFO	/* get thread info */
>  	lwi	r19, r6, TI_FLAGS	/* get flags in thread info */
> @@ -133,16 +133,18 @@ ret_from_intr:
>  	bralid	r15, schedule
>  	nop
>  1:	andi	r11, r19, _TIF_SIGPENDING
> -	beqid	r11, no_intr_reshed
> +	beqid	r11, no_intr_resched
>  	addk	r5, r1, r0
>  	addk	r7, r0, r0
>  	bralid	r15, do_signal
>  	addk	r6, r0, r0
>  
> -no_intr_reshed:
> +no_intr_resched:
> +	/* Disable interrupts, we are now committed to the state restore */
> +	disable_irq
> +
>  	/* save mode indicator */
>  	lwi	r11, r1, PT_MODE
> -3:
>  	swi	r11, r0, PER_CPU(KM)
>  
>  	/* save r31 */
> 


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-03 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-01 12:34 [PATCH][NOMMU] microblaze: fix interrupt state restore steve
2010-02-03 12:26 ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox