diff options
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/ctrldev.c | 11 | ||||
-rw-r--r-- | litmus/litmus.c | 2 | ||||
-rw-r--r-- | litmus/trace.c | 9 |
3 files changed, 20 insertions, 2 deletions
diff --git a/litmus/ctrldev.c b/litmus/ctrldev.c index 9969ab17c190..41919b2714cb 100644 --- a/litmus/ctrldev.c +++ b/litmus/ctrldev.c | |||
@@ -133,6 +133,17 @@ static int __init init_litmus_ctrl_dev(void) | |||
133 | 133 | ||
134 | BUILD_BUG_ON(sizeof(struct control_page) > PAGE_SIZE); | 134 | BUILD_BUG_ON(sizeof(struct control_page) > PAGE_SIZE); |
135 | 135 | ||
136 | BUILD_BUG_ON(sizeof(union np_flag) != sizeof(uint64_t)); | ||
137 | |||
138 | BUILD_BUG_ON(offsetof(struct control_page, sched.raw) | ||
139 | != LITMUS_CP_OFFSET_SCHED); | ||
140 | BUILD_BUG_ON(offsetof(struct control_page, irq_count) | ||
141 | != LITMUS_CP_OFFSET_IRQ_COUNT); | ||
142 | BUILD_BUG_ON(offsetof(struct control_page, ts_syscall_start) | ||
143 | != LITMUS_CP_OFFSET_TS_SC_START); | ||
144 | BUILD_BUG_ON(offsetof(struct control_page, irq_syscall_start) | ||
145 | != LITMUS_CP_OFFSET_IRQ_SC_START); | ||
146 | |||
136 | printk("Initializing LITMUS^RT control device.\n"); | 147 | printk("Initializing LITMUS^RT control device.\n"); |
137 | err = misc_register(&litmus_ctrl_dev); | 148 | err = misc_register(&litmus_ctrl_dev); |
138 | if (err) | 149 | if (err) |
diff --git a/litmus/litmus.c b/litmus/litmus.c index 81384327e850..c842de46587b 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c | |||
@@ -536,8 +536,6 @@ static int __init _init_litmus(void) | |||
536 | */ | 536 | */ |
537 | printk("Starting LITMUS^RT kernel\n"); | 537 | printk("Starting LITMUS^RT kernel\n"); |
538 | 538 | ||
539 | BUILD_BUG_ON(sizeof(union np_flag) != sizeof(uint32_t)); | ||
540 | |||
541 | register_sched_plugin(&linux_sched_plugin); | 539 | register_sched_plugin(&linux_sched_plugin); |
542 | 540 | ||
543 | bheap_node_cache = KMEM_CACHE(bheap_node, SLAB_PANIC); | 541 | bheap_node_cache = KMEM_CACHE(bheap_node, SLAB_PANIC); |
diff --git a/litmus/trace.c b/litmus/trace.c index fc1d03f35d39..c511003ea911 100644 --- a/litmus/trace.c +++ b/litmus/trace.c | |||
@@ -18,6 +18,15 @@ static unsigned int ts_seq_no = 0; | |||
18 | 18 | ||
19 | DEFINE_PER_CPU(atomic_t, irq_fired_count); | 19 | DEFINE_PER_CPU(atomic_t, irq_fired_count); |
20 | 20 | ||
21 | void ft_irq_fired(void) | ||
22 | { | ||
23 | /* Only called with preemptions disabled. */ | ||
24 | atomic_inc(&__get_cpu_var(irq_fired_count)); | ||
25 | |||
26 | if (has_control_page(current)) | ||
27 | get_control_page(current)->irq_count++; | ||
28 | } | ||
29 | |||
21 | static inline void clear_irq_fired(void) | 30 | static inline void clear_irq_fired(void) |
22 | { | 31 | { |
23 | atomic_set(&__raw_get_cpu_var(irq_fired_count), 0); | 32 | atomic_set(&__raw_get_cpu_var(irq_fired_count), 0); |