linux-stable/arch
Matija Glavinic Pecotic 0af686415c x86/rtc: Remove __init for runtime functions
[ Upstream commit 775d3c514c ]

set_rtc_noop(), get_rtc_noop() are after booting, therefore their __init
annotation is wrong.

A crash was observed on an x86 platform where CMOS RTC is unused and
disabled via device tree. set_rtc_noop() was invoked from ntp:
sync_hw_clock(), although CONFIG_RTC_SYSTOHC=n, however sync_cmos_clock()
doesn't honour that.

  Workqueue: events_power_efficient sync_hw_clock
  RIP: 0010:set_rtc_noop
  Call Trace:
   update_persistent_clock64
   sync_hw_clock

Fix this by dropping the __init annotation from set/get_rtc_noop().

Fixes: c311ed6183 ("x86/init: Allow DT configured systems to disable RTC at boot time")
Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/59f7ceb1-446b-1d3d-0bc8-1f0ee94b1e18@nokia.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-20 12:13:56 +02:00
..
alpha alpha: fix R_ALPHA_LITERAL reloc for large modules 2023-03-17 08:49:01 +01:00
arc arc: iounmap() arg is volatile 2022-11-03 23:59:15 +09:00
arm ARM: 9290/1: uaccess: Fix KASAN false-positives 2023-04-20 12:13:54 +02:00
arm64 KVM: arm64: PMU: Restore the guest's EL0 event counting after migration 2023-04-20 12:13:52 +02:00
csky kprobes: treewide: Cleanup the error messages for kprobes 2023-02-22 12:57:00 +01:00
h8300 h8300: Fix build errors from do_exit() to make_task_dead() transition 2023-02-01 08:27:21 +01:00
hexagon hexagon: Fix function name in die() 2023-02-01 08:27:20 +01:00
ia64 genirq: Add and use an irq_data_update_affinity helper 2023-03-11 13:57:31 +01:00
m68k m68k: Only force 030 bus error if PC not in exception table 2023-03-30 12:47:53 +02:00
microblaze exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
mips mips: bmips: BCM6358: disable RAC flush for TP1 2023-04-05 11:24:54 +02:00
nds32 exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
nios2 exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
openrisc exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
parisc genirq: Add and use an irq_data_update_affinity helper 2023-03-11 13:57:31 +01:00
powerpc powerpc/papr_scm: Update the NUMA distance table for the target node 2023-04-20 12:13:56 +02:00
riscv riscv: add icache flush for nommu sigreturn trampoline 2023-04-20 12:13:55 +02:00
s390 KVM: s390: pv: fix external interruption loop not always detected 2023-04-13 16:48:17 +02:00
sh sh: sanitize the flags on sigreturn 2023-03-30 12:47:54 +02:00
sparc sparc: allow PM configs for sparc32 COMPILE_TEST 2023-03-10 09:39:33 +01:00
um UML: define RUNTIME_DISCARD_EXIT 2023-03-17 08:49:04 +01:00
x86 x86/rtc: Remove __init for runtime functions 2023-04-20 12:13:56 +02:00
xtensa xtensa: fix KASAN report for show_stack 2023-04-05 11:25:00 +02:00
.gitignore
Kconfig arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic 2022-08-17 14:23:00 +02:00