You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[MIPS] Fixup migration to GENERIC_TIME
Since we already moved to GENERIC_TIME, we should implement alternatives
of old do_gettimeoffset routines to get sub-jiffies resolution from
gettimeofday(). This patch includes:
* MIPS clocksource support (based on works by Manish Lachwani).
* remove unused gettimeoffset routines and related codes.
* remove unised 64bit do_div64_32().
* simplify mips_hpt_init. (no argument needed, __init tag)
* simplify c0_hpt_timer_init. (no need to write to c0_count)
* remove some hpt_init routines.
* mips_hpt_mask variable to specify bitmask of hpt value.
* convert jmr3927_do_gettimeoffset to jmr3927_hpt_read.
* convert ip27_do_gettimeoffset to ip27_hpt_read.
* convert bcm1480_do_gettimeoffset to bcm1480_hpt_read.
* simplify sb1250 hpt functions. (no need to subtract and shift)
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
committed by
Ralf Baechle
parent
70e46f48cb
commit
16b7b2ac01
@@ -82,27 +82,6 @@
|
||||
|
||||
#if (_MIPS_SZLONG == 64)
|
||||
|
||||
/*
|
||||
* Don't use this one in new code
|
||||
*/
|
||||
#define do_div64_32(res, high, low, base) ({ \
|
||||
unsigned int __quot, __mod; \
|
||||
unsigned long __div; \
|
||||
unsigned int __low, __high, __base; \
|
||||
\
|
||||
__high = (high); \
|
||||
__low = (low); \
|
||||
__div = __high; \
|
||||
__div = __div << 32 | __low; \
|
||||
__base = (base); \
|
||||
\
|
||||
__mod = __div % __base; \
|
||||
__div = __div / __base; \
|
||||
\
|
||||
__quot = __div; \
|
||||
(res) = __quot; \
|
||||
__mod; })
|
||||
|
||||
/*
|
||||
* Hey, we're already 64-bit, no
|
||||
* need to play games..
|
||||
|
||||
@@ -51,8 +51,8 @@ extern void sb1250_mask_irq(int cpu, int irq);
|
||||
extern void sb1250_unmask_irq(int cpu, int irq);
|
||||
extern void sb1250_smp_finish(void);
|
||||
|
||||
extern void bcm1480_hpt_setup(void);
|
||||
extern void bcm1480_time_init(void);
|
||||
extern unsigned long bcm1480_gettimeoffset(void);
|
||||
extern void bcm1480_mask_irq(int cpu, int irq);
|
||||
extern void bcm1480_unmask_irq(int cpu, int irq);
|
||||
extern void bcm1480_smp_finish(void);
|
||||
|
||||
@@ -48,7 +48,8 @@ extern void (*mips_timer_ack)(void);
|
||||
* If mips_hpt_read is NULL, an R4k-compatible timer setup is attempted.
|
||||
*/
|
||||
extern unsigned int (*mips_hpt_read)(void);
|
||||
extern void (*mips_hpt_init)(unsigned int);
|
||||
extern void (*mips_hpt_init)(void);
|
||||
extern unsigned int mips_hpt_mask;
|
||||
|
||||
/*
|
||||
* to_tm() converts system time back to (year, mon, day, hour, min, sec).
|
||||
@@ -57,13 +58,6 @@ extern void (*mips_hpt_init)(unsigned int);
|
||||
*/
|
||||
extern void to_tm(unsigned long tim, struct rtc_time *tm);
|
||||
|
||||
/*
|
||||
* do_gettimeoffset(). By default, this func pointer points to
|
||||
* do_null_gettimeoffset(), which leads to the same resolution as HZ.
|
||||
* Higher resolution versions are available, which give ~1us resolution.
|
||||
*/
|
||||
extern unsigned long (*do_gettimeoffset)(void);
|
||||
|
||||
/*
|
||||
* high-level timer interrupt routines.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user