diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-04-25 20:31:46 +0000 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-05-16 11:09:15 +0200 |
commit | 7eaeb34305dee26634f7c98ae62646da5cebe91d (patch) | |
tree | 90651274a29cbb0e17d7655ca63a15aa5e7edc30 /include/linux/clocksource.h | |
parent | 29b5407819f59731c9423238fae03b756822708c (diff) | |
download | blackbird-op-linux-7eaeb34305dee26634f7c98ae62646da5cebe91d.tar.gz blackbird-op-linux-7eaeb34305dee26634f7c98ae62646da5cebe91d.zip |
clocksource: Provide unbind interface in sysfs
With the module refcount held for the current clocksource there is no
way to unload the module.
Provide a sysfs interface which allows to unbind the clocksource. One
could argue that the clocksource override could be (ab)used to do so,
but the clocksource override cannot be used from the kernel itself,
while an unbind function can be used to programmatically check whether
a clocksource can be shutdown or not.
The unbind functionality uses the new skip current feature of
clocksource_select and verifies that a fallback clocksource has been
installed. If the clocksource which should be unbound is the current
clocksource and no fallback can be found, unbind returns -EBUSY.
This does not support the unbinding of a clocksource which is used as
the watchdog clocksource. No point in fostering crappy hardware.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Magnus Damm <magnus.damm@gmail.com>
Link: http://lkml.kernel.org/r/20130425143435.964218245@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/clocksource.h')
0 files changed, 0 insertions, 0 deletions