diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-pxa/ssp.c | 2 | ||||
-rw-r--r-- | arch/m68knommu/platform/coldfire/timers.c | 8 | ||||
-rw-r--r-- | arch/um/os-Linux/start_up.c | 25 | ||||
-rw-r--r-- | arch/um/os-Linux/sys-i386/registers.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/rtc.c | 34 |
5 files changed, 60 insertions, 13 deletions
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c index 00af7f2fed66..0bb31982fb6f 100644 --- a/arch/arm/mach-pxa/ssp.c +++ b/arch/arm/mach-pxa/ssp.c | |||
@@ -330,7 +330,7 @@ struct ssp_device *ssp_request(int port, const char *label) | |||
330 | 330 | ||
331 | mutex_unlock(&ssp_lock); | 331 | mutex_unlock(&ssp_lock); |
332 | 332 | ||
333 | if (ssp->port_id != port) | 333 | if (&ssp->node == &ssp_list) |
334 | return NULL; | 334 | return NULL; |
335 | 335 | ||
336 | return ssp; | 336 | return ssp; |
diff --git a/arch/m68knommu/platform/coldfire/timers.c b/arch/m68knommu/platform/coldfire/timers.c index ba5a9f32ebd4..454f25493491 100644 --- a/arch/m68knommu/platform/coldfire/timers.c +++ b/arch/m68knommu/platform/coldfire/timers.c | |||
@@ -111,7 +111,13 @@ void hw_timer_init(void) | |||
111 | 111 | ||
112 | __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); | 112 | __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); |
113 | mcftmr_cycles_per_jiffy = FREQ / HZ; | 113 | mcftmr_cycles_per_jiffy = FREQ / HZ; |
114 | __raw_writetrr(mcftmr_cycles_per_jiffy, TA(MCFTIMER_TRR)); | 114 | /* |
115 | * The coldfire timer runs from 0 to TRR included, then 0 | ||
116 | * again and so on. It counts thus actually TRR + 1 steps | ||
117 | * for 1 tick, not TRR. So if you want n cycles, | ||
118 | * initialize TRR with n - 1. | ||
119 | */ | ||
120 | __raw_writetrr(mcftmr_cycles_per_jiffy - 1, TA(MCFTIMER_TRR)); | ||
115 | __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | | 121 | __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | |
116 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); | 122 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); |
117 | 123 | ||
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c index b4b36e0f2e89..183db26d01bf 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c | |||
@@ -121,8 +121,10 @@ static int stop_ptraced_child(int pid, int exitcode, int mustexit) | |||
121 | { | 121 | { |
122 | int status, n, ret = 0; | 122 | int status, n, ret = 0; |
123 | 123 | ||
124 | if (ptrace(PTRACE_CONT, pid, 0, 0) < 0) | 124 | if (ptrace(PTRACE_CONT, pid, 0, 0) < 0) { |
125 | fatal_perror("stop_ptraced_child : ptrace failed"); | 125 | perror("stop_ptraced_child : ptrace failed"); |
126 | return -1; | ||
127 | } | ||
126 | CATCH_EINTR(n = waitpid(pid, &status, 0)); | 128 | CATCH_EINTR(n = waitpid(pid, &status, 0)); |
127 | if (!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { | 129 | if (!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { |
128 | int exit_with = WEXITSTATUS(status); | 130 | int exit_with = WEXITSTATUS(status); |
@@ -212,7 +214,7 @@ static void __init check_sysemu(void) | |||
212 | if (n < 0) | 214 | if (n < 0) |
213 | fatal_perror("check_sysemu : wait failed"); | 215 | fatal_perror("check_sysemu : wait failed"); |
214 | if (!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) | 216 | if (!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) |
215 | fatal("check_sysemu : expected SIGTRAP, got status = %d", | 217 | fatal("check_sysemu : expected SIGTRAP, got status = %d\n", |
216 | status); | 218 | status); |
217 | 219 | ||
218 | if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) | 220 | if (ptrace(PTRACE_GETREGS, pid, 0, regs) < 0) |
@@ -254,9 +256,11 @@ static void __init check_sysemu(void) | |||
254 | 256 | ||
255 | if (WIFSTOPPED(status) && | 257 | if (WIFSTOPPED(status) && |
256 | (WSTOPSIG(status) == (SIGTRAP|0x80))) { | 258 | (WSTOPSIG(status) == (SIGTRAP|0x80))) { |
257 | if (!count) | 259 | if (!count) { |
258 | fatal("check_ptrace : SYSEMU_SINGLESTEP " | 260 | non_fatal("check_ptrace : SYSEMU_SINGLESTEP " |
259 | "doesn't singlestep"); | 261 | "doesn't singlestep"); |
262 | goto fail; | ||
263 | } | ||
260 | n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, | 264 | n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, |
261 | os_getpid()); | 265 | os_getpid()); |
262 | if (n < 0) | 266 | if (n < 0) |
@@ -266,9 +270,12 @@ static void __init check_sysemu(void) | |||
266 | } | 270 | } |
267 | else if (WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP)) | 271 | else if (WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP)) |
268 | count++; | 272 | count++; |
269 | else | 273 | else { |
270 | fatal("check_ptrace : expected SIGTRAP or " | 274 | non_fatal("check_ptrace : expected SIGTRAP or " |
271 | "(SIGTRAP | 0x80), got status = %d", status); | 275 | "(SIGTRAP | 0x80), got status = %d\n", |
276 | status); | ||
277 | goto fail; | ||
278 | } | ||
272 | } | 279 | } |
273 | if (stop_ptraced_child(pid, 0, 0) < 0) | 280 | if (stop_ptraced_child(pid, 0, 0) < 0) |
274 | goto fail_stopped; | 281 | goto fail_stopped; |
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c index b487cbead1bd..229f7a53d8da 100644 --- a/arch/um/os-Linux/sys-i386/registers.c +++ b/arch/um/os-Linux/sys-i386/registers.c | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | #include <errno.h> | 7 | #include <errno.h> |
8 | #include <sys/ptrace.h> | 8 | #include <sys/ptrace.h> |
9 | #include <asm/user.h> | 9 | #include <sys/user.h> |
10 | #include "kern_constants.h" | 10 | #include "kern_constants.h" |
11 | #include "longjmp.h" | 11 | #include "longjmp.h" |
12 | #include "user.h" | 12 | #include "user.h" |
@@ -76,7 +76,7 @@ int put_fp_registers(int pid, unsigned long *regs) | |||
76 | 76 | ||
77 | void arch_init_registers(int pid) | 77 | void arch_init_registers(int pid) |
78 | { | 78 | { |
79 | struct user_fxsr_struct fpx_regs; | 79 | struct user_fpxregs_struct fpx_regs; |
80 | int err; | 80 | int err; |
81 | 81 | ||
82 | err = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpx_regs); | 82 | err = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpx_regs); |
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index 9615eee9b775..05191bbc68b8 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c | |||
@@ -4,6 +4,8 @@ | |||
4 | #include <linux/acpi.h> | 4 | #include <linux/acpi.h> |
5 | #include <linux/bcd.h> | 5 | #include <linux/bcd.h> |
6 | #include <linux/mc146818rtc.h> | 6 | #include <linux/mc146818rtc.h> |
7 | #include <linux/platform_device.h> | ||
8 | #include <linux/pnp.h> | ||
7 | 9 | ||
8 | #include <asm/time.h> | 10 | #include <asm/time.h> |
9 | #include <asm/vsyscall.h> | 11 | #include <asm/vsyscall.h> |
@@ -197,3 +199,35 @@ unsigned long long native_read_tsc(void) | |||
197 | } | 199 | } |
198 | EXPORT_SYMBOL(native_read_tsc); | 200 | EXPORT_SYMBOL(native_read_tsc); |
199 | 201 | ||
202 | |||
203 | static struct resource rtc_resources[] = { | ||
204 | [0] = { | ||
205 | .start = RTC_PORT(0), | ||
206 | .end = RTC_PORT(1), | ||
207 | .flags = IORESOURCE_IO, | ||
208 | }, | ||
209 | [1] = { | ||
210 | .start = RTC_IRQ, | ||
211 | .end = RTC_IRQ, | ||
212 | .flags = IORESOURCE_IRQ, | ||
213 | } | ||
214 | }; | ||
215 | |||
216 | static struct platform_device rtc_device = { | ||
217 | .name = "rtc_cmos", | ||
218 | .id = -1, | ||
219 | .resource = rtc_resources, | ||
220 | .num_resources = ARRAY_SIZE(rtc_resources), | ||
221 | }; | ||
222 | |||
223 | static __init int add_rtc_cmos(void) | ||
224 | { | ||
225 | #ifdef CONFIG_PNP | ||
226 | if (!pnp_platform_devices) | ||
227 | platform_device_register(&rtc_device); | ||
228 | #else | ||
229 | platform_device_register(&rtc_device); | ||
230 | #endif /* CONFIG_PNP */ | ||
231 | return 0; | ||
232 | } | ||
233 | device_initcall(add_rtc_cmos); | ||