[PATCH v4 03/16] xen/riscv: build setup code as .init

Oleksii Kurochko posted 16 patches 1 month, 4 weeks ago
There is a newer version of this series
[PATCH v4 03/16] xen/riscv: build setup code as .init
Posted by Oleksii Kurochko 1 month, 4 weeks ago
At the moment, all code and data in setup.c are marked with
__init or __init_data, so leverage this by using setup.init.o
instead of setup.o in Makefile.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
Changes in V4:
 - New patch.
---
 xen/arch/riscv/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
index caa1aac5b2f6..bc47e83b26d7 100644
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -12,7 +12,7 @@ obj-y += paging.o
 obj-y += pt.o
 obj-$(CONFIG_RISCV_64) += riscv64/
 obj-y += sbi.o
-obj-y += setup.o
+obj-y += setup.init.o
 obj-y += shutdown.o
 obj-y += smp.o
 obj-y += smpboot.o
-- 
2.52.0
Re: [PATCH v4 03/16] xen/riscv: build setup code as .init
Posted by Jan Beulich 1 month, 3 weeks ago
On 13.02.2026 17:28, Oleksii Kurochko wrote:
> At the moment, all code and data in setup.c are marked with
> __init or __init_data, 

"... which is intended to remain this way."

Nit: It's __initdata.

so leverage this by using setup.init.o
> instead of setup.o in Makefile.
> 
> Suggested-by: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
(once again happy to make adjustments while committing)

Jan
Re: [PATCH v4 03/16] xen/riscv: build setup code as .init
Posted by Oleksii Kurochko 1 month, 3 weeks ago
On 2/17/26 3:03 PM, Jan Beulich wrote:
> On 13.02.2026 17:28, Oleksii Kurochko wrote:
>> At the moment, all code and data in setup.c are marked with
>> __init or __init_data,
> "... which is intended to remain this way."
>
> Nit: It's __initdata.
>
> so leverage this by using setup.init.o
>> instead of setup.o in Makefile.
>>
>> Suggested-by: Jan Beulich <jbeulich@suse.com>
>> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
> Acked-by: Jan Beulich <jbeulich@suse.com>
> (once again happy to make adjustments while committing)

I'm happy with suggested adjustments. Thanks a lot for doing that!

~ Oleksii