Skip to content

Commit 2cfa766

Browse files
committed
[MIPS] time: Delete dead cycles_per_jiffy, mips_timer_ack and null_timer_ack
cycles_per_jiffy was only ever getting assigned and the function pointer not being called anymore and mips_timer_ack had gotten similarly stale. I leave the remaining assignments unfixed as a lighthouse pointing platform maintainers to what needs a rewrite. These changes make null_timer_ack() unreferenced, so delete that too. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 76d3a7a commit 2cfa766

2 files changed

Lines changed: 0 additions & 22 deletions

File tree

‎arch/mips/kernel/time.c‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,6 @@ int update_persistent_clock(struct timespec now)
7272
return rtc_mips_set_mmss(now.tv_sec);
7373
}
7474

75-
/* how many counter cycles in a jiffy */
76-
static unsigned long cycles_per_jiffy __read_mostly;
77-
78-
/*
79-
* Null timer ack for systems not needing one (e.g. i8254).
80-
*/
81-
static void null_timer_ack(void) { /* nothing */ }
82-
8375
/*
8476
* Null high precision timer functions for systems lacking one.
8577
*/
@@ -105,7 +97,6 @@ static cycle_t c0_hpt_read(void)
10597
}
10698

10799
int (*mips_timer_state)(void);
108-
void (*mips_timer_ack)(void);
109100

110101
/*
111102
* local_timer_interrupt() does profiling and process accounting
@@ -512,14 +503,6 @@ void __init time_init(void)
512503
if (!clocksource_mips.read) {
513504
/* No external high precision timer -- use R4k. */
514505
clocksource_mips.read = c0_hpt_read;
515-
516-
if (!mips_timer_state) {
517-
/* No external timer interrupt -- use R4k. */
518-
mips_timer_ack = c0_timer_ack;
519-
/* Calculate cache parameters. */
520-
cycles_per_jiffy =
521-
(mips_hpt_frequency + HZ / 2) / HZ;
522-
}
523506
}
524507
if (!mips_hpt_frequency)
525508
mips_hpt_frequency = calibrate_hpt();
@@ -534,10 +517,6 @@ void __init time_init(void)
534517
#endif
535518
}
536519

537-
if (!mips_timer_ack)
538-
/* No timer interrupt ack (e.g. i8254). */
539-
mips_timer_ack = null_timer_ack;
540-
541520
/*
542521
* Call board specific timer interrupt setup.
543522
*

‎include/asm-mips/time.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ extern int rtc_mips_set_mmss(unsigned long);
4040
* mips_timer_ack may be NULL if the interrupt is self-recoverable.
4141
*/
4242
extern int (*mips_timer_state)(void);
43-
extern void (*mips_timer_ack)(void);
4443

4544
/*
4645
* High precision timer clocksource.

0 commit comments

Comments
 (0)