linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: v7-M: Use ret_to_user_from_irq in PendSV handler
@ 2015-10-26  0:10 Ezequiel Garcia
  2015-10-26  7:50 ` Uwe Kleine-König
  0 siblings, 1 reply; 3+ messages in thread
From: Ezequiel Garcia @ 2015-10-26  0:10 UTC (permalink / raw)
  To: linux-arm-kernel

The PendSV handler calls v7m_exception_entry which
disables IRQs. Therefore, since IRQs are already disabled,
the PendSV handler can return using ret_to_user_from_irq.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
Tested on a NXP LPC43xx platform.

 arch/arm/kernel/entry-v7m.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S
index b6c8bb9315e7..907534f97053 100644
--- a/arch/arm/kernel/entry-v7m.S
+++ b/arch/arm/kernel/entry-v7m.S
@@ -88,7 +88,7 @@ __pendsv_entry:
 	@ execute the pending work, including reschedule
 	get_thread_info tsk
 	mov	why, #0
-	b	ret_to_user
+	b	ret_to_user_from_irq
 ENDPROC(__pendsv_entry)
 
 /*
-- 
2.5.2

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

* [PATCH] ARM: v7-M: Use ret_to_user_from_irq in PendSV handler
  2015-10-26  0:10 [PATCH] ARM: v7-M: Use ret_to_user_from_irq in PendSV handler Ezequiel Garcia
@ 2015-10-26  7:50 ` Uwe Kleine-König
  2015-10-26 13:01   ` Ezequiel Garcia
  0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2015-10-26  7:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Oct 25, 2015 at 09:10:52PM -0300, Ezequiel Garcia wrote:
> The PendSV handler calls v7m_exception_entry which
> disables IRQs. Therefore, since IRQs are already disabled,
> the PendSV handler can return using ret_to_user_from_irq.
> 
> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Looks right. How did you notice this?

Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

Best regards
Uwe

> ---
> Tested on a NXP LPC43xx platform.
> 
>  arch/arm/kernel/entry-v7m.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S
> index b6c8bb9315e7..907534f97053 100644
> --- a/arch/arm/kernel/entry-v7m.S
> +++ b/arch/arm/kernel/entry-v7m.S
> @@ -88,7 +88,7 @@ __pendsv_entry:
>  	@ execute the pending work, including reschedule
>  	get_thread_info tsk
>  	mov	why, #0
> -	b	ret_to_user
> +	b	ret_to_user_from_irq
>  ENDPROC(__pendsv_entry)
>  
>  /*
> -- 
> 2.5.2
> 
> 

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

* [PATCH] ARM: v7-M: Use ret_to_user_from_irq in PendSV handler
  2015-10-26  7:50 ` Uwe Kleine-König
@ 2015-10-26 13:01   ` Ezequiel Garcia
  0 siblings, 0 replies; 3+ messages in thread
From: Ezequiel Garcia @ 2015-10-26 13:01 UTC (permalink / raw)
  To: linux-arm-kernel

On 26 October 2015 at 04:50, Uwe Kleine-K?nig
<u.kleine-koenig@pengutronix.de> wrote:
> On Sun, Oct 25, 2015 at 09:10:52PM -0300, Ezequiel Garcia wrote:
>> The PendSV handler calls v7m_exception_entry which
>> disables IRQs. Therefore, since IRQs are already disabled,
>> the PendSV handler can return using ret_to_user_from_irq.
>>
>> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
> Looks right. How did you notice this?
>

Just reading the code.

> Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
>

Thanks, I'll queue this in Russell's patch tracking system.
-- 
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar

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

end of thread, other threads:[~2015-10-26 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-26  0:10 [PATCH] ARM: v7-M: Use ret_to_user_from_irq in PendSV handler Ezequiel Garcia
2015-10-26  7:50 ` Uwe Kleine-König
2015-10-26 13:01   ` Ezequiel Garcia

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).