diff options
author | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
commit | bac30d1a78d0f11c613968fc8b351a91ed465386 (patch) | |
tree | e52f3c876522a2f6047a6ec1c27df2e8a79486b8 /arch/mips/kernel | |
parent | e8222502ee6157e2713da9e0792c21f4ad458d50 (diff) | |
parent | ca9ba4471c1203bb6e759b76e83167fec54fe590 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/setup.c | 9 | ||||
-rw-r--r-- | arch/mips/kernel/time.c | 22 |
2 files changed, 12 insertions, 19 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 0cb3b6097e0e..dcbfd27071f0 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/highmem.h> | 34 | #include <linux/highmem.h> |
35 | #include <linux/console.h> | 35 | #include <linux/console.h> |
36 | #include <linux/mmzone.h> | 36 | #include <linux/mmzone.h> |
37 | #include <linux/pfn.h> | ||
37 | 38 | ||
38 | #include <asm/addrspace.h> | 39 | #include <asm/addrspace.h> |
39 | #include <asm/bootinfo.h> | 40 | #include <asm/bootinfo.h> |
@@ -257,10 +258,6 @@ static inline int parse_rd_cmdline(unsigned long* rd_start, unsigned long* rd_en | |||
257 | return 0; | 258 | return 0; |
258 | } | 259 | } |
259 | 260 | ||
260 | #define PFN_UP(x) (((x) + PAGE_SIZE - 1) >> PAGE_SHIFT) | ||
261 | #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) | ||
262 | #define PFN_PHYS(x) ((x) << PAGE_SHIFT) | ||
263 | |||
264 | #define MAXMEM HIGHMEM_START | 261 | #define MAXMEM HIGHMEM_START |
265 | #define MAXMEM_PFN PFN_DOWN(MAXMEM) | 262 | #define MAXMEM_PFN PFN_DOWN(MAXMEM) |
266 | 263 | ||
@@ -493,10 +490,6 @@ static inline void resource_init(void) | |||
493 | } | 490 | } |
494 | } | 491 | } |
495 | 492 | ||
496 | #undef PFN_UP | ||
497 | #undef PFN_DOWN | ||
498 | #undef PFN_PHYS | ||
499 | |||
500 | #undef MAXMEM | 493 | #undef MAXMEM |
501 | #undef MAXMEM_PFN | 494 | #undef MAXMEM_PFN |
502 | 495 | ||
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 51273b7297a7..5e51a2d8f3f0 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -65,9 +65,9 @@ static int null_rtc_set_time(unsigned long sec) | |||
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | 67 | ||
68 | unsigned long (*rtc_get_time)(void) = null_rtc_get_time; | 68 | unsigned long (*rtc_mips_get_time)(void) = null_rtc_get_time; |
69 | int (*rtc_set_time)(unsigned long) = null_rtc_set_time; | 69 | int (*rtc_mips_set_time)(unsigned long) = null_rtc_set_time; |
70 | int (*rtc_set_mmss)(unsigned long); | 70 | int (*rtc_mips_set_mmss)(unsigned long); |
71 | 71 | ||
72 | 72 | ||
73 | /* usecs per counter cycle, shifted to left by 32 bits */ | 73 | /* usecs per counter cycle, shifted to left by 32 bits */ |
@@ -440,14 +440,14 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
440 | 440 | ||
441 | /* | 441 | /* |
442 | * If we have an externally synchronized Linux clock, then update | 442 | * If we have an externally synchronized Linux clock, then update |
443 | * CMOS clock accordingly every ~11 minutes. rtc_set_time() has to be | 443 | * CMOS clock accordingly every ~11 minutes. rtc_mips_set_time() has to be |
444 | * called as close as possible to 500 ms before the new second starts. | 444 | * called as close as possible to 500 ms before the new second starts. |
445 | */ | 445 | */ |
446 | if (ntp_synced() && | 446 | if (ntp_synced() && |
447 | xtime.tv_sec > last_rtc_update + 660 && | 447 | xtime.tv_sec > last_rtc_update + 660 && |
448 | (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && | 448 | (xtime.tv_nsec / 1000) >= 500000 - ((unsigned) TICK_SIZE) / 2 && |
449 | (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) { | 449 | (xtime.tv_nsec / 1000) <= 500000 + ((unsigned) TICK_SIZE) / 2) { |
450 | if (rtc_set_mmss(xtime.tv_sec) == 0) { | 450 | if (rtc_mips_set_mmss(xtime.tv_sec) == 0) { |
451 | last_rtc_update = xtime.tv_sec; | 451 | last_rtc_update = xtime.tv_sec; |
452 | } else { | 452 | } else { |
453 | /* do it again in 60 s */ | 453 | /* do it again in 60 s */ |
@@ -565,7 +565,7 @@ asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs) | |||
565 | * b) (optional) calibrate and set the mips_hpt_frequency | 565 | * b) (optional) calibrate and set the mips_hpt_frequency |
566 | * (only needed if you intended to use fixed_rate_gettimeoffset | 566 | * (only needed if you intended to use fixed_rate_gettimeoffset |
567 | * or use cpu counter as timer interrupt source) | 567 | * or use cpu counter as timer interrupt source) |
568 | * 2) setup xtime based on rtc_get_time(). | 568 | * 2) setup xtime based on rtc_mips_get_time(). |
569 | * 3) choose a appropriate gettimeoffset routine. | 569 | * 3) choose a appropriate gettimeoffset routine. |
570 | * 4) calculate a couple of cached variables for later usage | 570 | * 4) calculate a couple of cached variables for later usage |
571 | * 5) board_timer_setup() - | 571 | * 5) board_timer_setup() - |
@@ -633,10 +633,10 @@ void __init time_init(void) | |||
633 | if (board_time_init) | 633 | if (board_time_init) |
634 | board_time_init(); | 634 | board_time_init(); |
635 | 635 | ||
636 | if (!rtc_set_mmss) | 636 | if (!rtc_mips_set_mmss) |
637 | rtc_set_mmss = rtc_set_time; | 637 | rtc_mips_set_mmss = rtc_mips_set_time; |
638 | 638 | ||
639 | xtime.tv_sec = rtc_get_time(); | 639 | xtime.tv_sec = rtc_mips_get_time(); |
640 | xtime.tv_nsec = 0; | 640 | xtime.tv_nsec = 0; |
641 | 641 | ||
642 | set_normalized_timespec(&wall_to_monotonic, | 642 | set_normalized_timespec(&wall_to_monotonic, |
@@ -772,8 +772,8 @@ void to_tm(unsigned long tim, struct rtc_time *tm) | |||
772 | 772 | ||
773 | EXPORT_SYMBOL(rtc_lock); | 773 | EXPORT_SYMBOL(rtc_lock); |
774 | EXPORT_SYMBOL(to_tm); | 774 | EXPORT_SYMBOL(to_tm); |
775 | EXPORT_SYMBOL(rtc_set_time); | 775 | EXPORT_SYMBOL(rtc_mips_set_time); |
776 | EXPORT_SYMBOL(rtc_get_time); | 776 | EXPORT_SYMBOL(rtc_mips_get_time); |
777 | 777 | ||
778 | unsigned long long sched_clock(void) | 778 | unsigned long long sched_clock(void) |
779 | { | 779 | { |