Bug 15366
Summary: | sysfs oops when reading current_clocksource if GENERIC_TIME=n | ||
---|---|---|---|
Product: | Timers | Reporter: | Aaro Koskinen (aaro.koskinen) |
Component: | Other | Assignee: | john stultz (john.stultz) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | aaro.koskinen, akpm |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.32.8 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
[PATCH] Make sure curr_clocksource gets initialized
Second attempt at getting curr_clocksource initialized |
Description
Aaro Koskinen
2010-02-21 20:19:19 UTC
Created attachment 25149 [details]
[PATCH] Make sure curr_clocksource gets initialized
Ugh. Yea, looks like the clocksource rework missed this.
Here's a test patch that tries to avoid the value being uninitialized. I've not tested it, but let me know if it doesn't resolve the issue.
thanks
-john
(In reply to comment #1) > Created an attachment (id=25149) [details] > [PATCH] Make sure curr_clocksource gets initialized > > Ugh. Yea, looks like the clocksource rework missed this. > > Here's a test patch that tries to avoid the value being uninitialized. I've > not > tested it, but let me know if it doesn't resolve the issue. In practice that patch would work, but it will introduce section mismatch warnings: CC kernel/time/clocksource.o LD kernel/time/built-in.o WARNING: kernel/time/built-in.o(.text+0x1c04): Section mismatch in reference from the function clocksource_unregister() to the function .init.text:clocksource_default_clock() The function clocksource_unregister() references the function __init clocksource_default_clock(). This is often because clocksource_unregister lacks a __init annotation or the annotation of clocksource_default_clock is wrong. WARNING: kernel/time/built-in.o(.text+0x1c68): Section mismatch in reference from the function __clocksource_change_rating() to the function .init.text:clocksource_default_clock() The function __clocksource_change_rating() references the function __init clocksource_default_clock(). This is often because __clocksource_change_rating lacks a __init annotation or the annotation of clocksource_default_clock is wrong. WARNING: kernel/time/built-in.o(.text+0x1e1c): Section mismatch in reference from the function sysfs_override_clocksource() to the function .init.text:clocksource_default_clock() The function sysfs_override_clocksource() references the function __init clocksource_default_clock(). This is often because sysfs_override_clocksource lacks a __init annotation or the annotation of clocksource_default_clock is wrong. WARNING: kernel/time/built-in.o(.text+0x1f10): Section mismatch in reference from the function clocksource_register() to the function .init.text:clocksource_default_clock() The function clocksource_register() references the function __init clocksource_default_clock(). This is often because clocksource_register lacks a __init annotation or the annotation of clocksource_default_clock is wrong. Created attachment 25166 [details]
Second attempt at getting curr_clocksource initialized
Thanks for the testing and sorry it wasn't right. Here's another attempt to make sure curr_clocksource is set. Build but not boot tested.
thanks
-john
(In reply to comment #3) > Created an attachment (id=25166) [details] > Second attempt at getting curr_clocksource initialized > > Thanks for the testing and sorry it wasn't right. Here's another attempt to > make sure curr_clocksource is set. Build but not boot tested. This patch does not have build issues, and even better, my computer does not oops anymore: # cat /sys/devices/system/clocksource/clocksource0/current_clocksource jiffies Thanks. I hope the fix will end up in stable tree (2.6.32.x). Aaro, thanks for testing! I'll push this to 2.6.33.x and 2.6.32.x today. Patch is upstream. |