aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Kenna <cjk@cs.unc.edu>2012-12-03 14:34:03 -0500
committerChristopher Kenna <cjk@cs.unc.edu>2012-12-03 14:47:03 -0500
commitb79beb1d09d98d8f8606e9bba40880d32f744265 (patch)
treed1735f8bcd3590f4246ad17c1038f5cbea4c62a2
parent1281cd8055be5dd42778d0294cfccfcb477650ff (diff)
Update memory protection flags. Comment-out some debug messages.
-rw-r--r--arch/arm/kernel/smp.c1
-rw-r--r--include/litmus/color.h3
-rw-r--r--litmus/color_dev.c2
-rw-r--r--litmus/color_queue.c14
4 files changed, 12 insertions, 8 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 91d6f4278de1..71d54ede2630 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -40,6 +40,7 @@
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/trace.h>
43#include <litmus/preempt.h> 44#include <litmus/preempt.h>
44 45
45/* 46/*
diff --git a/include/litmus/color.h b/include/litmus/color.h
index 2f7e19cd4602..a018ce428461 100644
--- a/include/litmus/color.h
+++ b/include/litmus/color.h
@@ -86,8 +86,8 @@ int color_reclaim_pages_handler(struct ctl_table *, int, void __user *,
86int color_sched_in_task(struct task_struct*); 86int color_sched_in_task(struct task_struct*);
87int color_sched_out_task(struct task_struct*); 87int color_sched_out_task(struct task_struct*);
88 88
89#ifdef CONFIG_LOCKDEP
90#define LITMUS_LOCKDEP_NAME_MAX_LEN 50 89#define LITMUS_LOCKDEP_NAME_MAX_LEN 50
90#ifdef CONFIG_LOCKDEP
91#define LOCKDEP_DYNAMIC_ALLOC(lock, key, name_buf, fmt, args...) \ 91#define LOCKDEP_DYNAMIC_ALLOC(lock, key, name_buf, fmt, args...) \
92 do { \ 92 do { \
93 snprintf(name_buf, LITMUS_LOCKDEP_NAME_MAX_LEN, \ 93 snprintf(name_buf, LITMUS_LOCKDEP_NAME_MAX_LEN, \
@@ -95,7 +95,6 @@ int color_sched_out_task(struct task_struct*);
95 lockdep_set_class_and_name(lock, key, name_buf); \ 95 lockdep_set_class_and_name(lock, key, name_buf); \
96 } while (0) 96 } while (0)
97#else 97#else
98#define LITMUS_LOCKDEP_NAME_MAX_LEN 0
99#define LOCKDEP_DYNAMIC_ALLOC(lock, key, name_buf, fmt, args) \ 98#define LOCKDEP_DYNAMIC_ALLOC(lock, key, name_buf, fmt, args) \
100 do { (void)(key); } while (0) 99 do { (void)(key); } while (0)
101#endif 100#endif
diff --git a/litmus/color_dev.c b/litmus/color_dev.c
index 9edaf0ec7e41..4beb4383b3b3 100644
--- a/litmus/color_dev.c
+++ b/litmus/color_dev.c
@@ -48,7 +48,7 @@ static void mmap_common_vma_flags(struct vm_area_struct *vma)
48 * don't care if it was touched or not. __S011 means RW access, but not 48 * don't care if it was touched or not. __S011 means RW access, but not
49 * execute, and avoids copy-on-write behavior. 49 * execute, and avoids copy-on-write behavior.
50 * See protection_map in mmap.c. */ 50 * See protection_map in mmap.c. */
51 vma->vm_page_prot = __S011; 51 vma->vm_page_prot = PAGE_SHARED;
52} 52}
53 53
54/*********************************************************** 54/***********************************************************
diff --git a/litmus/color_queue.c b/litmus/color_queue.c
index c37aeb8c1389..0b87217a931a 100644
--- a/litmus/color_queue.c
+++ b/litmus/color_queue.c
@@ -10,10 +10,12 @@
10#include <litmus/trace.h> 10#include <litmus/trace.h>
11 11
12/* Uncomment to debug. */ 12/* Uncomment to debug. */
13#if 0
13#define QTRACE(q, fmt, args...) TRACE_CUR("q.phase: %llu q.way: %d " \ 14#define QTRACE(q, fmt, args...) TRACE_CUR("q.phase: %llu q.way: %d " \
14 "q.nr_cpus: %d q.at_barrier: %d " fmt, \ 15 "q.nr_cpus: %d q.at_barrier: %d " fmt, \
15 q.phase, q.way, q.nr_cpus, q.at_barrier, \ 16 q.phase, q.way, q.nr_cpus, q.at_barrier, \
16 ## args) 17 ## args)
18#endif
17 19
18#ifndef QTRACE 20#ifndef QTRACE
19#define QTRACE(q, fmt, args...) do { } while (0) 21#define QTRACE(q, fmt, args...) do { } while (0)
@@ -84,8 +86,8 @@ static void cpu_add_work(struct color_queue_request *req)
84 struct list_head *new = &req->list; 86 struct list_head *new = &req->list;
85 list_add_tail(new, &entry->enqueue); 87 list_add_tail(new, &entry->enqueue);
86 entry->nr_work++; 88 entry->nr_work++;
87 TRACE_CUR("cpu->nr_work: %d added work request pointer %p\n", 89 //TRACE_CUR("cpu->nr_work: %d added work request pointer %p\n",
88 entry->nr_work, req); 90 // entry->nr_work, req);
89} 91}
90 92
91/* 93/*
@@ -101,7 +103,7 @@ static void color_page_info_add_work(struct color_page_info *info, void *vaddr_s
101 const int cpu = smp_processor_id(); 103 const int cpu = smp_processor_id();
102 int i; 104 int i;
103 105
104 TRACE_CUR("adding work for color_page_info: 0x%p\n", info); 106 //TRACE_CUR("adding work for color_page_info: 0x%p\n", info);
105 107
106 for (i = 0; i < COLOR_REQUESTS_PER_PAGE; i++) { 108 for (i = 0; i < COLOR_REQUESTS_PER_PAGE; i++) {
107 struct color_queue_request *req = &info->requests[i]; 109 struct color_queue_request *req = &info->requests[i];
@@ -131,9 +133,11 @@ int color_queue_enqueue_read(struct task_struct *ts)
131 133
132 TS_CQ_ENQUEUE_READ_START; 134 TS_CQ_ENQUEUE_READ_START;
133 135
136#if 0
134 TRACE_CUR("enqueue read prev: %p next: %p\n", 137 TRACE_CUR("enqueue read prev: %p next: %p\n",
135 tsk_rt(ts)->color_page_info_list.prev, 138 tsk_rt(ts)->color_page_info_list.prev,
136 tsk_rt(ts)->color_page_info_list.next); 139 tsk_rt(ts)->color_page_info_list.next);
140#endif
137 141
138 list_for_each_entry(cur_info, 142 list_for_each_entry(cur_info,
139 &tsk_rt(ts)->color_page_info_list, 143 &tsk_rt(ts)->color_page_info_list,
@@ -207,7 +211,7 @@ static void do_work_son(struct color_queue_request *request)
207 WARN(1, "Idle work in the queue!\n"); 211 WARN(1, "Idle work in the queue!\n");
208 break; 212 break;
209 case COLOR_QUEUE_READ: 213 case COLOR_QUEUE_READ:
210 TRACE_CUR("doing work for CPU %d\n", request->cpu); 214 //TRACE_CUR("doing work for CPU %d\n", request->cpu);
211 do_work_read(request); 215 do_work_read(request);
212 break; 216 break;
213 } 217 }
@@ -218,7 +222,7 @@ static void do_work_son(struct color_queue_request *request)
218 entry = &per_cpu(cpu_entries, request->cpu); 222 entry = &per_cpu(cpu_entries, request->cpu);
219 raw_spin_lock(&entry->lock); 223 raw_spin_lock(&entry->lock);
220 entry->nr_work--; 224 entry->nr_work--;
221 TRACE_CUR("after doing work, cpu->nr_work: %d\n", entry->nr_work); 225 //TRACE_CUR("after doing work, cpu->nr_work: %d\n", entry->nr_work);
222 raw_spin_unlock(&entry->lock); 226 raw_spin_unlock(&entry->lock);
223 227
224 /* work is done, set it idle */ 228 /* work is done, set it idle */