All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: sedi: Annotate SEDI entry points using new style annotations
@ 2020-01-22 22:10 Mark Brown
  2020-01-23  3:01 ` Punit Agrawal
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2020-01-22 22:10 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon; +Cc: Mark Brown, James Morse, linux-arm-kernel

In an effort to clarify and simplify the annotation of assembly
functions new macros have been introduced. These replace ENTRY and
ENDPROC with two different annotations for normal functions and those
with unusual calling conventions.

The SEDI entry points are currently annotated as normal functions but
are called from non-kernel contexts with non-standard calling convention
and should therefore be annotated as such so do so.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 arch/arm64/kernel/entry.S | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
index 5d47687592ec..65d126228046 100644
--- a/arch/arm64/kernel/entry.S
+++ b/arch/arm64/kernel/entry.S
@@ -938,7 +938,7 @@ NOKPROBE(ret_from_fork)
  */
 .ltorg
 .pushsection ".entry.tramp.text", "ax"
-ENTRY(__sdei_asm_entry_trampoline)
+SYM_CODE_START(__sdei_asm_entry_trampoline)
 	mrs	x4, ttbr1_el1
 	tbz	x4, #USER_ASID_BIT, 1f
 
@@ -960,7 +960,7 @@ ENTRY(__sdei_asm_entry_trampoline)
 	ldr	x4, =__sdei_asm_handler
 #endif
 	br	x4
-ENDPROC(__sdei_asm_entry_trampoline)
+SYM_CODE_END(__sdei_asm_entry_trampoline)
 NOKPROBE(__sdei_asm_entry_trampoline)
 
 /*
@@ -970,14 +970,14 @@ NOKPROBE(__sdei_asm_entry_trampoline)
  * x2: exit_mode
  * x4: struct sdei_registered_event argument from registration time.
  */
-ENTRY(__sdei_asm_exit_trampoline)
+SYM_CODE_START(__sdei_asm_exit_trampoline)
 	ldr	x4, [x4, #(SDEI_EVENT_INTREGS + S_ORIG_ADDR_LIMIT)]
 	cbnz	x4, 1f
 
 	tramp_unmap_kernel	tmp=x4
 
 1:	sdei_handler_exit exit_mode=x2
-ENDPROC(__sdei_asm_exit_trampoline)
+SYM_CODE_END(__sdei_asm_exit_trampoline)
 NOKPROBE(__sdei_asm_exit_trampoline)
 	.ltorg
 .popsection		// .entry.tramp.text
@@ -1002,7 +1002,7 @@ __sdei_asm_trampoline_next_handler:
  * follow SMC-CC. We save (or retrieve) all the registers as the handler may
  * want them.
  */
-ENTRY(__sdei_asm_handler)
+SYM_CODE_START(__sdei_asm_handler)
 	stp     x2, x3, [x1, #SDEI_EVENT_INTREGS + S_PC]
 	stp     x4, x5, [x1, #SDEI_EVENT_INTREGS + 16 * 2]
 	stp     x6, x7, [x1, #SDEI_EVENT_INTREGS + 16 * 3]
@@ -1085,6 +1085,6 @@ alternative_else_nop_endif
 	tramp_alias	dst=x5, sym=__sdei_asm_exit_trampoline
 	br	x5
 #endif
-ENDPROC(__sdei_asm_handler)
+SYM_CODE_END(__sdei_asm_handler)
 NOKPROBE(__sdei_asm_handler)
 #endif /* CONFIG_ARM_SDE_INTERFACE */
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: sedi: Annotate SEDI entry points using new style annotations
  2020-01-22 22:10 [PATCH] arm64: sedi: Annotate SEDI entry points using new style annotations Mark Brown
@ 2020-01-23  3:01 ` Punit Agrawal
  2020-01-23 21:54   ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Punit Agrawal @ 2020-01-23  3:01 UTC (permalink / raw)
  To: Mark Brown; +Cc: Catalin Marinas, Will Deacon, James Morse, linux-arm-kernel

Hi Mark,

Mark Brown <broonie@kernel.org> writes:

> In an effort to clarify and simplify the annotation of assembly
> functions new macros have been introduced. These replace ENTRY and
> ENDPROC with two different annotations for normal functions and those
> with unusual calling conventions.
>
> The SEDI entry points are currently annotated as normal functions but
> are called from non-kernel contexts with non-standard calling convention
> and should therefore be annotated as such so do so.
>
> Signed-off-by: Mark Brown <broonie@kernel.org>

s/SEDI/SDEI

There is a typo in $SUBJECT and the commit log. The code itself appears
to be fine.

Thanks,
Punit

> ---
>  arch/arm64/kernel/entry.S | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> index 5d47687592ec..65d126228046 100644
> --- a/arch/arm64/kernel/entry.S
> +++ b/arch/arm64/kernel/entry.S
> @@ -938,7 +938,7 @@ NOKPROBE(ret_from_fork)
>   */
>  .ltorg
>  .pushsection ".entry.tramp.text", "ax"
> -ENTRY(__sdei_asm_entry_trampoline)
> +SYM_CODE_START(__sdei_asm_entry_trampoline)
>  	mrs	x4, ttbr1_el1
>  	tbz	x4, #USER_ASID_BIT, 1f
>  
> @@ -960,7 +960,7 @@ ENTRY(__sdei_asm_entry_trampoline)
>  	ldr	x4, =__sdei_asm_handler
>  #endif
>  	br	x4
> -ENDPROC(__sdei_asm_entry_trampoline)
> +SYM_CODE_END(__sdei_asm_entry_trampoline)
>  NOKPROBE(__sdei_asm_entry_trampoline)
>  
>  /*
> @@ -970,14 +970,14 @@ NOKPROBE(__sdei_asm_entry_trampoline)
>   * x2: exit_mode
>   * x4: struct sdei_registered_event argument from registration time.
>   */
> -ENTRY(__sdei_asm_exit_trampoline)
> +SYM_CODE_START(__sdei_asm_exit_trampoline)
>  	ldr	x4, [x4, #(SDEI_EVENT_INTREGS + S_ORIG_ADDR_LIMIT)]
>  	cbnz	x4, 1f
>  
>  	tramp_unmap_kernel	tmp=x4
>  
>  1:	sdei_handler_exit exit_mode=x2
> -ENDPROC(__sdei_asm_exit_trampoline)
> +SYM_CODE_END(__sdei_asm_exit_trampoline)
>  NOKPROBE(__sdei_asm_exit_trampoline)
>  	.ltorg
>  .popsection		// .entry.tramp.text
> @@ -1002,7 +1002,7 @@ __sdei_asm_trampoline_next_handler:
>   * follow SMC-CC. We save (or retrieve) all the registers as the handler may
>   * want them.
>   */
> -ENTRY(__sdei_asm_handler)
> +SYM_CODE_START(__sdei_asm_handler)
>  	stp     x2, x3, [x1, #SDEI_EVENT_INTREGS + S_PC]
>  	stp     x4, x5, [x1, #SDEI_EVENT_INTREGS + 16 * 2]
>  	stp     x6, x7, [x1, #SDEI_EVENT_INTREGS + 16 * 3]
> @@ -1085,6 +1085,6 @@ alternative_else_nop_endif
>  	tramp_alias	dst=x5, sym=__sdei_asm_exit_trampoline
>  	br	x5
>  #endif
> -ENDPROC(__sdei_asm_handler)
> +SYM_CODE_END(__sdei_asm_handler)
>  NOKPROBE(__sdei_asm_handler)
>  #endif /* CONFIG_ARM_SDE_INTERFACE */

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: sedi: Annotate SEDI entry points using new style annotations
  2020-01-23  3:01 ` Punit Agrawal
@ 2020-01-23 21:54   ` Mark Brown
  2020-02-10 17:17     ` James Morse
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2020-01-23 21:54 UTC (permalink / raw)
  To: Punit Agrawal; +Cc: Catalin Marinas, Will Deacon, James Morse, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 189 bytes --]

On Thu, Jan 23, 2020 at 12:01:55PM +0900, Punit Agrawal wrote:

> There is a typo in $SUBJECT and the commit log. The code itself appears
> to be fine.

You're right, fixed locally thanks.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: sedi: Annotate SEDI entry points using new style annotations
  2020-01-23 21:54   ` Mark Brown
@ 2020-02-10 17:17     ` James Morse
  0 siblings, 0 replies; 4+ messages in thread
From: James Morse @ 2020-02-10 17:17 UTC (permalink / raw)
  To: Mark Brown, Punit Agrawal; +Cc: Catalin Marinas, Will Deacon, linux-arm-kernel

Hi Mark,

On 23/01/2020 21:54, Mark Brown wrote:
> On Thu, Jan 23, 2020 at 12:01:55PM +0900, Punit Agrawal wrote:
>> There is a typo in $SUBJECT and the commit log. The code itself appears
>> to be fine.
> 
> You're right, fixed locally thanks.

Acked-by: James Morse <james.Morse@arm.com>


Thanks,

James

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-02-10 17:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 22:10 [PATCH] arm64: sedi: Annotate SEDI entry points using new style annotations Mark Brown
2020-01-23  3:01 ` Punit Agrawal
2020-01-23 21:54   ` Mark Brown
2020-02-10 17:17     ` James Morse

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.