Re: [PATCH 12/18] arm64: kernel: Convert to modern annotations for assembly functions

2020-03-09 Thread Mark Brown
On Mon, Mar 09, 2020 at 05:52:03PM +, Catalin Marinas wrote:

> I queued this series for 5.7, apart from patch 12. I'll try to fix any
> conflicts with whatever patches I'm adding but may drop some of them if
> they conflict badly with code in -next (not likely). We'll revisit at
> -rc1 to see what's left.

Thanks.


signature.asc
Description: PGP signature
___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm


Re: [PATCH 12/18] arm64: kernel: Convert to modern annotations for assembly functions

2020-03-09 Thread Catalin Marinas
On Fri, Feb 28, 2020 at 03:22:19PM +, Mark Brown wrote:
> On Fri, Feb 28, 2020 at 01:37:18PM +, Catalin Marinas wrote:
> > I wonder whether it would be easier to merge all these patches at
> > 5.7-rc1, once most of the major changes went in.
> 
> Only thing I can think that doing that might cause issue with is if
> people are doing work that's not likely to make it in this cycle then
> it'd be some extra rebasing or carrying of out of tree patches they'd
> need to do (plus obviously this series might pick up new conflicts
> itself).  It's not a completely automated process unfortunately,
> especially with trying to fix up some of the problems with the existing
> annotations changing the output.  But yeah, we could do that.

I queued this series for 5.7, apart from patch 12. I'll try to fix any
conflicts with whatever patches I'm adding but may drop some of them if
they conflict badly with code in -next (not likely). We'll revisit at
-rc1 to see what's left.

Thanks.

-- 
Catalin
___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm


Re: [PATCH 12/18] arm64: kernel: Convert to modern annotations for assembly functions

2020-02-28 Thread Mark Brown
On Fri, Feb 28, 2020 at 01:37:18PM +, Catalin Marinas wrote:
> On Fri, Feb 28, 2020 at 01:41:21PM +0100, Ard Biesheuvel wrote:

> > This hunk is going to conflict badly with the EFI tree. I will
> > incorporate this change for v5.7, so could you please just drop it
> > from this patch?

Will do for any reposts.

> I wonder whether it would be easier to merge all these patches at
> 5.7-rc1, once most of the major changes went in.

Only thing I can think that doing that might cause issue with is if
people are doing work that's not likely to make it in this cycle then
it'd be some extra rebasing or carrying of out of tree patches they'd
need to do (plus obviously this series might pick up new conflicts
itself).  It's not a completely automated process unfortunately,
especially with trying to fix up some of the problems with the existing
annotations changing the output.  But yeah, we could do that.


signature.asc
Description: PGP signature
___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm


Re: [PATCH 12/18] arm64: kernel: Convert to modern annotations for assembly functions

2020-02-28 Thread Catalin Marinas
On Fri, Feb 28, 2020 at 01:41:21PM +0100, Ard Biesheuvel wrote:
> On Tue, 18 Feb 2020 at 21:02, Mark Brown  wrote:
> > In an effort to clarify and simplify the annotation of assembly functions
> > in the kernel new macros have been introduced. These replace ENTRY and
> > ENDPROC and also add a new annotation for static functions which previously
> > had no ENTRY equivalent. Update the annotations in the core kernel code to
> > the new macros.
> >
> > Signed-off-by: Mark Brown 
> > ---
> >  arch/arm64/kernel/cpu-reset.S |  4 +-
> >  arch/arm64/kernel/efi-entry.S |  4 +-
> >  arch/arm64/kernel/efi-rt-wrapper.S|  4 +-
> >  arch/arm64/kernel/entry-fpsimd.S  | 20 -
> >  arch/arm64/kernel/hibernate-asm.S | 16 +++
> >  arch/arm64/kernel/hyp-stub.S  | 20 -
> >  arch/arm64/kernel/probes/kprobes_trampoline.S |  4 +-
> >  arch/arm64/kernel/reloc_test_syms.S   | 44 +--
> >  arch/arm64/kernel/relocate_kernel.S   |  4 +-
> >  arch/arm64/kernel/sleep.S | 12 ++---
> >  arch/arm64/kernel/smccc-call.S|  8 ++--
> >  11 files changed, 70 insertions(+), 70 deletions(-)
> >
> ...
> > diff --git a/arch/arm64/kernel/efi-entry.S b/arch/arm64/kernel/efi-entry.S
> > index 304d5b02ca67..de6ced92950e 100644
> > --- a/arch/arm64/kernel/efi-entry.S
> > +++ b/arch/arm64/kernel/efi-entry.S
> > @@ -25,7 +25,7 @@
> >  * we want to be. The kernel image wants to be placed at TEXT_OFFSET
> >  * from start of RAM.
> >  */
> > -ENTRY(entry)
> > +SYM_CODE_START(entry)
> > /*
> >  * Create a stack frame to save FP/LR with extra space
> >  * for image_addr variable passed to efi_entry().
> > @@ -117,4 +117,4 @@ efi_load_fail:
> > ret
> >
> >  entry_end:
> > -ENDPROC(entry)
> > +SYM_CODE_END(entry)
> 
> This hunk is going to conflict badly with the EFI tree. I will
> incorporate this change for v5.7, so could you please just drop it
> from this patch?

I wonder whether it would be easier to merge all these patches at
5.7-rc1, once most of the major changes went in.

-- 
Catalin
___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm


Re: [PATCH 12/18] arm64: kernel: Convert to modern annotations for assembly functions

2020-02-28 Thread Ard Biesheuvel
Hi Mark,

On Tue, 18 Feb 2020 at 21:02, Mark Brown  wrote:
>
> In an effort to clarify and simplify the annotation of assembly functions
> in the kernel new macros have been introduced. These replace ENTRY and
> ENDPROC and also add a new annotation for static functions which previously
> had no ENTRY equivalent. Update the annotations in the core kernel code to
> the new macros.
>
> Signed-off-by: Mark Brown 
> ---
>  arch/arm64/kernel/cpu-reset.S |  4 +-
>  arch/arm64/kernel/efi-entry.S |  4 +-
>  arch/arm64/kernel/efi-rt-wrapper.S|  4 +-
>  arch/arm64/kernel/entry-fpsimd.S  | 20 -
>  arch/arm64/kernel/hibernate-asm.S | 16 +++
>  arch/arm64/kernel/hyp-stub.S  | 20 -
>  arch/arm64/kernel/probes/kprobes_trampoline.S |  4 +-
>  arch/arm64/kernel/reloc_test_syms.S   | 44 +--
>  arch/arm64/kernel/relocate_kernel.S   |  4 +-
>  arch/arm64/kernel/sleep.S | 12 ++---
>  arch/arm64/kernel/smccc-call.S|  8 ++--
>  11 files changed, 70 insertions(+), 70 deletions(-)
>
...
> diff --git a/arch/arm64/kernel/efi-entry.S b/arch/arm64/kernel/efi-entry.S
> index 304d5b02ca67..de6ced92950e 100644
> --- a/arch/arm64/kernel/efi-entry.S
> +++ b/arch/arm64/kernel/efi-entry.S
> @@ -25,7 +25,7 @@
>  * we want to be. The kernel image wants to be placed at TEXT_OFFSET
>  * from start of RAM.
>  */
> -ENTRY(entry)
> +SYM_CODE_START(entry)
> /*
>  * Create a stack frame to save FP/LR with extra space
>  * for image_addr variable passed to efi_entry().
> @@ -117,4 +117,4 @@ efi_load_fail:
> ret
>
>  entry_end:
> -ENDPROC(entry)
> +SYM_CODE_END(entry)

This hunk is going to conflict badly with the EFI tree. I will
incorporate this change for v5.7, so could you please just drop it
from this patch?
___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm


[PATCH 12/18] arm64: kernel: Convert to modern annotations for assembly functions

2020-02-18 Thread Mark Brown
In an effort to clarify and simplify the annotation of assembly functions
in the kernel new macros have been introduced. These replace ENTRY and
ENDPROC and also add a new annotation for static functions which previously
had no ENTRY equivalent. Update the annotations in the core kernel code to
the new macros.

Signed-off-by: Mark Brown 
---
 arch/arm64/kernel/cpu-reset.S |  4 +-
 arch/arm64/kernel/efi-entry.S |  4 +-
 arch/arm64/kernel/efi-rt-wrapper.S|  4 +-
 arch/arm64/kernel/entry-fpsimd.S  | 20 -
 arch/arm64/kernel/hibernate-asm.S | 16 +++
 arch/arm64/kernel/hyp-stub.S  | 20 -
 arch/arm64/kernel/probes/kprobes_trampoline.S |  4 +-
 arch/arm64/kernel/reloc_test_syms.S   | 44 +--
 arch/arm64/kernel/relocate_kernel.S   |  4 +-
 arch/arm64/kernel/sleep.S | 12 ++---
 arch/arm64/kernel/smccc-call.S|  8 ++--
 11 files changed, 70 insertions(+), 70 deletions(-)

diff --git a/arch/arm64/kernel/cpu-reset.S b/arch/arm64/kernel/cpu-reset.S
index 32c7bf858dd9..4033e2efa8cf 100644
--- a/arch/arm64/kernel/cpu-reset.S
+++ b/arch/arm64/kernel/cpu-reset.S
@@ -29,7 +29,7 @@
  * branch to what would be the reset vector. It must be executed with the
  * flat identity mapping.
  */
-ENTRY(__cpu_soft_restart)
+SYM_FUNC_START(__cpu_soft_restart)
/* Clear sctlr_el1 flags. */
mrs x12, sctlr_el1
ldr x13, =SCTLR_ELx_FLAGS
@@ -47,6 +47,6 @@ ENTRY(__cpu_soft_restart)
mov x1, x3  // arg1
mov x2, x4  // arg2
br  x8
-ENDPROC(__cpu_soft_restart)
+SYM_FUNC_END(__cpu_soft_restart)
 
 .popsection
diff --git a/arch/arm64/kernel/efi-entry.S b/arch/arm64/kernel/efi-entry.S
index 304d5b02ca67..de6ced92950e 100644
--- a/arch/arm64/kernel/efi-entry.S
+++ b/arch/arm64/kernel/efi-entry.S
@@ -25,7 +25,7 @@
 * we want to be. The kernel image wants to be placed at TEXT_OFFSET
 * from start of RAM.
 */
-ENTRY(entry)
+SYM_CODE_START(entry)
/*
 * Create a stack frame to save FP/LR with extra space
 * for image_addr variable passed to efi_entry().
@@ -117,4 +117,4 @@ efi_load_fail:
ret
 
 entry_end:
-ENDPROC(entry)
+SYM_CODE_END(entry)
diff --git a/arch/arm64/kernel/efi-rt-wrapper.S 
b/arch/arm64/kernel/efi-rt-wrapper.S
index 3fc71106cb2b..1192c4bb48df 100644
--- a/arch/arm64/kernel/efi-rt-wrapper.S
+++ b/arch/arm64/kernel/efi-rt-wrapper.S
@@ -5,7 +5,7 @@
 
 #include 
 
-ENTRY(__efi_rt_asm_wrapper)
+SYM_FUNC_START(__efi_rt_asm_wrapper)
stp x29, x30, [sp, #-32]!
mov x29, sp
 
@@ -35,4 +35,4 @@ ENTRY(__efi_rt_asm_wrapper)
b.ne0f
ret
 0: b   efi_handle_corrupted_x18// tail call
-ENDPROC(__efi_rt_asm_wrapper)
+SYM_FUNC_END(__efi_rt_asm_wrapper)
diff --git a/arch/arm64/kernel/entry-fpsimd.S b/arch/arm64/kernel/entry-fpsimd.S
index 0f24eae8f3cc..f880dd63ddc3 100644
--- a/arch/arm64/kernel/entry-fpsimd.S
+++ b/arch/arm64/kernel/entry-fpsimd.S
@@ -16,34 +16,34 @@
  *
  * x0 - pointer to struct fpsimd_state
  */
-ENTRY(fpsimd_save_state)
+SYM_FUNC_START(fpsimd_save_state)
fpsimd_save x0, 8
ret
-ENDPROC(fpsimd_save_state)
+SYM_FUNC_END(fpsimd_save_state)
 
 /*
  * Load the FP registers.
  *
  * x0 - pointer to struct fpsimd_state
  */
-ENTRY(fpsimd_load_state)
+SYM_FUNC_START(fpsimd_load_state)
fpsimd_restore x0, 8
ret
-ENDPROC(fpsimd_load_state)
+SYM_FUNC_END(fpsimd_load_state)
 
 #ifdef CONFIG_ARM64_SVE
-ENTRY(sve_save_state)
+SYM_FUNC_START(sve_save_state)
sve_save 0, x1, 2
ret
-ENDPROC(sve_save_state)
+SYM_FUNC_END(sve_save_state)
 
-ENTRY(sve_load_state)
+SYM_FUNC_START(sve_load_state)
sve_load 0, x1, x2, 3, x4
ret
-ENDPROC(sve_load_state)
+SYM_FUNC_END(sve_load_state)
 
-ENTRY(sve_get_vl)
+SYM_FUNC_START(sve_get_vl)
_sve_rdvl   0, 1
ret
-ENDPROC(sve_get_vl)
+SYM_FUNC_END(sve_get_vl)
 #endif /* CONFIG_ARM64_SVE */
diff --git a/arch/arm64/kernel/hibernate-asm.S 
b/arch/arm64/kernel/hibernate-asm.S
index 38bcd4d4e43b..2fad0ec846e3 100644
--- a/arch/arm64/kernel/hibernate-asm.S
+++ b/arch/arm64/kernel/hibernate-asm.S
@@ -65,7 +65,7 @@
  * x5: physical address of a  zero page that remains zero after resume
  */
 .pushsection".hibernate_exit.text", "ax"
-ENTRY(swsusp_arch_suspend_exit)
+SYM_CODE_START(swsusp_arch_suspend_exit)
/*
 * We execute from ttbr0, change ttbr1 to our copied linear map tables
 * with a break-before-make via the zero page
@@ -112,7 +112,7 @@ ENTRY(swsusp_arch_suspend_exit)
 3: ret
 
.ltorg
-ENDPROC(swsusp_arch_suspend_exit)
+SYM_CODE_END(swsusp_arch_suspend_exit)
 
 /*
  * Restore the hyp stub.
@@ -121,15 +121,15 @@ ENDPROC(swsusp_arch_suspend_exit)
  *
  * x24: The physical address of __hyp_stub_vectors
  */
-el1_sync: