diff options
Diffstat (limited to 'arch/arm26')
-rw-r--r-- | arch/arm26/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/arm26/kernel/sys_arm.c | 4 | ||||
-rw-r--r-- | arch/arm26/kernel/time.c | 14 | ||||
-rw-r--r-- | arch/arm26/mm/fault.c | 4 |
4 files changed, 8 insertions, 16 deletions
diff --git a/arch/arm26/kernel/setup.c b/arch/arm26/kernel/setup.c index e7eb070f794f..466ddb54b44f 100644 --- a/arch/arm26/kernel/setup.c +++ b/arch/arm26/kernel/setup.c | |||
@@ -143,7 +143,7 @@ static void __init setup_processor(void) | |||
143 | 143 | ||
144 | dump_cpu_info(); | 144 | dump_cpu_info(); |
145 | 145 | ||
146 | sprintf(system_utsname.machine, "%s", list->arch_name); | 146 | sprintf(init_utsname()->machine, "%s", list->arch_name); |
147 | sprintf(elf_platform, "%s", list->elf_name); | 147 | sprintf(elf_platform, "%s", list->elf_name); |
148 | elf_hwcap = list->elf_hwcap; | 148 | elf_hwcap = list->elf_hwcap; |
149 | 149 | ||
diff --git a/arch/arm26/kernel/sys_arm.c b/arch/arm26/kernel/sys_arm.c index 85457897b8a9..dc05aba58baf 100644 --- a/arch/arm26/kernel/sys_arm.c +++ b/arch/arm26/kernel/sys_arm.c | |||
@@ -283,7 +283,7 @@ out: | |||
283 | } | 283 | } |
284 | 284 | ||
285 | /* FIXME - see if this is correct for arm26 */ | 285 | /* FIXME - see if this is correct for arm26 */ |
286 | long execve(const char *filename, char **argv, char **envp) | 286 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]) |
287 | { | 287 | { |
288 | struct pt_regs regs; | 288 | struct pt_regs regs; |
289 | int ret; | 289 | int ret; |
@@ -320,4 +320,4 @@ long execve(const char *filename, char **argv, char **envp) | |||
320 | return ret; | 320 | return ret; |
321 | } | 321 | } |
322 | 322 | ||
323 | EXPORT_SYMBOL(execve); | 323 | EXPORT_SYMBOL(kernel_execve); |
diff --git a/arch/arm26/kernel/time.c b/arch/arm26/kernel/time.c index db63d75d0715..1206469b2b86 100644 --- a/arch/arm26/kernel/time.c +++ b/arch/arm26/kernel/time.c | |||
@@ -33,8 +33,6 @@ | |||
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | #include <asm/ioc.h> | 34 | #include <asm/ioc.h> |
35 | 35 | ||
36 | extern unsigned long wall_jiffies; | ||
37 | |||
38 | /* this needs a better home */ | 36 | /* this needs a better home */ |
39 | DEFINE_SPINLOCK(rtc_lock); | 37 | DEFINE_SPINLOCK(rtc_lock); |
40 | 38 | ||
@@ -136,16 +134,11 @@ void do_gettimeofday(struct timeval *tv) | |||
136 | { | 134 | { |
137 | unsigned long flags; | 135 | unsigned long flags; |
138 | unsigned long seq; | 136 | unsigned long seq; |
139 | unsigned long usec, sec, lost; | 137 | unsigned long usec, sec; |
140 | 138 | ||
141 | do { | 139 | do { |
142 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | 140 | seq = read_seqbegin_irqsave(&xtime_lock, flags); |
143 | usec = gettimeoffset(); | 141 | usec = gettimeoffset(); |
144 | |||
145 | lost = jiffies - wall_jiffies; | ||
146 | if (lost) | ||
147 | usec += lost * USECS_PER_JIFFY; | ||
148 | |||
149 | sec = xtime.tv_sec; | 142 | sec = xtime.tv_sec; |
150 | usec += xtime.tv_nsec / 1000; | 143 | usec += xtime.tv_nsec / 1000; |
151 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); | 144 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); |
@@ -174,8 +167,7 @@ int do_settimeofday(struct timespec *tv) | |||
174 | * wall time. Discover what correction gettimeofday() would have | 167 | * wall time. Discover what correction gettimeofday() would have |
175 | * done, and then undo it! | 168 | * done, and then undo it! |
176 | */ | 169 | */ |
177 | tv->tv_nsec -= 1000 * (gettimeoffset() + | 170 | tv->tv_nsec -= 1000 * gettimeoffset(); |
178 | (jiffies - wall_jiffies) * USECS_PER_JIFFY); | ||
179 | 171 | ||
180 | while (tv->tv_nsec < 0) { | 172 | while (tv->tv_nsec < 0) { |
181 | tv->tv_nsec += NSEC_PER_SEC; | 173 | tv->tv_nsec += NSEC_PER_SEC; |
@@ -194,7 +186,7 @@ EXPORT_SYMBOL(do_settimeofday); | |||
194 | 186 | ||
195 | static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 187 | static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
196 | { | 188 | { |
197 | do_timer(regs); | 189 | do_timer(1); |
198 | #ifndef CONFIG_SMP | 190 | #ifndef CONFIG_SMP |
199 | update_process_times(user_mode(regs)); | 191 | update_process_times(user_mode(regs)); |
200 | #endif | 192 | #endif |
diff --git a/arch/arm26/mm/fault.c b/arch/arm26/mm/fault.c index 761938b56679..a1f6d8a9cc32 100644 --- a/arch/arm26/mm/fault.c +++ b/arch/arm26/mm/fault.c | |||
@@ -155,7 +155,7 @@ __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, | |||
155 | */ | 155 | */ |
156 | good_area: | 156 | good_area: |
157 | if (READ_FAULT(fsr)) /* read? */ | 157 | if (READ_FAULT(fsr)) /* read? */ |
158 | mask = VM_READ|VM_EXEC; | 158 | mask = VM_READ|VM_EXEC|VM_WRITE; |
159 | else | 159 | else |
160 | mask = VM_WRITE; | 160 | mask = VM_WRITE; |
161 | 161 | ||
@@ -185,7 +185,7 @@ survive: | |||
185 | } | 185 | } |
186 | 186 | ||
187 | fault = -3; /* out of memory */ | 187 | fault = -3; /* out of memory */ |
188 | if (tsk->pid != 1) | 188 | if (!is_init(tsk)) |
189 | goto out; | 189 | goto out; |
190 | 190 | ||
191 | /* | 191 | /* |