Re: [PATCH] x86/rtc_noop: Remove init for runtime functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 24, 2022 at 11:10:26AM +0100, Matija Glavinic Pecotic wrote:
> set_rtc_noop, get_rtc_noop are used runtime, therefore need __init removed.
> Problem was observed on x86 platform where cmos rtc is unused and disabled
> via device tree. Function was triggered from ntp: sync_hw_clock, although
> CONFIG_RTC_SYSTOHC=n, however sync_cmos_clock doesn't honour that.

>   BUG: unable to handle page fault for address: ffffffff82945193
>   #PF: supervisor instruction fetch in kernel mode
>   #PF: error_code(0x0011) - permissions violation
>   PGD 420d067 P4D 420d067 PUD 420e063 PMD 29185d063 PTE 8000000004945163
>   Oops: 0011 [#1] PREEMPT SMP NOPTI
>   CPU: 1 PID: 539 Comm: kworker/1:1 Tainted: G S         O      5.10.141-3c37b890b4-nokia_sm_x86 #1
>   Hardware name: Nokia Asil/Default string, BIOS 0ACNA108 06/13/2022
>   Workqueue: events_power_efficient sync_hw_clock
>   RIP: 0010:set_rtc_noop+0x0/0xf
>   Code: cc cc cc cc cc [...]
>   RSP: 0000:ffffc9002467fe38 EFLAGS: 00010282
>   RAX: ffffffff82945193 RBX: ffff8882edef1380 RCX: 0000000000000018
>   RDX: 0000000000a8467f RSI: 0000000000000000 RDI: ffffc9002467fe40
>   RBP: ffffc9002467fe50 R08: 001e63aad609496d R09: ffff8882edef13fc
>   R10: 0000000000000018 R11: 0000000000000018 R12: ffff88847006c680
>   R13: ffff888470070c00 R14: 0000000000000000 R15: 0000000000000000
>   FS:  0000000000000000(0000) GS:ffff888470040000(0000) knlGS:0000000000000000
>   CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>   CR2: ffffffff82945193 CR3: 00000002ef6ba000 CR4: 0000000000350fe0
>   Call Trace:
>    update_persistent_clock64+0x22/0x30
>    sync_hw_clock+0x125/0x160
>    process_one_work+0x1c2/0x3c0
>    worker_thread+0x4d/0x3d0
>    ? rescuer_thread+0x390/0x390
>    kthread+0x130/0x150
>    ? kthread_create_worker_on_cpu+0x70/0x70
>    ret_from_fork+0x1f/0x30
>   CR2: ffffffff82945193
>   ---[ end trace fa3cbf08de1cf1dd ]---

Read

https://www.kernel.org/doc/html/latest/process/submitting-patches.html#backtraces-in-commit-messages

and act accordingly.


> Fixes: c311ed6183f4: ("x86/init: Allow DT configured systems to disable
> RTC at boot time")
> 

Read more of above document to see how properly form the Fixes: tag and how to
make sure it's a tag and not just a paragraph of the commit message.

> Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@xxxxxxxxx>

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux ia64]     [Linux Kernel]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux Hams]
  Powered by Linux