diff mbox series

[1/4] riscv: vmlinux-xip.lds.S: remove .alternative section

Message ID 20230511141211.2418-2-jszhang@kernel.org (mailing list archive)
State Superseded
Headers show
Series riscv: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION | expand

Checks

Context Check Description
conchuod/tree_selection fail Failed to apply to next/pending-fixes or riscv/for-next

Commit Message

Jisheng Zhang May 11, 2023, 2:12 p.m. UTC
ALTERNATIVE mechanism can't work on XIP, and this is also reflected by
below Kconfig dependency:

RISCV_ALTERNATIVE
	...
	depends on !XIP_KERNEL
	...

So there's no .alternative section at all for XIP case, remove it.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 arch/riscv/kernel/vmlinux-xip.lds.S | 6 ------
 1 file changed, 6 deletions(-)

Comments

Conor Dooley May 12, 2023, 1:51 p.m. UTC | #1
On Thu, May 11, 2023 at 10:12:08PM +0800, Jisheng Zhang wrote:
> ALTERNATIVE mechanism can't work on XIP, and this is also reflected by
> below Kconfig dependency:
> 
> RISCV_ALTERNATIVE
> 	...
> 	depends on !XIP_KERNEL
> 	...
> 
> So there's no .alternative section at all for XIP case, remove it.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Just to note, this series doesn't apply on top of -rc1 - what is the
base that you used?

Cheers,
Conor.

> ---
>  arch/riscv/kernel/vmlinux-xip.lds.S | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/arch/riscv/kernel/vmlinux-xip.lds.S b/arch/riscv/kernel/vmlinux-xip.lds.S
> index eab9edc3b631..50767647fbc6 100644
> --- a/arch/riscv/kernel/vmlinux-xip.lds.S
> +++ b/arch/riscv/kernel/vmlinux-xip.lds.S
> @@ -98,12 +98,6 @@ SECTIONS
>  		__soc_builtin_dtb_table_end = .;
>  	}
>  
> -	. = ALIGN(8);
> -	.alternative : {
> -		__alt_start = .;
> -		*(.alternative)
> -		__alt_end = .;
> -	}
>  	__init_end = .;
>  
>  	. = ALIGN(16);
> -- 
> 2.40.1
>
Jisheng Zhang May 12, 2023, 3:36 p.m. UTC | #2
On Fri, May 12, 2023 at 02:51:56PM +0100, Conor Dooley wrote:
> On Thu, May 11, 2023 at 10:12:08PM +0800, Jisheng Zhang wrote:
> > ALTERNATIVE mechanism can't work on XIP, and this is also reflected by
> > below Kconfig dependency:
> > 
> > RISCV_ALTERNATIVE
> > 	...
> > 	depends on !XIP_KERNEL
> > 	...
> > 
> > So there's no .alternative section at all for XIP case, remove it.
> > 
> > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> 
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> 
> Just to note, this series doesn't apply on top of -rc1 - what is the
> base that you used?

rc1 + Palmer's fix branch

Thanks
> 
> Cheers,
> Conor.
> 
> > ---
> >  arch/riscv/kernel/vmlinux-xip.lds.S | 6 ------
> >  1 file changed, 6 deletions(-)
> > 
> > diff --git a/arch/riscv/kernel/vmlinux-xip.lds.S b/arch/riscv/kernel/vmlinux-xip.lds.S
> > index eab9edc3b631..50767647fbc6 100644
> > --- a/arch/riscv/kernel/vmlinux-xip.lds.S
> > +++ b/arch/riscv/kernel/vmlinux-xip.lds.S
> > @@ -98,12 +98,6 @@ SECTIONS
> >  		__soc_builtin_dtb_table_end = .;
> >  	}
> >  
> > -	. = ALIGN(8);
> > -	.alternative : {
> > -		__alt_start = .;
> > -		*(.alternative)
> > -		__alt_end = .;
> > -	}
> >  	__init_end = .;
> >  
> >  	. = ALIGN(16);
> > -- 
> > 2.40.1
> >
diff mbox series

Patch

diff --git a/arch/riscv/kernel/vmlinux-xip.lds.S b/arch/riscv/kernel/vmlinux-xip.lds.S
index eab9edc3b631..50767647fbc6 100644
--- a/arch/riscv/kernel/vmlinux-xip.lds.S
+++ b/arch/riscv/kernel/vmlinux-xip.lds.S
@@ -98,12 +98,6 @@  SECTIONS
 		__soc_builtin_dtb_table_end = .;
 	}
 
-	. = ALIGN(8);
-	.alternative : {
-		__alt_start = .;
-		*(.alternative)
-		__alt_end = .;
-	}
 	__init_end = .;
 
 	. = ALIGN(16);