From: Heiko Carstens Date: Sun, 24 Jan 2021 18:51:34 +0000 (+0100) Subject: s390/vdso: convert vdso_init() to arch_initcall X-Git-Tag: v5.15~1740^2~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96c0c7ae5266ec347041312ae22d947b5371e5b3;p=platform%2Fkernel%2Flinux-starfive.git s390/vdso: convert vdso_init() to arch_initcall Convert vdso_init() to arch_initcall like it is on all other architectures. This requires to remove the vdso_getcpu_init() call from vdso_init() since it must be called before smp is enabled. vdso_getcpu_init() is now an early_initcall like on powerpc. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik --- diff --git a/arch/s390/include/asm/vdso.h b/arch/s390/include/asm/vdso.h index f46c259..e4ea142 100644 --- a/arch/s390/include/asm/vdso.h +++ b/arch/s390/include/asm/vdso.h @@ -13,7 +13,7 @@ extern struct vdso_data *vdso_data; -void vdso_getcpu_init(void); +int vdso_getcpu_init(void); #endif /* __ASSEMBLY__ */ #endif /* __S390_VDSO_H__ */ diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c index c6aeddc..0bb287a 100644 --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c @@ -92,10 +92,12 @@ static union { } vdso_data_store __page_aligned_data; struct vdso_data *vdso_data = vdso_data_store.data; -void vdso_getcpu_init(void) +int vdso_getcpu_init(void) { set_tod_programmable_field(smp_processor_id()); + return 0; } +early_initcall(vdso_getcpu_init); /* Must be called before SMP init */ /* * This is called from binfmt_elf, we create the special vma for the @@ -167,7 +169,6 @@ static int __init vdso_init(void) { int i; - vdso_getcpu_init(); /* Calculate the size of the 64 bit vDSO */ vdso64_pages = ((&vdso64_end - &vdso64_start + PAGE_SIZE - 1) >> PAGE_SHIFT) + 1; @@ -188,4 +189,4 @@ static int __init vdso_init(void) return 0; } -early_initcall(vdso_init); +arch_initcall(vdso_init);