forked from Minki/linux
powerpc: Remove get_tb_or_rtc()
601 is gone, get_tb_or_rtc() is equivalent to get_tb(). Replace the former by the later. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/3e8a13ee83418630c753c30cb722ae682d5b2d39.1601362098.git.christophe.leroy@csgroup.eu
This commit is contained in:
parent
a4c5a35542
commit
6601ec1c2b
@ -85,11 +85,6 @@ static inline u64 get_tb(void)
|
||||
}
|
||||
#endif /* !CONFIG_PPC64 */
|
||||
|
||||
static inline u64 get_tb_or_rtc(void)
|
||||
{
|
||||
return get_tb();
|
||||
}
|
||||
|
||||
static inline void set_tb(unsigned int upper, unsigned int lower)
|
||||
{
|
||||
mtspr(SPRN_TBWL, 0);
|
||||
|
@ -104,7 +104,7 @@ static inline notrace unsigned long get_irq_happened(void)
|
||||
|
||||
static inline notrace int decrementer_check_overflow(void)
|
||||
{
|
||||
u64 now = get_tb_or_rtc();
|
||||
u64 now = get_tb();
|
||||
u64 *next_tb = this_cpu_ptr(&decrementers_next_tb);
|
||||
|
||||
return now >= *next_tb;
|
||||
|
@ -595,7 +595,7 @@ void timer_interrupt(struct pt_regs *regs)
|
||||
irq_work_run();
|
||||
}
|
||||
|
||||
now = get_tb_or_rtc();
|
||||
now = get_tb();
|
||||
if (now >= *next_tb) {
|
||||
*next_tb = ~(u64)0;
|
||||
if (evt->event_handler)
|
||||
@ -937,7 +937,7 @@ static void __init clocksource_init(void)
|
||||
static int decrementer_set_next_event(unsigned long evt,
|
||||
struct clock_event_device *dev)
|
||||
{
|
||||
__this_cpu_write(decrementers_next_tb, get_tb_or_rtc() + evt);
|
||||
__this_cpu_write(decrementers_next_tb, get_tb() + evt);
|
||||
set_dec(evt);
|
||||
|
||||
/* We may have raced with new irq work */
|
||||
@ -1071,7 +1071,7 @@ void __init time_init(void)
|
||||
tb_to_ns_scale = scale;
|
||||
tb_to_ns_shift = shift;
|
||||
/* Save the current timebase to pretty up CONFIG_PRINTK_TIME */
|
||||
boot_tb = get_tb_or_rtc();
|
||||
boot_tb = get_tb();
|
||||
|
||||
/* If platform provided a timezone (pmac), we correct the time */
|
||||
if (timezone_offset) {
|
||||
|
Loading…
Reference in New Issue
Block a user