linux-stable/drivers/clocksource
David Howells cc9c617557 Annotate hardware config module parameters in drivers/clocksource/
When the kernel is running in secure boot mode, we lock down the kernel to
prevent userspace from modifying the running kernel image.  Whilst this
includes prohibiting access to things like /dev/mem, it must also prevent
access by means of configuring driver modules in such a way as to cause a
device to access or modify the kernel image.

To this end, annotate module_param* statements that refer to hardware
configuration and indicate for future reference what type of parameter they
specify.  The parameter parser in the core sees this information and can
skip such parameters with an error message if the kernel is locked down.
The module initialisation then runs as normal, but just sees whatever the
default values for those parameters is.

Note that we do still need to do the module initialisation because some
drivers have viable defaults set in case parameters aren't specified and
some drivers support automatic configuration (e.g. PNP or PCI) in addition
to manually coded parameters.

This patch annotates drivers in drivers/clocksource/.

[Note: With regard to cs5535-clockevt.c, Thomas Gleixner asked whether the
 timer_irq parameter is required for the driver to work on anything other than
 arbitrary hardware which has it mapped to 0.  Jens Rottmann replied that the
 parameter defaults to 0, which means:

	1. autodetect (=keep IRQ BIOS has set up)
	2. if that fails use CONFIG_CS5535_MFGPT_DEFAULT_IRQ
	   (see drivers/misc/cs5535-mfgpt.c: cs5535_mfgpt_set_irq())

 Jens further noted that there may not be any systems that have CS5535/36
 devices that support EFI and secure boot.]

Suggested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Daniel Lezcano <daniel.lezcano@linaro.org>
cc: Thomas Gleixner <tglx@linutronix.de>
cc: Jens Rottmann <Jens.Rottmann@ADLINKtech.com>
cc: linux-kernel@vger.kernel.org
2017-04-20 12:02:32 +01:00
..
acpi_pm.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
arc_timer.c Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
arm_arch_timer.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/clock.h> 2017-03-02 08:42:27 +01:00
arm_global_timer.c Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
armv7m_systick.c clocksource/drivers/armv7m_systick: Add the COMPILE_TEST option 2016-06-28 10:22:05 +02:00
asm9260_timer.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
bcm2835_timer.c clocksource/drivers/bcm2835_timer: Unmap region obtained by of_iomap 2016-11-22 09:22:59 +01:00
bcm_kona_timer.c clocksource/drivers/kona: Fix get_counter() error handling 2016-08-17 13:08:31 +02:00
cadence_ttc_timer.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
clkevt-probe.c clockevents: Add a clkevt-of mechanism like clksrc-of 2017-02-07 20:58:30 +01:00
clksrc-dbx500-prcmu.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
clksrc-probe.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
clksrc_st_lpc.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
clps711x-timer.c ARM: SoC driver updates for v4.8 2016-08-01 18:36:01 -04:00
cs5535-clockevt.c Annotate hardware config module parameters in drivers/clocksource/ 2017-04-20 12:02:32 +01:00
dummy_timer.c cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
dw_apb_timer.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
dw_apb_timer_of.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
em_sti.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
exynos_mct.c clocksource/exynos_mct: Clear interrupt when cpu is shut down 2017-01-17 10:08:38 +01:00
fsl_ftm_timer.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
h8300_timer8.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
h8300_timer16.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
h8300_tpu.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
i8253.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
jcore-pit.c Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
Kconfig clocksource/drivers/arm_arch_timer: Work around Hisilicon erratum 161010101 2017-02-08 00:14:04 +01:00
Makefile clocksource/drivers/ostm: Add renesas-ostm timer driver 2017-02-07 20:58:30 +01:00
meson6_timer.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
metag_generic.c Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
mips-gic-timer.c Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
mmio.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
moxart_timer.c clocksource/drivers/moxart: Plug memory and mapping leaks 2016-12-19 11:19:57 +01:00
mps2-timer.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
mtk_timer.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
mxs_timer.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
nomadik-mtu.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
numachip.c x86/numachip: Fix timer build conflict 2015-09-23 05:39:20 +02:00
pxa_timer.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/clock.h> 2017-03-02 08:42:27 +01:00
qcom-timer.c Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
renesas-ostm.c clocksource/drivers/ostm: Add renesas-ostm timer driver 2017-02-07 20:58:30 +01:00
rockchip_timer.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
samsung_pwm_timer.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
scx200_hrt.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
sh_cmt.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
sh_mtu2.c clocksource/drivers/sh_mtu2: Fix multiple shutdown call issue 2015-10-28 15:22:56 +01:00
sh_tmu.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
sun4i_timer.c clocksource/drivers/sun4i: Clear interrupts after stopping timer in probe function 2016-08-26 15:56:01 +02:00
tango_xtal.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
tcb_clksrc.c Revert "clocksource/drivers/tcb_clksrc: Use 32 bit tcb as sched_clock" 2017-03-11 22:03:34 +01:00
tegra20_timer.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
time-armada-370-xp.c cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
time-efm32.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
time-lpc32xx.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
time-orion.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
time-pistachio.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
timer-atlas7.c Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
timer-atmel-pit.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
timer-atmel-st.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
timer-digicolor.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/clock.h> 2017-03-02 08:42:27 +01:00
timer-gemini.c clocksource/drivers/gemini: Add driver for the Cortina Gemini 2017-02-07 20:58:30 +01:00
timer-imx-gpt.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
timer-integrator-ap.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
timer-keystone.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
timer-nps.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
timer-oxnas-rps.c clocksource/drivers/oxnas: Add OX820 compatible 2016-09-12 07:28:46 +02:00
timer-prima2.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
timer-sp.h ARM: 8366/1: move Dual-Timer SP804 driver to drivers/clocksource 2015-06-02 09:58:18 +01:00
timer-sp804.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
timer-stm32.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
timer-sun5i.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
timer-ti-32k.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
timer-u300.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
versatile.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
vf_pit_timer.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00
vt8500_timer.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
zevio-timer.c clocksources: Switch back to the clksrc table 2016-06-28 10:19:35 +02:00