[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220701033647.911334-1-liyupeng@zbhlos.com>
Date: Fri, 1 Jul 2022 11:36:47 +0800
From: Yupeng Li <liyupeng@...los.com>
To: fweisbec@...il.com, tglx@...utronix.de, mingo@...nel.org
Cc: caizp2008@....com, linux-kernel@...r.kernel.org,
Yupeng Li <liyupeng@...los.com>
Subject: [PATCH 1/1] timers/nohz: fix build with CONFIG_NO_HZ_FULL warnning.
When CONFIG_NO_HZ_FULL was enabled,build kernel with Section mismatch
warnnings.Fixed this by removing the __init annotation according to
the prompt of compilation information ,some build messages as followed:
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
AR init/built-in.a
LD vmlinux.o
MODPOST vmlinux.symvers
WARNING: modpost: vmlinux.o(___ksymtab_gpl+tick_nohz_full_setup+0x0): Section mismatch in reference from the variable __ksymtab_tick_nohz_full_setup to the function .init.text:tick_nohz_full_setup()
The symbol tick_nohz_full_setup is exported and annotated __init
Fix this by removing the __init annotation of tick_nohz_full_setup or drop the export.
MODINFO modules.builtin.modinfo
GEN modules.builtin
LD .tmp_vmlinux.kallsyms1
Signed-off-by: Yupeng Li <liyupeng@...los.com>
Reviewed-by: Caicai <caizp2008@....com>
---
include/linux/tick.h | 2 +-
kernel/time/tick-sched.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/tick.h b/include/linux/tick.h
index bfd571f18cfd..63fe21c6a55c 100644
--- a/include/linux/tick.h
+++ b/include/linux/tick.h
@@ -272,7 +272,7 @@ static inline void tick_dep_clear_signal(struct signal_struct *signal,
extern void tick_nohz_full_kick_cpu(int cpu);
extern void __tick_nohz_task_switch(void);
-extern void __init tick_nohz_full_setup(cpumask_var_t cpumask);
+extern void tick_nohz_full_setup(cpumask_var_t cpumask);
#else
static inline bool tick_nohz_full_enabled(void) { return false; }
static inline bool tick_nohz_full_cpu(int cpu) { return false; }
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 58a11f859ac7..f8641c66f0d8 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -520,7 +520,7 @@ void __tick_nohz_task_switch(void)
}
/* Get the boot-time nohz CPU list from the kernel parameters. */
-void __init tick_nohz_full_setup(cpumask_var_t cpumask)
+void tick_nohz_full_setup(cpumask_var_t cpumask)
{
alloc_bootmem_cpumask_var(&tick_nohz_full_mask);
cpumask_copy(tick_nohz_full_mask, cpumask);
--
2.34.1
Powered by blists - more mailing lists