From 4db413e318aa055bab1d70daae6fd9d0df1f4bed Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 30 Jun 2022 11:26:06 +0200 Subject: [PATCH] 5.18-stable patches added patches: clocksource-drivers-ixp4xx-drop-boardfile-probe-path.patch tick-nohz-unexport-__init-annotated-tick_nohz_full_setup.patch --- ...ers-ixp4xx-drop-boardfile-probe-path.patch | 94 +++++++++++++++++++ queue-5.18/series | 2 + ..._init-annotated-tick_nohz_full_setup.patch | 49 ++++++++++ 3 files changed, 145 insertions(+) create mode 100644 queue-5.18/clocksource-drivers-ixp4xx-drop-boardfile-probe-path.patch create mode 100644 queue-5.18/series create mode 100644 queue-5.18/tick-nohz-unexport-__init-annotated-tick_nohz_full_setup.patch diff --git a/queue-5.18/clocksource-drivers-ixp4xx-drop-boardfile-probe-path.patch b/queue-5.18/clocksource-drivers-ixp4xx-drop-boardfile-probe-path.patch new file mode 100644 index 00000000000..c7eb92aaaf5 --- /dev/null +++ b/queue-5.18/clocksource-drivers-ixp4xx-drop-boardfile-probe-path.patch @@ -0,0 +1,94 @@ +From 41929c9f628b9990d33a200c54bb0c919e089aa8 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Wed, 6 Apr 2022 22:55:05 +0200 +Subject: clocksource/drivers/ixp4xx: Drop boardfile probe path + +From: Linus Walleij + +commit 41929c9f628b9990d33a200c54bb0c919e089aa8 upstream. + +The boardfiles for IXP4xx have been deleted. Delete all the +quirks and code dealing with that boot path and rely solely on +device tree boot. + +Signed-off-by: Linus Walleij +Link: https://lore.kernel.org/r/20220406205505.2332821-1-linus.walleij@linaro.org +Signed-off-by: Daniel Lezcano +Signed-off-by: Greg Kroah-Hartman +--- + drivers/clocksource/Kconfig | 2 +- + drivers/clocksource/timer-ixp4xx.c | 25 ------------------------- + include/linux/platform_data/timer-ixp4xx.h | 11 ----------- + 3 files changed, 1 insertion(+), 37 deletions(-) + delete mode 100644 include/linux/platform_data/timer-ixp4xx.h + +--- a/drivers/clocksource/Kconfig ++++ b/drivers/clocksource/Kconfig +@@ -80,7 +80,7 @@ config IXP4XX_TIMER + bool "Intel XScale IXP4xx timer driver" if COMPILE_TEST + depends on HAS_IOMEM + select CLKSRC_MMIO +- select TIMER_OF if OF ++ select TIMER_OF + help + Enables support for the Intel XScale IXP4xx SoC timer. + +--- a/drivers/clocksource/timer-ixp4xx.c ++++ b/drivers/clocksource/timer-ixp4xx.c +@@ -19,8 +19,6 @@ + #include + #include + #include +-/* Goes away with OF conversion */ +-#include + + /* + * Constants to make it easy to access Timer Control/Status registers +@@ -263,28 +261,6 @@ static struct platform_driver ixp4xx_tim + }; + builtin_platform_driver(ixp4xx_timer_driver); + +-/** +- * ixp4xx_timer_setup() - Timer setup function to be called from boardfiles +- * @timerbase: physical base of timer block +- * @timer_irq: Linux IRQ number for the timer +- * @timer_freq: Fixed frequency of the timer +- */ +-void __init ixp4xx_timer_setup(resource_size_t timerbase, +- int timer_irq, +- unsigned int timer_freq) +-{ +- void __iomem *base; +- +- base = ioremap(timerbase, 0x100); +- if (!base) { +- pr_crit("IXP4xx: can't remap timer\n"); +- return; +- } +- ixp4xx_timer_register(base, timer_irq, timer_freq); +-} +-EXPORT_SYMBOL_GPL(ixp4xx_timer_setup); +- +-#ifdef CONFIG_OF + static __init int ixp4xx_of_timer_init(struct device_node *np) + { + void __iomem *base; +@@ -315,4 +291,3 @@ out_unmap: + return ret; + } + TIMER_OF_DECLARE(ixp4xx, "intel,ixp4xx-timer", ixp4xx_of_timer_init); +-#endif +--- a/include/linux/platform_data/timer-ixp4xx.h ++++ /dev/null +@@ -1,11 +0,0 @@ +-/* SPDX-License-Identifier: GPL-2.0 */ +-#ifndef __TIMER_IXP4XX_H +-#define __TIMER_IXP4XX_H +- +-#include +- +-void __init ixp4xx_timer_setup(resource_size_t timerbase, +- int timer_irq, +- unsigned int timer_freq); +- +-#endif diff --git a/queue-5.18/series b/queue-5.18/series new file mode 100644 index 00000000000..c11cb104239 --- /dev/null +++ b/queue-5.18/series @@ -0,0 +1,2 @@ +tick-nohz-unexport-__init-annotated-tick_nohz_full_setup.patch +clocksource-drivers-ixp4xx-drop-boardfile-probe-path.patch diff --git a/queue-5.18/tick-nohz-unexport-__init-annotated-tick_nohz_full_setup.patch b/queue-5.18/tick-nohz-unexport-__init-annotated-tick_nohz_full_setup.patch new file mode 100644 index 00000000000..b593631070e --- /dev/null +++ b/queue-5.18/tick-nohz-unexport-__init-annotated-tick_nohz_full_setup.patch @@ -0,0 +1,49 @@ +From 2390095113e98fc52fffe35c5206d30d9efe3f78 Mon Sep 17 00:00:00 2001 +From: Masahiro Yamada +Date: Mon, 27 Jun 2022 12:22:09 +0900 +Subject: tick/nohz: unexport __init-annotated tick_nohz_full_setup() + +From: Masahiro Yamada + +commit 2390095113e98fc52fffe35c5206d30d9efe3f78 upstream. + +EXPORT_SYMBOL and __init is a bad combination because the .init.text +section is freed up after the initialization. Hence, modules cannot +use symbols annotated __init. The access to a freed symbol may end up +with kernel panic. + +modpost used to detect it, but it had been broken for a decade. + +Commit 28438794aba4 ("modpost: fix section mismatch check for exported +init/exit sections") fixed it so modpost started to warn it again, then +this showed up: + + 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. + +Drop the export because tick_nohz_full_setup() is only called from the +built-in code in kernel/sched/isolation.c. + +Fixes: ae9e557b5be2 ("time: Export tick start/stop functions for rcutorture") +Reported-by: Linus Torvalds +Signed-off-by: Masahiro Yamada +Tested-by: Paul E. McKenney +Signed-off-by: Linus Torvalds +Cc: Thomas Backlund +Signed-off-by: Greg Kroah-Hartman +--- + kernel/time/tick-sched.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/kernel/time/tick-sched.c ++++ b/kernel/time/tick-sched.c +@@ -526,7 +526,6 @@ void __init tick_nohz_full_setup(cpumask + cpumask_copy(tick_nohz_full_mask, cpumask); + tick_nohz_full_running = true; + } +-EXPORT_SYMBOL_GPL(tick_nohz_full_setup); + + static int tick_nohz_cpu_down(unsigned int cpu) + { -- 2.47.3