diff options
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/Kconfig | 6 | ||||
-rw-r--r-- | arch/m68k/include/asm/hardirq_mm.h | 12 | ||||
-rw-r--r-- | arch/m68k/include/asm/mman.h | 18 | ||||
-rw-r--r-- | arch/m68k/include/asm/unistd.h | 2 | ||||
-rw-r--r-- | arch/m68k/kernel/entry.S | 2 | ||||
-rw-r--r-- | arch/m68k/kernel/time.c | 70 | ||||
-rw-r--r-- | arch/m68k/mm/init.c | 2 |
7 files changed, 14 insertions, 98 deletions
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig index fb87c08c6b57..29dd8489ffec 100644 --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig | |||
@@ -58,6 +58,12 @@ config HZ | |||
58 | int | 58 | int |
59 | default 100 | 59 | default 100 |
60 | 60 | ||
61 | config GENERIC_TIME | ||
62 | def_bool y | ||
63 | |||
64 | config ARCH_USES_GETTIMEOFFSET | ||
65 | def_bool y | ||
66 | |||
61 | mainmenu "Linux/68k Kernel Configuration" | 67 | mainmenu "Linux/68k Kernel Configuration" |
62 | 68 | ||
63 | source "init/Kconfig" | 69 | source "init/Kconfig" |
diff --git a/arch/m68k/include/asm/hardirq_mm.h b/arch/m68k/include/asm/hardirq_mm.h index 394ee946015c..554f65b6cd3b 100644 --- a/arch/m68k/include/asm/hardirq_mm.h +++ b/arch/m68k/include/asm/hardirq_mm.h | |||
@@ -1,16 +1,8 @@ | |||
1 | #ifndef __M68K_HARDIRQ_H | 1 | #ifndef __M68K_HARDIRQ_H |
2 | #define __M68K_HARDIRQ_H | 2 | #define __M68K_HARDIRQ_H |
3 | 3 | ||
4 | #include <linux/threads.h> | ||
5 | #include <linux/cache.h> | ||
6 | |||
7 | /* entry.S is sensitive to the offsets of these fields */ | ||
8 | typedef struct { | ||
9 | unsigned int __softirq_pending; | ||
10 | } ____cacheline_aligned irq_cpustat_t; | ||
11 | |||
12 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | ||
13 | |||
14 | #define HARDIRQ_BITS 8 | 4 | #define HARDIRQ_BITS 8 |
15 | 5 | ||
6 | #include <asm-generic/hardirq.h> | ||
7 | |||
16 | #endif | 8 | #endif |
diff --git a/arch/m68k/include/asm/mman.h b/arch/m68k/include/asm/mman.h index 9f5c4c4b3c7b..8eebf89f5ab1 100644 --- a/arch/m68k/include/asm/mman.h +++ b/arch/m68k/include/asm/mman.h | |||
@@ -1,17 +1 @@ | |||
1 | #ifndef __M68K_MMAN_H__ | #include <asm-generic/mman.h> | |
2 | #define __M68K_MMAN_H__ | ||
3 | |||
4 | #include <asm-generic/mman-common.h> | ||
5 | |||
6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | ||
7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
8 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
9 | #define MAP_LOCKED 0x2000 /* pages are locked */ | ||
10 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | ||
11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
13 | |||
14 | #define MCL_CURRENT 1 /* lock all current mappings */ | ||
15 | #define MCL_FUTURE 2 /* lock all future mappings */ | ||
16 | |||
17 | #endif /* __M68K_MMAN_H__ */ | ||
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 946d8691f2b0..48b87f5ced50 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h | |||
@@ -335,7 +335,7 @@ | |||
335 | #define __NR_preadv 329 | 335 | #define __NR_preadv 329 |
336 | #define __NR_pwritev 330 | 336 | #define __NR_pwritev 330 |
337 | #define __NR_rt_tgsigqueueinfo 331 | 337 | #define __NR_rt_tgsigqueueinfo 331 |
338 | #define __NR_perf_counter_open 332 | 338 | #define __NR_perf_event_open 332 |
339 | 339 | ||
340 | #ifdef __KERNEL__ | 340 | #ifdef __KERNEL__ |
341 | 341 | ||
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index 922f52e7ed1a..c5b33634c980 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S | |||
@@ -756,5 +756,5 @@ sys_call_table: | |||
756 | .long sys_preadv | 756 | .long sys_preadv |
757 | .long sys_pwritev /* 330 */ | 757 | .long sys_pwritev /* 330 */ |
758 | .long sys_rt_tgsigqueueinfo | 758 | .long sys_rt_tgsigqueueinfo |
759 | .long sys_perf_counter_open | 759 | .long sys_perf_event_open |
760 | 760 | ||
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c index 54d980795fc4..17dc2a31a7ca 100644 --- a/arch/m68k/kernel/time.c +++ b/arch/m68k/kernel/time.c | |||
@@ -91,77 +91,11 @@ void __init time_init(void) | |||
91 | mach_sched_init(timer_interrupt); | 91 | mach_sched_init(timer_interrupt); |
92 | } | 92 | } |
93 | 93 | ||
94 | /* | 94 | u32 arch_gettimeoffset(void) |
95 | * This version of gettimeofday has near microsecond resolution. | ||
96 | */ | ||
97 | void do_gettimeofday(struct timeval *tv) | ||
98 | { | 95 | { |
99 | unsigned long flags; | 96 | return mach_gettimeoffset() * 1000; |
100 | unsigned long seq; | ||
101 | unsigned long usec, sec; | ||
102 | unsigned long max_ntp_tick = tick_usec - tickadj; | ||
103 | |||
104 | do { | ||
105 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | ||
106 | |||
107 | usec = mach_gettimeoffset(); | ||
108 | |||
109 | /* | ||
110 | * If time_adjust is negative then NTP is slowing the clock | ||
111 | * so make sure not to go into next possible interval. | ||
112 | * Better to lose some accuracy than have time go backwards.. | ||
113 | */ | ||
114 | if (unlikely(time_adjust < 0)) | ||
115 | usec = min(usec, max_ntp_tick); | ||
116 | |||
117 | sec = xtime.tv_sec; | ||
118 | usec += xtime.tv_nsec/1000; | ||
119 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); | ||
120 | |||
121 | |||
122 | while (usec >= 1000000) { | ||
123 | usec -= 1000000; | ||
124 | sec++; | ||
125 | } | ||
126 | |||
127 | tv->tv_sec = sec; | ||
128 | tv->tv_usec = usec; | ||
129 | } | ||
130 | |||
131 | EXPORT_SYMBOL(do_gettimeofday); | ||
132 | |||
133 | int do_settimeofday(struct timespec *tv) | ||
134 | { | ||
135 | time_t wtm_sec, sec = tv->tv_sec; | ||
136 | long wtm_nsec, nsec = tv->tv_nsec; | ||
137 | |||
138 | if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) | ||
139 | return -EINVAL; | ||
140 | |||
141 | write_seqlock_irq(&xtime_lock); | ||
142 | /* This is revolting. We need to set the xtime.tv_nsec | ||
143 | * correctly. However, the value in this location is | ||
144 | * is value at the last tick. | ||
145 | * Discover what correction gettimeofday | ||
146 | * would have done, and then undo it! | ||
147 | */ | ||
148 | nsec -= 1000 * mach_gettimeoffset(); | ||
149 | |||
150 | wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); | ||
151 | wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); | ||
152 | |||
153 | set_normalized_timespec(&xtime, sec, nsec); | ||
154 | set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); | ||
155 | |||
156 | ntp_clear(); | ||
157 | write_sequnlock_irq(&xtime_lock); | ||
158 | clock_was_set(); | ||
159 | return 0; | ||
160 | } | 97 | } |
161 | 98 | ||
162 | EXPORT_SYMBOL(do_settimeofday); | ||
163 | |||
164 | |||
165 | static int __init rtc_init(void) | 99 | static int __init rtc_init(void) |
166 | { | 100 | { |
167 | struct platform_device *pdev; | 101 | struct platform_device *pdev; |
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c index 0007b2adf3a3..774549accd2d 100644 --- a/arch/m68k/mm/init.c +++ b/arch/m68k/mm/init.c | |||
@@ -126,7 +126,7 @@ void __init mem_init(void) | |||
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | printk("Memory: %luk/%luk available (%dk kernel code, %dk data, %dk init)\n", | 128 | printk("Memory: %luk/%luk available (%dk kernel code, %dk data, %dk init)\n", |
129 | (unsigned long)nr_free_pages() << (PAGE_SHIFT-10), | 129 | nr_free_pages() << (PAGE_SHIFT-10), |
130 | totalram_pages << (PAGE_SHIFT-10), | 130 | totalram_pages << (PAGE_SHIFT-10), |
131 | codepages << (PAGE_SHIFT-10), | 131 | codepages << (PAGE_SHIFT-10), |
132 | datapages << (PAGE_SHIFT-10), | 132 | datapages << (PAGE_SHIFT-10), |