linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Stop putting .sbss in .sdata
@ 2020-02-18 21:25 Palmer Dabbelt
  2020-02-19  9:26 ` Zong Li
  0 siblings, 1 reply; 3+ messages in thread
From: Palmer Dabbelt @ 2020-02-18 21:25 UTC (permalink / raw)
  To: linux-riscv, zong.li; +Cc: android-kernel-team, Palmer Dabbelt

From: Palmer Dabbelt <palmerdabbelt@google.com>

I don't know why we were doing this, as it's been there since the beginning.
After d841f729e655 ("riscv: force hart_lottery to put in .sdata section") my
guess would be that it made the kernel boot and we forgot to fix it more
cleanly.

The default .bss segment already contains the .sbss section, so we don't need
to do anything additional to ensure the symbols in .sbss continue to work.

Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
---
 arch/riscv/kernel/vmlinux.lds.S | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
index 1e0193ded420..a8fb52a00295 100644
--- a/arch/riscv/kernel/vmlinux.lds.S
+++ b/arch/riscv/kernel/vmlinux.lds.S
@@ -64,7 +64,6 @@ SECTIONS
 		*(.sdata*)
 		/* End of data section */
 		_edata = .;
-		*(.sbss*)
 	}
 
 	BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
-- 
2.25.0.265.gbab2e86ba0-goog



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

* Re: [PATCH] RISC-V: Stop putting .sbss in .sdata
  2020-02-18 21:25 [PATCH] RISC-V: Stop putting .sbss in .sdata Palmer Dabbelt
@ 2020-02-19  9:26 ` Zong Li
  2020-02-19 18:32   ` Palmer Dabbelt
  0 siblings, 1 reply; 3+ messages in thread
From: Zong Li @ 2020-02-19  9:26 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: android-kernel-team, linux-riscv, Palmer Dabbelt

On Wed, Feb 19, 2020 at 5:26 AM Palmer Dabbelt <palmer@dabbelt.com> wrote:
>
> From: Palmer Dabbelt <palmerdabbelt@google.com>
>
> I don't know why we were doing this, as it's been there since the beginning.
> After d841f729e655 ("riscv: force hart_lottery to put in .sdata section") my
> guess would be that it made the kernel boot and we forgot to fix it more
> cleanly.
>
> The default .bss segment already contains the .sbss section, so we don't need
> to do anything additional to ensure the symbols in .sbss continue to work.
>
> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
> ---
>  arch/riscv/kernel/vmlinux.lds.S | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
> index 1e0193ded420..a8fb52a00295 100644
> --- a/arch/riscv/kernel/vmlinux.lds.S
> +++ b/arch/riscv/kernel/vmlinux.lds.S
> @@ -64,7 +64,6 @@ SECTIONS
>                 *(.sdata*)
>                 /* End of data section */
>                 _edata = .;
> -               *(.sbss*)
>         }
>
>         BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
> --
> 2.25.0.265.gbab2e86ba0-goog
>

I had given a quick test for that. It works on RV32 and RV64.

Tested-by: Zong Li <zong.li@sifive.com>


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

* Re: [PATCH] RISC-V: Stop putting .sbss in .sdata
  2020-02-19  9:26 ` Zong Li
@ 2020-02-19 18:32   ` Palmer Dabbelt
  0 siblings, 0 replies; 3+ messages in thread
From: Palmer Dabbelt @ 2020-02-19 18:32 UTC (permalink / raw)
  To: zong.li; +Cc: android-kernel-team, linux-riscv

On Wed, 19 Feb 2020 01:26:09 PST (-0800), zong.li@sifive.com wrote:
> On Wed, Feb 19, 2020 at 5:26 AM Palmer Dabbelt <palmer@dabbelt.com> wrote:
>>
>> From: Palmer Dabbelt <palmerdabbelt@google.com>
>>
>> I don't know why we were doing this, as it's been there since the beginning.
>> After d841f729e655 ("riscv: force hart_lottery to put in .sdata section") my
>> guess would be that it made the kernel boot and we forgot to fix it more
>> cleanly.
>>
>> The default .bss segment already contains the .sbss section, so we don't need
>> to do anything additional to ensure the symbols in .sbss continue to work.
>>
>> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
>> ---
>>  arch/riscv/kernel/vmlinux.lds.S | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/arch/riscv/kernel/vmlinux.lds.S b/arch/riscv/kernel/vmlinux.lds.S
>> index 1e0193ded420..a8fb52a00295 100644
>> --- a/arch/riscv/kernel/vmlinux.lds.S
>> +++ b/arch/riscv/kernel/vmlinux.lds.S
>> @@ -64,7 +64,6 @@ SECTIONS
>>                 *(.sdata*)
>>                 /* End of data section */
>>                 _edata = .;
>> -               *(.sbss*)
>>         }
>>
>>         BSS_SECTION(PAGE_SIZE, PAGE_SIZE, 0)
>> --
>> 2.25.0.265.gbab2e86ba0-goog
>>
>
> I had given a quick test for that. It works on RV32 and RV64.
>
> Tested-by: Zong Li <zong.li@sifive.com>

Thanks!


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

end of thread, other threads:[~2020-02-19 18:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 21:25 [PATCH] RISC-V: Stop putting .sbss in .sdata Palmer Dabbelt
2020-02-19  9:26 ` Zong Li
2020-02-19 18:32   ` Palmer Dabbelt

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