linux/arch/cris/kernel
Stephen Warren 7b1f62076b time: convert arch_gettimeoffset to a pointer
Currently, whenever CONFIG_ARCH_USES_GETTIMEOFFSET is enabled, each
arch core provides a single implementation of arch_gettimeoffset(). In
many cases, different sub-architectures, different machines, or
different timer providers exist, and so the arch ends up implementing
arch_gettimeoffset() as a call-through-pointer anyway. Examples are
ARM, Cris, M68K, and it's arguable that the remaining architectures,
M32R and Blackfin, should be doing this anyway.

Modify arch_gettimeoffset so that it itself is a function pointer, which
the arch initializes. This will allow later changes to move the
initialization of this function into individual machine support or timer
drivers. This is particularly useful for code in drivers/clocksource
which should rely on an arch-independant mechanism to register their
implementation of arch_gettimeoffset().

This patch also converts the Cris architecture to set arch_gettimeoffset
directly to the final implementation in time_init(), because Cris already
had separate time_init() functions per sub-architecture. M68K and ARM
are converted to set arch_gettimeoffset to the final implementation in
later patches, because they already have function pointers in place for
this purpose.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2012-12-24 09:36:07 -07:00
..
asm-offsets.c CRIS: use kbuild.h instead of defining macros in asm-offset.c 2012-12-20 12:45:40 +01:00
crisksyms.c cris: switch to generic kernel_thread() 2012-10-14 23:12:25 -04:00
irq.c Disintegrate asm/system.h for CRIS 2012-03-28 18:30:02 +01:00
Makefile arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 2009-09-20 12:28:22 +02:00
module.c modules: don't hand 0 to vmalloc. 2012-12-14 13:06:43 +10:30
process.c cris: Add missing RCU idle APIs on idle loop 2012-09-23 07:44:44 -07:00
profile.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
ptrace.c move key_repace_session_keyring() into tracehook_notify_resume() 2012-05-23 22:09:20 -04:00
setup.c Disintegrate asm/system.h for CRIS 2012-03-28 18:30:02 +01:00
sys_cris.c Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
time.c time: convert arch_gettimeoffset to a pointer 2012-12-24 09:36:07 -07:00
traps.c Disintegrate asm/system.h for CRIS 2012-03-28 18:30:02 +01:00
vmlinux.lds.S CRIS: Add _sdata to vmlinux.lds.S 2012-04-03 13:26:33 +02:00