diff options
Diffstat (limited to 'arch/m68k/kernel')
-rw-r--r-- | arch/m68k/kernel/entry.S | 2 | ||||
-rw-r--r-- | arch/m68k/kernel/process.c | 6 | ||||
-rw-r--r-- | arch/m68k/kernel/sys_m68k.c | 1 | ||||
-rw-r--r-- | arch/m68k/kernel/time.c | 70 |
4 files changed, 6 insertions, 73 deletions
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/process.c b/arch/m68k/kernel/process.c index 72bad65dba3a..41230c595a8e 100644 --- a/arch/m68k/kernel/process.c +++ b/arch/m68k/kernel/process.c | |||
@@ -42,9 +42,9 @@ | |||
42 | */ | 42 | */ |
43 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 43 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
44 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 44 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
45 | union thread_union init_thread_union | 45 | union thread_union init_thread_union __init_task_data |
46 | __attribute__((section(".data.init_task"), aligned(THREAD_SIZE))) | 46 | __attribute__((aligned(THREAD_SIZE))) = |
47 | = { INIT_THREAD_INFO(init_task) }; | 47 | { INIT_THREAD_INFO(init_task) }; |
48 | 48 | ||
49 | /* initial task structure */ | 49 | /* initial task structure */ |
50 | struct task_struct init_task = INIT_TASK(init_task); | 50 | struct task_struct init_task = INIT_TASK(init_task); |
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c index 7f54efaf60bb..7deb402bfc75 100644 --- a/arch/m68k/kernel/sys_m68k.c +++ b/arch/m68k/kernel/sys_m68k.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/syscalls.h> | 20 | #include <linux/syscalls.h> |
21 | #include <linux/mman.h> | 21 | #include <linux/mman.h> |
22 | #include <linux/file.h> | 22 | #include <linux/file.h> |
23 | #include <linux/utsname.h> | ||
24 | #include <linux/ipc.h> | 23 | #include <linux/ipc.h> |
25 | 24 | ||
26 | #include <asm/setup.h> | 25 | #include <asm/setup.h> |
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; |