diff options
author | Glenn <gelliott@bonham.cs.unc.edu> | 2010-11-16 15:41:21 -0500 |
---|---|---|
committer | Glenn <gelliott@bonham.cs.unc.edu> | 2010-11-16 15:41:21 -0500 |
commit | 1b9caf2f95c97e27c91372bd41f79d3e96a99e62 (patch) | |
tree | a02ed0f31998ede99372964549e00216f0733e57 /arch | |
parent | 9a4b9c5c9b2af2f69e7eb6d69893a767701b781b (diff) | |
parent | 1726017e944d0086f14f867befbf5ebf07adc7dd (diff) |
Merge branch 'wip-merge-2.6.36' of ssh://cvs.cs.unc.edu/cvs/proj/litmus/repo/litmus2010 into wip-merge-2.6.36
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/include/asm/timex.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/unistd.h | 3 | ||||
-rw-r--r-- | arch/arm/kernel/calls.S | 14 | ||||
-rw-r--r-- | arch/arm/kernel/smp.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-realview/include/mach/timex.h | 27 | ||||
-rw-r--r-- | arch/x86/kernel/smp.c | 9 |
7 files changed, 62 insertions, 5 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9c26ba7244fb..babad6d7681a 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1808,3 +1808,11 @@ source "security/Kconfig" | |||
1808 | source "crypto/Kconfig" | 1808 | source "crypto/Kconfig" |
1809 | 1809 | ||
1810 | source "lib/Kconfig" | 1810 | source "lib/Kconfig" |
1811 | |||
1812 | config ARCH_HAS_SEND_PULL_TIMERS | ||
1813 | def_bool n | ||
1814 | |||
1815 | config ARCH_HAS_FEATHER_TRACE | ||
1816 | def_bool n | ||
1817 | |||
1818 | source "litmus/Kconfig" | ||
diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h index 3be8de3adaba..8a102a383a36 100644 --- a/arch/arm/include/asm/timex.h +++ b/arch/arm/include/asm/timex.h | |||
@@ -16,9 +16,11 @@ | |||
16 | 16 | ||
17 | typedef unsigned long cycles_t; | 17 | typedef unsigned long cycles_t; |
18 | 18 | ||
19 | #ifndef get_cycles | ||
19 | static inline cycles_t get_cycles (void) | 20 | static inline cycles_t get_cycles (void) |
20 | { | 21 | { |
21 | return 0; | 22 | return 0; |
22 | } | 23 | } |
24 | #endif | ||
23 | 25 | ||
24 | #endif | 26 | #endif |
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index c891eb76c0e3..625b30490624 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -397,6 +397,9 @@ | |||
397 | #define __NR_fanotify_mark (__NR_SYSCALL_BASE+368) | 397 | #define __NR_fanotify_mark (__NR_SYSCALL_BASE+368) |
398 | #define __NR_prlimit64 (__NR_SYSCALL_BASE+369) | 398 | #define __NR_prlimit64 (__NR_SYSCALL_BASE+369) |
399 | 399 | ||
400 | #define __NR_LITMUS (__NR_SYSCALL_BASE+370) | ||
401 | #include <litmus/unistd_32.h> | ||
402 | |||
400 | /* | 403 | /* |
401 | * The following SWIs are ARM private. | 404 | * The following SWIs are ARM private. |
402 | */ | 405 | */ |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 5c26eccef998..584a68349a41 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -379,6 +379,20 @@ | |||
379 | CALL(sys_fanotify_init) | 379 | CALL(sys_fanotify_init) |
380 | CALL(sys_fanotify_mark) | 380 | CALL(sys_fanotify_mark) |
381 | CALL(sys_prlimit64) | 381 | CALL(sys_prlimit64) |
382 | /* 370 */ CALL(sys_set_rt_task_param) | ||
383 | CALL(sys_get_rt_task_param) | ||
384 | CALL(sys_complete_job) | ||
385 | CALL(sys_od_open) | ||
386 | CALL(sys_od_close) | ||
387 | /* 375 */ CALL(sys_fmlp_down) | ||
388 | CALL(sys_fmlp_up) | ||
389 | CALL(sys_srp_down) | ||
390 | CALL(sys_srp_up) | ||
391 | CALL(sys_query_job_no) | ||
392 | /* 380 */ CALL(sys_wait_for_job_release) | ||
393 | CALL(sys_wait_for_ts_release) | ||
394 | CALL(sys_release_ts) | ||
395 | CALL(sys_null_call) | ||
382 | #ifndef syscalls_counted | 396 | #ifndef syscalls_counted |
383 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls | 397 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls |
384 | #define syscalls_counted | 398 | #define syscalls_counted |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 40dc74f2b27f..b72fbf3d043c 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -38,6 +38,8 @@ | |||
38 | #include <asm/localtimer.h> | 38 | #include <asm/localtimer.h> |
39 | #include <asm/smp_plat.h> | 39 | #include <asm/smp_plat.h> |
40 | 40 | ||
41 | #include <litmus/preempt.h> | ||
42 | |||
41 | /* | 43 | /* |
42 | * as from 2.5, kernels no longer have an init_tasks structure | 44 | * as from 2.5, kernels no longer have an init_tasks structure |
43 | * so we need some other way of telling a new secondary core | 45 | * so we need some other way of telling a new secondary core |
@@ -533,6 +535,8 @@ asmlinkage void __exception do_IPI(struct pt_regs *regs) | |||
533 | * nothing more to do - eveything is | 535 | * nothing more to do - eveything is |
534 | * done on the interrupt return path | 536 | * done on the interrupt return path |
535 | */ | 537 | */ |
538 | /* LITMUS^RT: take action based on scheduler state */ | ||
539 | sched_state_ipi(); | ||
536 | break; | 540 | break; |
537 | 541 | ||
538 | case IPI_CALL_FUNC: | 542 | case IPI_CALL_FUNC: |
diff --git a/arch/arm/mach-realview/include/mach/timex.h b/arch/arm/mach-realview/include/mach/timex.h index 4eeb069373c2..e8bcc40d1f08 100644 --- a/arch/arm/mach-realview/include/mach/timex.h +++ b/arch/arm/mach-realview/include/mach/timex.h | |||
@@ -21,3 +21,30 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #define CLOCK_TICK_RATE (50000000 / 16) | 23 | #define CLOCK_TICK_RATE (50000000 / 16) |
24 | |||
25 | #if defined(CONFIG_MACH_REALVIEW_PB11MP) || defined(CONFIG_MACH_REALVIEW_PB1176) | ||
26 | |||
27 | static inline unsigned long realview_get_arm11_cp15_ccnt(void) | ||
28 | { | ||
29 | unsigned long cycles; | ||
30 | /* Read CP15 CCNT register. */ | ||
31 | asm volatile ("mrc p15, 0, %0, c15, c12, 1" : "=r" (cycles)); | ||
32 | return cycles; | ||
33 | } | ||
34 | |||
35 | #define get_cycles realview_get_arm11_cp15_ccnt | ||
36 | |||
37 | #elif defined(CONFIG_MACH_REALVIEW_PBA8) | ||
38 | |||
39 | |||
40 | static inline unsigned long realview_get_a8_cp15_ccnt(void) | ||
41 | { | ||
42 | unsigned long cycles; | ||
43 | /* Read CP15 CCNT register. */ | ||
44 | asm volatile ("mrc p15, 0, %0, c9, c13, 0" : "=r" (cycles)); | ||
45 | return cycles; | ||
46 | } | ||
47 | |||
48 | #define get_cycles realview_get_a8_cp15_ccnt | ||
49 | |||
50 | #endif | ||
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 97af589a5c0c..74cca6014c0e 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -23,7 +23,8 @@ | |||
23 | #include <linux/cpu.h> | 23 | #include <linux/cpu.h> |
24 | #include <linux/gfp.h> | 24 | #include <linux/gfp.h> |
25 | 25 | ||
26 | #include <litmus/litmus.h> | 26 | #include <litmus/preempt.h> |
27 | #include <litmus/debug_trace.h> | ||
27 | #include <litmus/trace.h> | 28 | #include <litmus/trace.h> |
28 | 29 | ||
29 | #include <asm/mtrr.h> | 30 | #include <asm/mtrr.h> |
@@ -212,10 +213,8 @@ static void native_smp_send_stop(void) | |||
212 | void smp_reschedule_interrupt(struct pt_regs *regs) | 213 | void smp_reschedule_interrupt(struct pt_regs *regs) |
213 | { | 214 | { |
214 | ack_APIC_irq(); | 215 | ack_APIC_irq(); |
215 | /* LITMUS^RT needs this interrupt to proper reschedule | 216 | /* LITMUS^RT: this IPI might need to trigger the sched state machine. */ |
216 | * on this cpu | 217 | sched_state_ipi(); |
217 | */ | ||
218 | set_tsk_need_resched(current); | ||
219 | inc_irq_stat(irq_resched_count); | 218 | inc_irq_stat(irq_resched_count); |
220 | TS_SEND_RESCHED_END; | 219 | TS_SEND_RESCHED_END; |
221 | /* | 220 | /* |