diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-04-19 17:31:52 -0400 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-04-19 17:31:52 -0400 |
| commit | f70a290e8a889caa905ab7650c696f2bb299be1a (patch) | |
| tree | 56f0886d839499e9f522f189999024b3e86f9be2 /arch | |
| parent | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (diff) | |
| parent | 7ef4a793a624c6e66c16ca1051847f75161f5bec (diff) | |
Merge branch 'wip-nested-locking' into tegra-nested-lockingwip-nested-locking
Conflicts:
Makefile
include/linux/fs.h
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/Kconfig | 8 | ||||
| -rw-r--r-- | arch/x86/include/asm/entry_arch.h | 1 | ||||
| -rw-r--r-- | arch/x86/include/asm/feather_trace.h | 17 | ||||
| -rw-r--r-- | arch/x86/include/asm/feather_trace_32.h | 115 | ||||
| -rw-r--r-- | arch/x86/include/asm/feather_trace_64.h | 124 | ||||
| -rw-r--r-- | arch/x86/include/asm/hw_irq.h | 3 | ||||
| -rw-r--r-- | arch/x86/include/asm/irq_vectors.h | 7 | ||||
| -rw-r--r-- | arch/x86/include/asm/processor.h | 4 | ||||
| -rw-r--r-- | arch/x86/include/asm/unistd_32.h | 6 | ||||
| -rw-r--r-- | arch/x86/include/asm/unistd_64.h | 4 | ||||
| -rw-r--r-- | arch/x86/kernel/Makefile | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/cpu/intel_cacheinfo.c | 17 | ||||
| -rw-r--r-- | arch/x86/kernel/entry_64.S | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/ft_event.c | 118 | ||||
| -rw-r--r-- | arch/x86/kernel/irqinit.c | 3 | ||||
| -rw-r--r-- | arch/x86/kernel/smp.c | 29 | ||||
| -rw-r--r-- | arch/x86/kernel/syscall_table_32.S | 14 |
23 files changed, 531 insertions, 1 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3c3b868948a..6dc9a2f42ab 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
| @@ -2214,3 +2214,11 @@ source "security/Kconfig" | |||
| 2214 | source "crypto/Kconfig" | 2214 | source "crypto/Kconfig" |
| 2215 | 2215 | ||
| 2216 | source "lib/Kconfig" | 2216 | source "lib/Kconfig" |
| 2217 | |||
| 2218 | config ARCH_HAS_SEND_PULL_TIMERS | ||
| 2219 | def_bool n | ||
| 2220 | |||
| 2221 | config ARCH_HAS_FEATHER_TRACE | ||
| 2222 | def_bool n | ||
| 2223 | |||
| 2224 | source "litmus/Kconfig" | ||
diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h index 3be8de3adab..8a102a383a3 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 c60a2944f95..23ae09ffc49 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
| @@ -403,6 +403,9 @@ | |||
| 403 | #define __NR_sendmmsg (__NR_SYSCALL_BASE+374) | 403 | #define __NR_sendmmsg (__NR_SYSCALL_BASE+374) |
| 404 | #define __NR_setns (__NR_SYSCALL_BASE+375) | 404 | #define __NR_setns (__NR_SYSCALL_BASE+375) |
| 405 | 405 | ||
| 406 | #define __NR_LITMUS (__NR_SYSCALL_BASE+376) | ||
| 407 | #include <litmus/unistd_32.h> | ||
| 408 | |||
| 406 | /* | 409 | /* |
| 407 | * The following SWIs are ARM private. | 410 | * The following SWIs are ARM private. |
| 408 | */ | 411 | */ |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 9943e9e74a1..c0de805e4ea 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
| @@ -385,6 +385,20 @@ | |||
| 385 | CALL(sys_syncfs) | 385 | CALL(sys_syncfs) |
| 386 | CALL(sys_sendmmsg) | 386 | CALL(sys_sendmmsg) |
| 387 | /* 375 */ CALL(sys_setns) | 387 | /* 375 */ CALL(sys_setns) |
| 388 | CALL(sys_set_rt_task_param) | ||
| 389 | CALL(sys_get_rt_task_param) | ||
| 390 | CALL(sys_complete_job) | ||
| 391 | CALL(sys_od_open) | ||
| 392 | /* 380 */ CALL(sys_od_close) | ||
| 393 | CALL(sys_litmus_lock) | ||
| 394 | CALL(sys_litmus_unlock) | ||
| 395 | CALL(sys_query_job_no) | ||
| 396 | CALL(sys_wait_for_job_release) | ||
| 397 | /* 385 */ CALL(sys_wait_for_ts_release) | ||
| 398 | CALL(sys_release_ts) | ||
| 399 | CALL(sys_null_call) | ||
| 400 | CALL(sys_dynamic_group_lock) | ||
| 401 | CALL(sys_dynamic_group_unlock) | ||
| 388 | #ifndef syscalls_counted | 402 | #ifndef syscalls_counted |
| 389 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls | 403 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls |
| 390 | #define syscalls_counted | 404 | #define syscalls_counted |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 14d06f50d16..a07ca050112 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
| @@ -40,6 +40,8 @@ | |||
| 40 | #include <asm/ptrace.h> | 40 | #include <asm/ptrace.h> |
| 41 | #include <asm/localtimer.h> | 41 | #include <asm/localtimer.h> |
| 42 | 42 | ||
| 43 | #include <litmus/preempt.h> | ||
| 44 | |||
| 43 | /* | 45 | /* |
| 44 | * as from 2.5, kernels no longer have an init_tasks structure | 46 | * as from 2.5, kernels no longer have an init_tasks structure |
| 45 | * so we need some other way of telling a new secondary core | 47 | * so we need some other way of telling a new secondary core |
| @@ -629,6 +631,8 @@ asmlinkage void __exception_irq_entry do_IPI(int ipinr, struct pt_regs *regs) | |||
| 629 | break; | 631 | break; |
| 630 | 632 | ||
| 631 | case IPI_RESCHEDULE: | 633 | case IPI_RESCHEDULE: |
| 634 | /* LITMUS^RT: take action based on scheduler state */ | ||
| 635 | sched_state_ipi(); | ||
| 632 | scheduler_ipi(); | 636 | scheduler_ipi(); |
| 633 | break; | 637 | break; |
| 634 | 638 | ||
diff --git a/arch/arm/mach-realview/include/mach/timex.h b/arch/arm/mach-realview/include/mach/timex.h index 4eeb069373c..e8bcc40d1f0 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/Kconfig b/arch/x86/Kconfig index b8cd5448b0e..4ff921c9f84 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
| @@ -2151,3 +2151,11 @@ source "crypto/Kconfig" | |||
| 2151 | source "arch/x86/kvm/Kconfig" | 2151 | source "arch/x86/kvm/Kconfig" |
| 2152 | 2152 | ||
| 2153 | source "lib/Kconfig" | 2153 | source "lib/Kconfig" |
| 2154 | |||
| 2155 | config ARCH_HAS_FEATHER_TRACE | ||
| 2156 | def_bool y | ||
| 2157 | |||
| 2158 | config ARCH_HAS_SEND_PULL_TIMERS | ||
| 2159 | def_bool y | ||
| 2160 | |||
| 2161 | source "litmus/Kconfig" | ||
diff --git a/arch/x86/include/asm/entry_arch.h b/arch/x86/include/asm/entry_arch.h index 0baa628e330..e2c555f2191 100644 --- a/arch/x86/include/asm/entry_arch.h +++ b/arch/x86/include/asm/entry_arch.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | BUILD_INTERRUPT(reschedule_interrupt,RESCHEDULE_VECTOR) | 13 | BUILD_INTERRUPT(reschedule_interrupt,RESCHEDULE_VECTOR) |
| 14 | BUILD_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR) | 14 | BUILD_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR) |
| 15 | BUILD_INTERRUPT(call_function_single_interrupt,CALL_FUNCTION_SINGLE_VECTOR) | 15 | BUILD_INTERRUPT(call_function_single_interrupt,CALL_FUNCTION_SINGLE_VECTOR) |
| 16 | BUILD_INTERRUPT(pull_timers_interrupt,PULL_TIMERS_VECTOR) | ||
| 16 | BUILD_INTERRUPT(irq_move_cleanup_interrupt,IRQ_MOVE_CLEANUP_VECTOR) | 17 | BUILD_INTERRUPT(irq_move_cleanup_interrupt,IRQ_MOVE_CLEANUP_VECTOR) |
| 17 | BUILD_INTERRUPT(reboot_interrupt,REBOOT_VECTOR) | 18 | BUILD_INTERRUPT(reboot_interrupt,REBOOT_VECTOR) |
| 18 | 19 | ||
diff --git a/arch/x86/include/asm/feather_trace.h b/arch/x86/include/asm/feather_trace.h new file mode 100644 index 00000000000..4fd31633405 --- /dev/null +++ b/arch/x86/include/asm/feather_trace.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #ifndef _ARCH_FEATHER_TRACE_H | ||
| 2 | #define _ARCH_FEATHER_TRACE_H | ||
| 3 | |||
| 4 | #include <asm/msr.h> | ||
| 5 | |||
| 6 | static inline unsigned long long ft_timestamp(void) | ||
| 7 | { | ||
| 8 | return __native_read_tsc(); | ||
| 9 | } | ||
| 10 | |||
| 11 | #ifdef CONFIG_X86_32 | ||
| 12 | #include "feather_trace_32.h" | ||
| 13 | #else | ||
| 14 | #include "feather_trace_64.h" | ||
| 15 | #endif | ||
| 16 | |||
| 17 | #endif | ||
diff --git a/arch/x86/include/asm/feather_trace_32.h b/arch/x86/include/asm/feather_trace_32.h new file mode 100644 index 00000000000..75e81a9f938 --- /dev/null +++ b/arch/x86/include/asm/feather_trace_32.h | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | /* Copyright (c) 2007-2012 Björn Brandenburg, <bbb@mpi-sws.org> | ||
| 2 | * | ||
| 3 | * Permission is hereby granted, free of charge, to any person obtaining | ||
| 4 | * a copy of this software and associated documentation files (the | ||
| 5 | * "Software"), to deal in the Software without restriction, including | ||
| 6 | * without limitation the rights to use, copy, modify, merge, publish, | ||
| 7 | * distribute, sublicense, and/or sell copies of the Software, and to | ||
| 8 | * permit persons to whom the Software is furnished to do so, subject to | ||
| 9 | * the following conditions: | ||
| 10 | * | ||
| 11 | * The above copyright notice and this permission notice shall be | ||
| 12 | * included in all copies or substantial portions of the Software. | ||
| 13 | * | ||
| 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 15 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 18 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 19 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 20 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 21 | * SOFTWARE. | ||
| 22 | */ | ||
| 23 | |||
| 24 | /* Do not directly include this file. Include feather_trace.h instead */ | ||
| 25 | |||
| 26 | #define feather_callback __attribute__((regparm(3))) __attribute__((used)) | ||
| 27 | |||
| 28 | /* | ||
| 29 | * Make the compiler reload any register that is not saved in a cdecl function | ||
| 30 | * call (minus the registers that we explicitly clobber as output registers). | ||
| 31 | */ | ||
| 32 | #define __FT_CLOBBER_LIST0 "memory", "cc", "eax", "edx", "ecx" | ||
| 33 | #define __FT_CLOBBER_LIST1 "memory", "cc", "eax", "ecx" | ||
| 34 | #define __FT_CLOBBER_LIST2 "memory", "cc", "eax" | ||
| 35 | #define __FT_CLOBBER_LIST3 "memory", "cc", "eax" | ||
| 36 | |||
| 37 | #define __FT_TMP1(x) "=d" (x) | ||
| 38 | #define __FT_ARG1(x) "0" ((long) (x)) | ||
| 39 | #define __FT_TMP2(x) "=c" (x) | ||
| 40 | #define __FT_ARG2(x) "1" ((long) (x)) | ||
| 41 | |||
| 42 | #define __FT_ARG3(x) "r" ((long) (x)) | ||
| 43 | |||
| 44 | #define ft_event(id, callback) \ | ||
| 45 | __asm__ __volatile__( \ | ||
| 46 | "1: jmp 2f \n\t" \ | ||
| 47 | " call " #callback " \n\t" \ | ||
| 48 | ".section __event_table, \"aw\" \n\t" \ | ||
| 49 | ".long " #id ", 0, 1b, 2f \n\t" \ | ||
| 50 | ".previous \n\t" \ | ||
| 51 | "2: \n\t" \ | ||
| 52 | : : : __FT_CLOBBER_LIST0) | ||
| 53 | |||
| 54 | #define ft_event0(id, callback) \ | ||
| 55 | __asm__ __volatile__( \ | ||
| 56 | "1: jmp 2f \n\t" \ | ||
| 57 | " movl $" #id ", %%eax \n\t" \ | ||
| 58 | " call " #callback " \n\t" \ | ||
| 59 | ".section __event_table, \"aw\" \n\t" \ | ||
| 60 | ".long " #id ", 0, 1b, 2f \n\t" \ | ||
| 61 | ".previous \n\t" \ | ||
| 62 | "2: \n\t" \ | ||
| 63 | : : : __FT_CLOBBER_LIST0) | ||
| 64 | |||
| 65 | #define ft_event1(id, callback, param) \ | ||
| 66 | do { \ | ||
| 67 | long __ft_tmp1; \ | ||
| 68 | __asm__ __volatile__( \ | ||
| 69 | "1: jmp 2f \n\t" \ | ||
| 70 | " movl $" #id ", %%eax \n\t" \ | ||
| 71 | " call " #callback " \n\t" \ | ||
| 72 | ".section __event_table, \"aw\" \n\t" \ | ||
| 73 | ".long " #id ", 0, 1b, 2f \n\t" \ | ||
| 74 | ".previous \n\t" \ | ||
| 75 | "2: \n\t" \ | ||
| 76 | : __FT_TMP1(__ft_tmp1) \ | ||
| 77 | : __FT_ARG1(param) \ | ||
| 78 | : __FT_CLOBBER_LIST1); \ | ||
| 79 | } while (0); | ||
| 80 | |||
| 81 | #define ft_event2(id, callback, param, param2) \ | ||
| 82 | do { \ | ||
| 83 | long __ft_tmp1, __ft_tmp2; \ | ||
| 84 | __asm__ __volatile__( \ | ||
| 85 | "1: jmp 2f \n\t" \ | ||
| 86 | " movl $" #id ", %%eax \n\t" \ | ||
| 87 | " call " #callback " \n\t" \ | ||
| 88 | ".section __event_table, \"aw\" \n\t" \ | ||
| 89 | ".long " #id ", 0, 1b, 2f \n\t" \ | ||
| 90 | ".previous \n\t" \ | ||
| 91 | "2: \n\t" \ | ||
| 92 | : __FT_TMP1(__ft_tmp1), __FT_TMP2(__ft_tmp2) \ | ||
| 93 | : __FT_ARG1(param), __FT_ARG2(param2) \ | ||
| 94 | : __FT_CLOBBER_LIST2); \ | ||
| 95 | } while (0); | ||
| 96 | |||
| 97 | |||
| 98 | #define ft_event3(id, callback, param, param2, param3) \ | ||
| 99 | do { \ | ||
| 100 | long __ft_tmp1, __ft_tmp2; \ | ||
| 101 | __asm__ __volatile__( \ | ||
| 102 | "1: jmp 2f \n\t" \ | ||
| 103 | " subl $4, %%esp \n\t" \ | ||
| 104 | " movl $" #id ", %%eax \n\t" \ | ||
| 105 | " movl %2, (%%esp) \n\t" \ | ||
| 106 | " call " #callback " \n\t" \ | ||
| 107 | " addl $4, %%esp \n\t" \ | ||
| 108 | ".section __event_table, \"aw\" \n\t" \ | ||
| 109 | ".long " #id ", 0, 1b, 2f \n\t" \ | ||
| 110 | ".previous \n\t" \ | ||
| 111 | "2: \n\t" \ | ||
| 112 | : __FT_TMP1(__ft_tmp1), __FT_TMP2(__ft_tmp2) \ | ||
| 113 | : __FT_ARG1(param), __FT_ARG2(param2), __FT_ARG3(param3) \ | ||
| 114 | : __FT_CLOBBER_LIST3); \ | ||
| 115 | } while (0); | ||
diff --git a/arch/x86/include/asm/feather_trace_64.h b/arch/x86/include/asm/feather_trace_64.h new file mode 100644 index 00000000000..5ce49e2eebb --- /dev/null +++ b/arch/x86/include/asm/feather_trace_64.h | |||
| @@ -0,0 +1,124 @@ | |||
| 1 | /* Copyright (c) 2010 Andrea Bastoni, <bastoni@cs.unc.edu> | ||
| 2 | * Copyright (c) 2012 Björn Brandenburg, <bbb@mpi-sws.org> | ||
| 3 | * | ||
| 4 | * Permission is hereby granted, free of charge, to any person obtaining | ||
| 5 | * a copy of this software and associated documentation files (the | ||
| 6 | * "Software"), to deal in the Software without restriction, including | ||
| 7 | * without limitation the rights to use, copy, modify, merge, publish, | ||
| 8 | * distribute, sublicense, and/or sell copies of the Software, and to | ||
| 9 | * permit persons to whom the Software is furnished to do so, subject to | ||
| 10 | * the following conditions: | ||
| 11 | * | ||
| 12 | * The above copyright notice and this permission notice shall be | ||
| 13 | * included in all copies or substantial portions of the Software. | ||
| 14 | * | ||
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 19 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 20 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 21 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 22 | * SOFTWARE. | ||
| 23 | */ | ||
| 24 | |||
| 25 | /* Do not directly include this file. Include feather_trace.h instead */ | ||
| 26 | |||
| 27 | /* regparm is the default on x86_64 */ | ||
| 28 | #define feather_callback __attribute__((used)) | ||
| 29 | |||
| 30 | #define __FT_EVENT_TABLE(id,from,to) \ | ||
| 31 | ".section __event_table, \"aw\"\n\t" \ | ||
| 32 | ".balign 8\n\t" \ | ||
| 33 | ".quad " #id ", 0, " #from ", " #to " \n\t" \ | ||
| 34 | ".previous \n\t" | ||
| 35 | |||
| 36 | /* | ||
| 37 | * x86_64 caller only owns rbp, rbx, r12-r15; | ||
| 38 | * the callee can freely modify the others. | ||
| 39 | */ | ||
| 40 | #define __FT_CLOBBER_LIST0 "memory", "cc", "rdi", "rsi", "rdx", "rcx", \ | ||
| 41 | "r8", "r9", "r10", "r11", "rax" | ||
| 42 | |||
| 43 | #define __FT_CLOBBER_LIST1 "memory", "cc", "rdi", "rdx", "rcx", \ | ||
| 44 | "r8", "r9", "r10", "r11", "rax" | ||
| 45 | |||
| 46 | #define __FT_CLOBBER_LIST2 "memory", "cc", "rdi", "rcx", \ | ||
| 47 | "r8", "r9", "r10", "r11", "rax" | ||
| 48 | |||
| 49 | #define __FT_CLOBBER_LIST3 "memory", "cc", "rdi", \ | ||
| 50 | "r8", "r9", "r10", "r11", "rax" | ||
| 51 | |||
| 52 | /* The registers RDI, RSI, RDX, RCX, R8 and R9 are used for integer and pointer | ||
| 53 | * arguments. */ | ||
| 54 | |||
| 55 | /* RSI */ | ||
| 56 | #define __FT_TMP1(x) "=S" (x) | ||
| 57 | #define __FT_ARG1(x) "0" ((long) (x)) | ||
| 58 | |||
| 59 | /* RDX */ | ||
| 60 | #define __FT_TMP2(x) "=d" (x) | ||
| 61 | #define __FT_ARG2(x) "1" ((long) (x)) | ||
| 62 | |||
| 63 | /* RCX */ | ||
| 64 | #define __FT_TMP3(x) "=c" (x) | ||
| 65 | #define __FT_ARG3(x) "2" ((long) (x)) | ||
| 66 | |||
| 67 | #define ft_event(id, callback) \ | ||
| 68 | __asm__ __volatile__( \ | ||
| 69 | "1: jmp 2f \n\t" \ | ||
| 70 | " call " #callback " \n\t" \ | ||
| 71 | __FT_EVENT_TABLE(id,1b,2f) \ | ||
| 72 | "2: \n\t" \ | ||
| 73 | : : : __FT_CLOBBER_LIST0) | ||
| 74 | |||
| 75 | #define ft_event0(id, callback) \ | ||
| 76 | __asm__ __volatile__( \ | ||
| 77 | "1: jmp 2f \n\t" \ | ||
| 78 | " movq $" #id ", %%rdi \n\t" \ | ||
| 79 | " call " #callback " \n\t" \ | ||
| 80 | __FT_EVENT_TABLE(id,1b,2f) \ | ||
| 81 | "2: \n\t" \ | ||
| 82 | : : : __FT_CLOBBER_LIST0) | ||
| 83 | |||
| 84 | #define ft_event1(id, callback, param) \ | ||
| 85 | do { \ | ||
| 86 | long __ft_tmp1; \ | ||
| 87 | __asm__ __volatile__( \ | ||
| 88 | "1: jmp 2f \n\t" \ | ||
| 89 | " movq $" #id ", %%rdi \n\t" \ | ||
| 90 | " call " #callback " \n\t" \ | ||
| 91 | __FT_EVENT_TABLE(id,1b,2f) \ | ||
| 92 | "2: \n\t" \ | ||
| 93 | : __FT_TMP1(__ft_tmp1) \ | ||
| 94 | : __FT_ARG1(param) \ | ||
| 95 | : __FT_CLOBBER_LIST1); \ | ||
| 96 | } while (0); | ||
| 97 | |||
| 98 | #define ft_event2(id, callback, param, param2) \ | ||
| 99 | do { \ | ||
| 100 | long __ft_tmp1, __ft_tmp2; \ | ||
| 101 | __asm__ __volatile__( \ | ||
| 102 | "1: jmp 2f \n\t" \ | ||
| 103 | " movq $" #id ", %%rdi \n\t" \ | ||
| 104 | " call " #callback " \n\t" \ | ||
| 105 | __FT_EVENT_TABLE(id,1b,2f) \ | ||
| 106 | "2: \n\t" \ | ||
| 107 | : __FT_TMP1(__ft_tmp1), __FT_TMP2(__ft_tmp2) \ | ||
| 108 | : __FT_ARG1(param), __FT_ARG2(param2) \ | ||
| 109 | : __FT_CLOBBER_LIST2); \ | ||
| 110 | } while (0); | ||
| 111 | |||
| 112 | #define ft_event3(id, callback, param, param2, param3) \ | ||
| 113 | do { \ | ||
| 114 | long __ft_tmp1, __ft_tmp2, __ft_tmp3; \ | ||
| 115 | __asm__ __volatile__( \ | ||
| 116 | "1: jmp 2f \n\t" \ | ||
| 117 | " movq $" #id ", %%rdi \n\t" \ | ||
| 118 | " call " #callback " \n\t" \ | ||
| 119 | __FT_EVENT_TABLE(id,1b,2f) \ | ||
| 120 | "2: \n\t" \ | ||
| 121 | : __FT_TMP1(__ft_tmp1), __FT_TMP2(__ft_tmp2), __FT_TMP3(__ft_tmp3) \ | ||
| 122 | : __FT_ARG1(param), __FT_ARG2(param2), __FT_ARG3(param3) \ | ||
| 123 | : __FT_CLOBBER_LIST3); \ | ||
| 124 | } while (0); | ||
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index eb92a6ed2be..8f1e5445d37 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h | |||
| @@ -76,6 +76,8 @@ extern void threshold_interrupt(void); | |||
| 76 | extern void call_function_interrupt(void); | 76 | extern void call_function_interrupt(void); |
| 77 | extern void call_function_single_interrupt(void); | 77 | extern void call_function_single_interrupt(void); |
| 78 | 78 | ||
| 79 | extern void pull_timers_interrupt(void); | ||
| 80 | |||
| 79 | /* IOAPIC */ | 81 | /* IOAPIC */ |
| 80 | #define IO_APIC_IRQ(x) (((x) >= NR_IRQS_LEGACY) || ((1<<(x)) & io_apic_irqs)) | 82 | #define IO_APIC_IRQ(x) (((x) >= NR_IRQS_LEGACY) || ((1<<(x)) & io_apic_irqs)) |
| 81 | extern unsigned long io_apic_irqs; | 83 | extern unsigned long io_apic_irqs; |
| @@ -154,6 +156,7 @@ extern asmlinkage void smp_irq_move_cleanup_interrupt(void); | |||
| 154 | extern void smp_reschedule_interrupt(struct pt_regs *); | 156 | extern void smp_reschedule_interrupt(struct pt_regs *); |
| 155 | extern void smp_call_function_interrupt(struct pt_regs *); | 157 | extern void smp_call_function_interrupt(struct pt_regs *); |
| 156 | extern void smp_call_function_single_interrupt(struct pt_regs *); | 158 | extern void smp_call_function_single_interrupt(struct pt_regs *); |
| 159 | extern void smp_pull_timers_interrupt(struct pt_regs *); | ||
| 157 | #ifdef CONFIG_X86_32 | 160 | #ifdef CONFIG_X86_32 |
| 158 | extern void smp_invalidate_interrupt(struct pt_regs *); | 161 | extern void smp_invalidate_interrupt(struct pt_regs *); |
| 159 | #else | 162 | #else |
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h index 7e50f06393a..7de6ad70365 100644 --- a/arch/x86/include/asm/irq_vectors.h +++ b/arch/x86/include/asm/irq_vectors.h | |||
| @@ -130,6 +130,13 @@ | |||
| 130 | #define INVALIDATE_TLB_VECTOR_START \ | 130 | #define INVALIDATE_TLB_VECTOR_START \ |
| 131 | (INVALIDATE_TLB_VECTOR_END-NUM_INVALIDATE_TLB_VECTORS+1) | 131 | (INVALIDATE_TLB_VECTOR_END-NUM_INVALIDATE_TLB_VECTORS+1) |
| 132 | 132 | ||
| 133 | /* | ||
| 134 | * LITMUS^RT pull timers IRQ vector | ||
| 135 | * Make sure it's below the above max 32 vectors. | ||
| 136 | */ | ||
| 137 | #define PULL_TIMERS_VECTOR 0xce | ||
| 138 | |||
| 139 | |||
| 133 | #define NR_VECTORS 256 | 140 | #define NR_VECTORS 256 |
| 134 | 141 | ||
| 135 | #define FPU_IRQ 13 | 142 | #define FPU_IRQ 13 |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 0d1171c9772..7e6a7b66203 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
| @@ -166,6 +166,10 @@ extern void print_cpu_info(struct cpuinfo_x86 *); | |||
| 166 | extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); | 166 | extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); |
| 167 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); | 167 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); |
| 168 | extern unsigned short num_cache_leaves; | 168 | extern unsigned short num_cache_leaves; |
| 169 | #ifdef CONFIG_SYSFS | ||
| 170 | extern int get_shared_cpu_map(cpumask_var_t mask, | ||
| 171 | unsigned int cpu, int index); | ||
| 172 | #endif | ||
| 169 | 173 | ||
| 170 | extern void detect_extended_topology(struct cpuinfo_x86 *c); | 174 | extern void detect_extended_topology(struct cpuinfo_x86 *c); |
| 171 | extern void detect_ht(struct cpuinfo_x86 *c); | 175 | extern void detect_ht(struct cpuinfo_x86 *c); |
diff --git a/arch/x86/include/asm/unistd_32.h b/arch/x86/include/asm/unistd_32.h index 593485b38ab..2f6e127db30 100644 --- a/arch/x86/include/asm/unistd_32.h +++ b/arch/x86/include/asm/unistd_32.h | |||
| @@ -353,9 +353,13 @@ | |||
| 353 | #define __NR_sendmmsg 345 | 353 | #define __NR_sendmmsg 345 |
| 354 | #define __NR_setns 346 | 354 | #define __NR_setns 346 |
| 355 | 355 | ||
| 356 | #define __NR_LITMUS 347 | ||
| 357 | |||
| 358 | #include "litmus/unistd_32.h" | ||
| 359 | |||
| 356 | #ifdef __KERNEL__ | 360 | #ifdef __KERNEL__ |
| 357 | 361 | ||
| 358 | #define NR_syscalls 347 | 362 | #define NR_syscalls 347 + NR_litmus_syscalls |
| 359 | 363 | ||
| 360 | #define __ARCH_WANT_IPC_PARSE_VERSION | 364 | #define __ARCH_WANT_IPC_PARSE_VERSION |
| 361 | #define __ARCH_WANT_OLD_READDIR | 365 | #define __ARCH_WANT_OLD_READDIR |
diff --git a/arch/x86/include/asm/unistd_64.h b/arch/x86/include/asm/unistd_64.h index 20104057344..f6f37d0ca33 100644 --- a/arch/x86/include/asm/unistd_64.h +++ b/arch/x86/include/asm/unistd_64.h | |||
| @@ -684,6 +684,10 @@ __SYSCALL(__NR_setns, sys_setns) | |||
| 684 | #define __NR_getcpu 309 | 684 | #define __NR_getcpu 309 |
| 685 | __SYSCALL(__NR_getcpu, sys_getcpu) | 685 | __SYSCALL(__NR_getcpu, sys_getcpu) |
| 686 | 686 | ||
| 687 | #define __NR_LITMUS 309 | ||
| 688 | |||
| 689 | #include "litmus/unistd_64.h" | ||
| 690 | |||
| 687 | #ifndef __NO_STUBS | 691 | #ifndef __NO_STUBS |
| 688 | #define __ARCH_WANT_OLD_READDIR | 692 | #define __ARCH_WANT_OLD_READDIR |
| 689 | #define __ARCH_WANT_OLD_STAT | 693 | #define __ARCH_WANT_OLD_STAT |
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 82f2912155a..c84954ad12f 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile | |||
| @@ -99,6 +99,8 @@ obj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o | |||
| 99 | obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o | 99 | obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o |
| 100 | obj-$(CONFIG_OF) += devicetree.o | 100 | obj-$(CONFIG_OF) += devicetree.o |
| 101 | 101 | ||
| 102 | obj-$(CONFIG_FEATHER_TRACE) += ft_event.o | ||
| 103 | |||
| 102 | ### | 104 | ### |
| 103 | # 64 bit specific files | 105 | # 64 bit specific files |
| 104 | ifeq ($(CONFIG_X86_64),y) | 106 | ifeq ($(CONFIG_X86_64),y) |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index c105c533ed9..0bf12644aa7 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
| @@ -747,6 +747,23 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) | |||
| 747 | static DEFINE_PER_CPU(struct _cpuid4_info *, ici_cpuid4_info); | 747 | static DEFINE_PER_CPU(struct _cpuid4_info *, ici_cpuid4_info); |
| 748 | #define CPUID4_INFO_IDX(x, y) (&((per_cpu(ici_cpuid4_info, x))[y])) | 748 | #define CPUID4_INFO_IDX(x, y) (&((per_cpu(ici_cpuid4_info, x))[y])) |
| 749 | 749 | ||
| 750 | /* returns CPUs that share the index cache with cpu */ | ||
| 751 | int get_shared_cpu_map(cpumask_var_t mask, unsigned int cpu, int index) | ||
| 752 | { | ||
| 753 | int ret = 0; | ||
| 754 | struct _cpuid4_info *this_leaf; | ||
| 755 | |||
| 756 | if (index >= num_cache_leaves) { | ||
| 757 | index = num_cache_leaves - 1; | ||
| 758 | ret = index; | ||
| 759 | } | ||
| 760 | |||
| 761 | this_leaf = CPUID4_INFO_IDX(cpu,index); | ||
| 762 | cpumask_copy(mask, to_cpumask(this_leaf->shared_cpu_map)); | ||
| 763 | |||
| 764 | return ret; | ||
| 765 | } | ||
| 766 | |||
| 750 | #ifdef CONFIG_SMP | 767 | #ifdef CONFIG_SMP |
| 751 | static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | 768 | static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) |
| 752 | { | 769 | { |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 6419bb05ecd..e5d2d3fa7a0 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
| @@ -993,6 +993,8 @@ apicinterrupt CALL_FUNCTION_VECTOR \ | |||
| 993 | call_function_interrupt smp_call_function_interrupt | 993 | call_function_interrupt smp_call_function_interrupt |
| 994 | apicinterrupt RESCHEDULE_VECTOR \ | 994 | apicinterrupt RESCHEDULE_VECTOR \ |
| 995 | reschedule_interrupt smp_reschedule_interrupt | 995 | reschedule_interrupt smp_reschedule_interrupt |
| 996 | apicinterrupt PULL_TIMERS_VECTOR \ | ||
| 997 | pull_timers_interrupt smp_pull_timers_interrupt | ||
| 996 | #endif | 998 | #endif |
| 997 | 999 | ||
| 998 | apicinterrupt ERROR_APIC_VECTOR \ | 1000 | apicinterrupt ERROR_APIC_VECTOR \ |
diff --git a/arch/x86/kernel/ft_event.c b/arch/x86/kernel/ft_event.c new file mode 100644 index 00000000000..37cc3325271 --- /dev/null +++ b/arch/x86/kernel/ft_event.c | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | #include <linux/types.h> | ||
| 2 | |||
| 3 | #include <litmus/feather_trace.h> | ||
| 4 | |||
| 5 | /* the feather trace management functions assume | ||
| 6 | * exclusive access to the event table | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef CONFIG_DEBUG_RODATA | ||
| 10 | |||
| 11 | #define BYTE_JUMP 0xeb | ||
| 12 | #define BYTE_JUMP_LEN 0x02 | ||
| 13 | |||
| 14 | /* for each event, there is an entry in the event table */ | ||
| 15 | struct trace_event { | ||
| 16 | long id; | ||
| 17 | long count; | ||
| 18 | long start_addr; | ||
| 19 | long end_addr; | ||
| 20 | }; | ||
| 21 | |||
| 22 | extern struct trace_event __start___event_table[]; | ||
| 23 | extern struct trace_event __stop___event_table[]; | ||
| 24 | |||
| 25 | /* Workaround: if no events are defined, then the event_table section does not | ||
| 26 | * exist and the above references cause linker errors. This could probably be | ||
| 27 | * fixed by adjusting the linker script, but it is easier to maintain for us if | ||
| 28 | * we simply create a dummy symbol in the event table section. | ||
| 29 | */ | ||
| 30 | int __event_table_dummy[0] __attribute__ ((section("__event_table"))); | ||
| 31 | |||
| 32 | int ft_enable_event(unsigned long id) | ||
| 33 | { | ||
| 34 | struct trace_event* te = __start___event_table; | ||
| 35 | int count = 0; | ||
| 36 | char* delta; | ||
| 37 | unsigned char* instr; | ||
| 38 | |||
| 39 | while (te < __stop___event_table) { | ||
| 40 | if (te->id == id && ++te->count == 1) { | ||
| 41 | instr = (unsigned char*) te->start_addr; | ||
| 42 | /* make sure we don't clobber something wrong */ | ||
| 43 | if (*instr == BYTE_JUMP) { | ||
| 44 | delta = (((unsigned char*) te->start_addr) + 1); | ||
| 45 | *delta = 0; | ||
| 46 | } | ||
| 47 | } | ||
| 48 | if (te->id == id) | ||
| 49 | count++; | ||
| 50 | te++; | ||
| 51 | } | ||
| 52 | |||
| 53 | printk(KERN_DEBUG "ft_enable_event: enabled %d events\n", count); | ||
| 54 | return count; | ||
| 55 | } | ||
| 56 | |||
| 57 | int ft_disable_event(unsigned long id) | ||
| 58 | { | ||
| 59 | struct trace_event* te = __start___event_table; | ||
| 60 | int count = 0; | ||
| 61 | char* delta; | ||
| 62 | unsigned char* instr; | ||
| 63 | |||
| 64 | while (te < __stop___event_table) { | ||
| 65 | if (te->id == id && --te->count == 0) { | ||
| 66 | instr = (unsigned char*) te->start_addr; | ||
| 67 | if (*instr == BYTE_JUMP) { | ||
| 68 | delta = (((unsigned char*) te->start_addr) + 1); | ||
| 69 | *delta = te->end_addr - te->start_addr - | ||
| 70 | BYTE_JUMP_LEN; | ||
| 71 | } | ||
| 72 | } | ||
| 73 | if (te->id == id) | ||
| 74 | count++; | ||
| 75 | te++; | ||
| 76 | } | ||
| 77 | |||
| 78 | printk(KERN_DEBUG "ft_disable_event: disabled %d events\n", count); | ||
| 79 | return count; | ||
| 80 | } | ||
| 81 | |||
| 82 | int ft_disable_all_events(void) | ||
| 83 | { | ||
| 84 | struct trace_event* te = __start___event_table; | ||
| 85 | int count = 0; | ||
| 86 | char* delta; | ||
| 87 | unsigned char* instr; | ||
| 88 | |||
| 89 | while (te < __stop___event_table) { | ||
| 90 | if (te->count) { | ||
| 91 | instr = (unsigned char*) te->start_addr; | ||
| 92 | if (*instr == BYTE_JUMP) { | ||
| 93 | delta = (((unsigned char*) te->start_addr) | ||
| 94 | + 1); | ||
| 95 | *delta = te->end_addr - te->start_addr - | ||
| 96 | BYTE_JUMP_LEN; | ||
| 97 | te->count = 0; | ||
| 98 | count++; | ||
| 99 | } | ||
| 100 | } | ||
| 101 | te++; | ||
| 102 | } | ||
| 103 | return count; | ||
| 104 | } | ||
| 105 | |||
| 106 | int ft_is_event_enabled(unsigned long id) | ||
| 107 | { | ||
| 108 | struct trace_event* te = __start___event_table; | ||
| 109 | |||
| 110 | while (te < __stop___event_table) { | ||
| 111 | if (te->id == id) | ||
| 112 | return te->count; | ||
| 113 | te++; | ||
| 114 | } | ||
| 115 | return 0; | ||
| 116 | } | ||
| 117 | |||
| 118 | #endif | ||
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c index b3300e6bace..f3a90e926f5 100644 --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c | |||
| @@ -252,6 +252,9 @@ static void __init smp_intr_init(void) | |||
| 252 | alloc_intr_gate(CALL_FUNCTION_SINGLE_VECTOR, | 252 | alloc_intr_gate(CALL_FUNCTION_SINGLE_VECTOR, |
| 253 | call_function_single_interrupt); | 253 | call_function_single_interrupt); |
| 254 | 254 | ||
| 255 | /* IPI for hrtimer pulling on remote cpus */ | ||
| 256 | alloc_intr_gate(PULL_TIMERS_VECTOR, pull_timers_interrupt); | ||
| 257 | |||
| 255 | /* Low priority IPI to cleanup after moving an irq */ | 258 | /* Low priority IPI to cleanup after moving an irq */ |
| 256 | set_intr_gate(IRQ_MOVE_CLEANUP_VECTOR, irq_move_cleanup_interrupt); | 259 | set_intr_gate(IRQ_MOVE_CLEANUP_VECTOR, irq_move_cleanup_interrupt); |
| 257 | set_bit(IRQ_MOVE_CLEANUP_VECTOR, used_vectors); | 260 | set_bit(IRQ_MOVE_CLEANUP_VECTOR, used_vectors); |
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 013e7eba83b..7539d84628f 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
| @@ -23,6 +23,9 @@ | |||
| 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/preempt.h> | ||
| 27 | #include <litmus/debug_trace.h> | ||
| 28 | |||
| 26 | #include <asm/mtrr.h> | 29 | #include <asm/mtrr.h> |
| 27 | #include <asm/tlbflush.h> | 30 | #include <asm/tlbflush.h> |
| 28 | #include <asm/mmu_context.h> | 31 | #include <asm/mmu_context.h> |
| @@ -147,6 +150,16 @@ void native_send_call_func_ipi(const struct cpumask *mask) | |||
| 147 | free_cpumask_var(allbutself); | 150 | free_cpumask_var(allbutself); |
| 148 | } | 151 | } |
| 149 | 152 | ||
| 153 | /* trigger timers on remote cpu */ | ||
| 154 | void smp_send_pull_timers(int cpu) | ||
| 155 | { | ||
| 156 | if (unlikely(cpu_is_offline(cpu))) { | ||
| 157 | WARN_ON(1); | ||
| 158 | return; | ||
| 159 | } | ||
| 160 | apic->send_IPI_mask(cpumask_of(cpu), PULL_TIMERS_VECTOR); | ||
| 161 | } | ||
| 162 | |||
| 150 | /* | 163 | /* |
| 151 | * this function calls the 'stop' function on all other CPUs in the system. | 164 | * this function calls the 'stop' function on all other CPUs in the system. |
| 152 | */ | 165 | */ |
| @@ -204,6 +217,11 @@ void smp_reschedule_interrupt(struct pt_regs *regs) | |||
| 204 | /* | 217 | /* |
| 205 | * KVM uses this interrupt to force a cpu out of guest mode | 218 | * KVM uses this interrupt to force a cpu out of guest mode |
| 206 | */ | 219 | */ |
| 220 | |||
| 221 | /* LITMUS^RT: this IPI might need to trigger the sched state machine. | ||
| 222 | * Starting from 3.0 schedule_ipi() actually does something. This may | ||
| 223 | * increase IPI latencies compared with previous versions. */ | ||
| 224 | sched_state_ipi(); | ||
| 207 | } | 225 | } |
| 208 | 226 | ||
| 209 | void smp_call_function_interrupt(struct pt_regs *regs) | 227 | void smp_call_function_interrupt(struct pt_regs *regs) |
| @@ -224,6 +242,17 @@ void smp_call_function_single_interrupt(struct pt_regs *regs) | |||
| 224 | irq_exit(); | 242 | irq_exit(); |
| 225 | } | 243 | } |
| 226 | 244 | ||
| 245 | extern void hrtimer_pull(void); | ||
| 246 | |||
| 247 | void smp_pull_timers_interrupt(struct pt_regs *regs) | ||
| 248 | { | ||
| 249 | ack_APIC_irq(); | ||
| 250 | irq_enter(); | ||
| 251 | TRACE("pull timer interrupt\n"); | ||
| 252 | hrtimer_pull(); | ||
| 253 | irq_exit(); | ||
| 254 | } | ||
| 255 | |||
| 227 | struct smp_ops smp_ops = { | 256 | struct smp_ops smp_ops = { |
| 228 | .smp_prepare_boot_cpu = native_smp_prepare_boot_cpu, | 257 | .smp_prepare_boot_cpu = native_smp_prepare_boot_cpu, |
| 229 | .smp_prepare_cpus = native_smp_prepare_cpus, | 258 | .smp_prepare_cpus = native_smp_prepare_cpus, |
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S index bc19be332bc..058cac30916 100644 --- a/arch/x86/kernel/syscall_table_32.S +++ b/arch/x86/kernel/syscall_table_32.S | |||
| @@ -346,3 +346,17 @@ ENTRY(sys_call_table) | |||
| 346 | .long sys_syncfs | 346 | .long sys_syncfs |
| 347 | .long sys_sendmmsg /* 345 */ | 347 | .long sys_sendmmsg /* 345 */ |
| 348 | .long sys_setns | 348 | .long sys_setns |
| 349 | .long sys_set_rt_task_param /* LITMUS^RT 347 */ | ||
| 350 | .long sys_get_rt_task_param | ||
| 351 | .long sys_complete_job | ||
| 352 | .long sys_od_open | ||
| 353 | .long sys_od_close | ||
| 354 | .long sys_litmus_lock /* +5 */ | ||
| 355 | .long sys_litmus_unlock | ||
| 356 | .long sys_query_job_no | ||
| 357 | .long sys_wait_for_job_release | ||
| 358 | .long sys_wait_for_ts_release | ||
| 359 | .long sys_release_ts /* +10 */ | ||
| 360 | .long sys_null_call | ||
| 361 | .long sys_dynamic_group_lock | ||
| 362 | .long sys_dynamic_group_unlock | ||
