提交 227e3958 编写于 作者: P Pavel Tatashin 提交者: Thomas Gleixner

ARM/time: Remove read_boot_clock64()

read_boot_clock64() is deleted, and replaced with
read_persistent_wall_and_boot_offset().

The default implementation of read_persistent_wall_and_boot_offset()
provides a better fallback than the current stubs for read_boot_clock64()
that arm has with no users, so remove the old code.
Signed-off-by: NPavel Tatashin <pasha.tatashin@oracle.com>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Cc: steven.sistare@oracle.com
Cc: daniel.m.jordan@oracle.com
Cc: linux@armlinux.org.uk
Cc: schwidefsky@de.ibm.com
Cc: heiko.carstens@de.ibm.com
Cc: john.stultz@linaro.org
Cc: sboyd@codeaurora.org
Cc: hpa@zytor.com
Cc: douly.fnst@cn.fujitsu.com
Cc: peterz@infradead.org
Cc: prarit@redhat.com
Cc: feng.tang@intel.com
Cc: pmladek@suse.com
Cc: gnomes@lxorguk.ukuu.org.uk
Cc: linux-s390@vger.kernel.org
Cc: boris.ostrovsky@oracle.com
Cc: jgross@suse.com
Cc: pbonzini@redhat.com
Link: https://lkml.kernel.org/r/20180719205545.16512-19-pasha.tatashin@oracle.com
上级 00067a6d
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
extern void timer_tick(void); extern void timer_tick(void);
typedef void (*clock_access_fn)(struct timespec64 *); typedef void (*clock_access_fn)(struct timespec64 *);
extern int register_persistent_clock(clock_access_fn read_boot, extern int register_persistent_clock(clock_access_fn read_persistent);
clock_access_fn read_persistent);
#endif #endif
...@@ -83,29 +83,18 @@ static void dummy_clock_access(struct timespec64 *ts) ...@@ -83,29 +83,18 @@ static void dummy_clock_access(struct timespec64 *ts)
} }
static clock_access_fn __read_persistent_clock = dummy_clock_access; static clock_access_fn __read_persistent_clock = dummy_clock_access;
static clock_access_fn __read_boot_clock = dummy_clock_access;
void read_persistent_clock64(struct timespec64 *ts) void read_persistent_clock64(struct timespec64 *ts)
{ {
__read_persistent_clock(ts); __read_persistent_clock(ts);
} }
void read_boot_clock64(struct timespec64 *ts) int __init register_persistent_clock(clock_access_fn read_persistent)
{
__read_boot_clock(ts);
}
int __init register_persistent_clock(clock_access_fn read_boot,
clock_access_fn read_persistent)
{ {
/* Only allow the clockaccess functions to be registered once */ /* Only allow the clockaccess functions to be registered once */
if (__read_persistent_clock == dummy_clock_access && if (__read_persistent_clock == dummy_clock_access) {
__read_boot_clock == dummy_clock_access) {
if (read_boot)
__read_boot_clock = read_boot;
if (read_persistent) if (read_persistent)
__read_persistent_clock = read_persistent; __read_persistent_clock = read_persistent;
return 0; return 0;
} }
......
...@@ -110,7 +110,7 @@ int __init omap_init_clocksource_32k(void __iomem *vbase) ...@@ -110,7 +110,7 @@ int __init omap_init_clocksource_32k(void __iomem *vbase)
} }
sched_clock_register(omap_32k_read_sched_clock, 32, 32768); sched_clock_register(omap_32k_read_sched_clock, 32, 32768);
register_persistent_clock(NULL, omap_read_persistent_clock64); register_persistent_clock(omap_read_persistent_clock64);
pr_info("OMAP clocksource: 32k_counter at 32768 Hz\n"); pr_info("OMAP clocksource: 32k_counter at 32768 Hz\n");
return 0; return 0;
......
...@@ -259,6 +259,6 @@ static int __init tegra20_init_rtc(struct device_node *np) ...@@ -259,6 +259,6 @@ static int __init tegra20_init_rtc(struct device_node *np)
else else
clk_prepare_enable(clk); clk_prepare_enable(clk);
return register_persistent_clock(NULL, tegra_read_persistent_clock64); return register_persistent_clock(tegra_read_persistent_clock64);
} }
TIMER_OF_DECLARE(tegra20_rtc, "nvidia,tegra20-rtc", tegra20_init_rtc); TIMER_OF_DECLARE(tegra20_rtc, "nvidia,tegra20-rtc", tegra20_init_rtc);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册