Skip to content

Commit 227e395

Browse files
Pavel TatashinKAGA-KOKO
authored andcommitted
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: Pavel Tatashin <pasha.tatashin@oracle.com> Signed-off-by: Thomas 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
1 parent 00067a6 commit 227e395

File tree

4 files changed

+5
-17
lines changed

4 files changed

+5
-17
lines changed

arch/arm/include/asm/mach/time.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
extern void timer_tick(void);
1414

1515
typedef void (*clock_access_fn)(struct timespec64 *);
16-
extern int register_persistent_clock(clock_access_fn read_boot,
17-
clock_access_fn read_persistent);
16+
extern int register_persistent_clock(clock_access_fn read_persistent);
1817

1918
#endif

arch/arm/kernel/time.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,29 +83,18 @@ static void dummy_clock_access(struct timespec64 *ts)
8383
}
8484

8585
static clock_access_fn __read_persistent_clock = dummy_clock_access;
86-
static clock_access_fn __read_boot_clock = dummy_clock_access;
8786

8887
void read_persistent_clock64(struct timespec64 *ts)
8988
{
9089
__read_persistent_clock(ts);
9190
}
9291

93-
void read_boot_clock64(struct timespec64 *ts)
94-
{
95-
__read_boot_clock(ts);
96-
}
97-
98-
int __init register_persistent_clock(clock_access_fn read_boot,
99-
clock_access_fn read_persistent)
92+
int __init register_persistent_clock(clock_access_fn read_persistent)
10093
{
10194
/* Only allow the clockaccess functions to be registered once */
102-
if (__read_persistent_clock == dummy_clock_access &&
103-
__read_boot_clock == dummy_clock_access) {
104-
if (read_boot)
105-
__read_boot_clock = read_boot;
95+
if (__read_persistent_clock == dummy_clock_access) {
10696
if (read_persistent)
10797
__read_persistent_clock = read_persistent;
108-
10998
return 0;
11099
}
111100

arch/arm/plat-omap/counter_32k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ int __init omap_init_clocksource_32k(void __iomem *vbase)
110110
}
111111

112112
sched_clock_register(omap_32k_read_sched_clock, 32, 32768);
113-
register_persistent_clock(NULL, omap_read_persistent_clock64);
113+
register_persistent_clock(omap_read_persistent_clock64);
114114
pr_info("OMAP clocksource: 32k_counter at 32768 Hz\n");
115115

116116
return 0;

drivers/clocksource/tegra20_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,6 @@ static int __init tegra20_init_rtc(struct device_node *np)
259259
else
260260
clk_prepare_enable(clk);
261261

262-
return register_persistent_clock(NULL, tegra_read_persistent_clock64);
262+
return register_persistent_clock(tegra_read_persistent_clock64);
263263
}
264264
TIMER_OF_DECLARE(tegra20_rtc, "nvidia,tegra20-rtc", tegra20_init_rtc);

0 commit comments

Comments
 (0)