Attachment 'mc2_liblitmus_2015.1-rtns18.patch'

Download

   1 diff --git Makefile Makefile
   2 index 4742fd2..839341f 100644
   3 --- Makefile
   4 +++ Makefile
   5 @@ -19,7 +19,7 @@ LITMUS_KERNEL ?= ../litmus-rt
   6  # Internal configuration.
   7  
   8  # compiler flags
   9 -flags-debug    = -O2 -Wall -Werror -g -Wdeclaration-after-statement
  10 +flags-debug    = -O0 -Wall -g -Wdeclaration-after-statement
  11  flags-api      = -D_XOPEN_SOURCE=600 -D_GNU_SOURCE
  12  
  13  # architecture-specific flags
  14 @@ -52,7 +52,7 @@ headers += -I${LIBLITMUS}/arch/${include-${ARCH}}/include/generated/uapi
  15  # combine options
  16  CPPFLAGS = ${flags-api} ${flags-${ARCH}} -DARCH=${ARCH} ${headers}
  17  CFLAGS   = ${flags-debug}
  18 -LDFLAGS  = ${flags-${ARCH}}
  19 +LDFLAGS  = ${flags-${ARCH}} 
  20  
  21  # how to link against liblitmus
  22  liblitmus-flags = -L${LIBLITMUS} -llitmus
  23 @@ -73,7 +73,8 @@ AR  := ${CROSS_COMPILE}${AR}
  24  
  25  all     = lib ${rt-apps}
  26  rt-apps = cycles base_task rt_launch rtspin release_ts measure_syscall \
  27 -	  base_mt_task uncache runtests
  28 +	  base_mt_task uncache runtests synthetic matrix loadGen \
  29 +	  frameCopy yuv2gray
  30  
  31  .PHONY: all lib clean dump-config TAGS tags cscope help doc
  32  
  33 @@ -234,6 +235,20 @@ obj-release_ts = release_ts.o
  34  obj-measure_syscall = null_call.o
  35  lib-measure_syscall = -lm
  36  
  37 +obj-synthetic = synthetic.o common.o
  38 +lib-synthetic = -lrt -static
  39 +
  40 +obj-frameCopy = frame_poller.o webcam_lib.o common.o
  41 +lib-frameCopy = -lrt -static
  42 +
  43 +obj-yuv2gray = frame_conv.o webcam_lib.o common.o
  44 +lib-yuv2gray = -lrt -static
  45 +
  46 +obj-matrix = matrix.o common.o
  47 +lib-matrix = -lrt -static -lm
  48 +
  49 +obj-loadGen = loadGen.o common.o
  50 +lib-loadGen = -lrt -static
  51  # ##############################################################################
  52  # Build everything that depends on liblitmus.
  53  
  54 diff --git bin/uncache.c bin/uncache.c
  55 index 5170155..70419c8 100644
  56 --- bin/uncache.c
  57 +++ bin/uncache.c
  58 @@ -59,7 +59,7 @@ inline int linear_read(pbuf_t addr, int size, char val)
  59  }
  60  
  61  /* write to *data nr times. */
  62 -inline int hammer_write(pbuf_t data, char val, int nr)
  63 +static inline int hammer_write(pbuf_t data, char val, int nr)
  64  {
  65  	int i;
  66  	for (i = 0; i < nr; ++i)
  67 @@ -68,7 +68,7 @@ inline int hammer_write(pbuf_t data, char val, int nr)
  68  }
  69  
  70  /* read from *data nr times. */
  71 -inline int hammer_read(pbuf_t data, char val, int nr)
  72 +static inline int hammer_read(pbuf_t data, char val, int nr)
  73  {
  74  	int i;
  75  	for (i = 0; i < nr; ++i) {
  76 @@ -78,7 +78,7 @@ inline int hammer_read(pbuf_t data, char val, int nr)
  77  	return 0;
  78  }
  79  
  80 -inline int test(pbuf_t data, int size, int trials)
  81 +static inline int test(pbuf_t data, int size, int trials)
  82  {
  83  	int HAMMER_TIME = 10000;  /* can't cache this! */
  84  	char VAL = 0x55;
  85 @@ -109,7 +109,7 @@ inline int test(pbuf_t data, int size, int trials)
  86  	return 0;
  87  }
  88  
  89 -inline void timespec_normalize(struct timespec* ts, time_t sec, int64_t nsec)
  90 +static inline void timespec_normalize(struct timespec* ts, time_t sec, int64_t nsec)
  91  {
  92  	while(nsec > 1000000000LL) {
  93  		asm("" : "+rm"(nsec));
  94 @@ -126,21 +126,21 @@ inline void timespec_normalize(struct timespec* ts, time_t sec, int64_t nsec)
  95  	ts->tv_nsec = nsec;
  96  }
  97  
  98 -inline struct timespec timespec_sub(struct timespec lhs, struct timespec rhs)
  99 +static inline struct timespec timespec_sub(struct timespec lhs, struct timespec rhs)
 100  {
 101  	struct timespec delta;
 102  	timespec_normalize(&delta, lhs.tv_sec - rhs.tv_sec, lhs.tv_nsec - rhs.tv_nsec);
 103  	return delta;
 104  }
 105  
 106 -inline struct timespec timespec_add(struct timespec lhs, struct timespec rhs)
 107 +static inline struct timespec timespec_add(struct timespec lhs, struct timespec rhs)
 108  {
 109  	struct timespec delta;
 110  	timespec_normalize(&delta, lhs.tv_sec + rhs.tv_sec, lhs.tv_nsec + rhs.tv_nsec);
 111  	return delta;
 112  }
 113  
 114 -inline int64_t timespec_to_us(struct timespec ts)
 115 +static inline int64_t timespec_to_us(struct timespec ts)
 116  {
 117  	int64_t t;
 118  	t = ts.tv_sec * 1000000LL;
 119 diff --git include/litmus.h include/litmus.h
 120 index b9dbdb5..92df26e 100644
 121 --- include/litmus.h
 122 +++ include/litmus.h
 123 @@ -40,12 +40,22 @@ extern "C" {
 124  
 125  #include "migration.h"
 126  
 127 +#include "litmus/mc2_common.h"
 128 +
 129  /**
 130   * @private
 131 - * The numeric ID of the LITMUS^RT scheduling class.
 132 + * Number of semaphore protocol object types
 133   */
 134  #define SCHED_LITMUS 7
 135  
 136 +#define CACHELINE_SIZE 32
 137 +#define INTS_IN_CACHELINE (CACHELINE_SIZE/sizeof(int))
 138 +#define CACHELINES_IN_1KB (1024 / sizeof(cacheline_t))
 139 +typedef struct cacheline
 140 +{
 141 +        int line[INTS_IN_CACHELINE];
 142 +} __attribute__((aligned(CACHELINE_SIZE))) cacheline_t;
 143 +
 144  /**
 145   * Initialise a real-time task param struct
 146   * @param param Pointer to the struct to initialise
 147 @@ -146,6 +156,12 @@ int sporadic_clustered(lt_t e_ns, lt_t p_ns, int cluster);
 148  /** Convert microseconds to nanoseconds
 149    * @param us Time units in microseconds */
 150  #define us2ns(us) ((us)*1000LL)
 151 +#define ns2s(ns)  ((ns)/1000000000LL)
 152 +#define ns2ms(ns) ((ns)/1000000LL)
 153 +#define ns2us(ns) ((ns)/1000LL)
 154 +#define us2ms(us) ((us)/1000LL)
 155 +#define us2s(us)  ((us)/1000000LL)
 156 +#define ms2s(ms)  ((ms)/1000LL)
 157  
 158  /**
 159   * Locking protocols for allocated shared objects
 160 @@ -286,6 +302,12 @@ void exit_np(void);
 161   */
 162  int  requested_to_preempt(void);
 163  
 164 +/* pgm support */
 165 +void enter_pgm_wait(void);
 166 +void exit_pgm_wait(void);
 167 +void enter_pgm_send(void);
 168 +void exit_pgm_send(void);
 169 +
 170  /***** Task System support *****/
 171  /**
 172   * Wait until task master releases all real-time tasks
 173 @@ -416,6 +438,24 @@ int null_call(cycles_t *timestamp);
 174   */
 175  struct control_page* get_ctrl_page(void);
 176  
 177 +int reservation_create(int rtype, void *config);
 178 +
 179 +int reservation_destroy(unsigned int reservation_id, int cpu);
 180 +
 181 +int set_mc2_task_param(pid_t pid, struct mc2_task* param);
 182 +
 183 +int set_page_color(int cpu);
 184 +
 185 +int test_call(unsigned int param);
 186 +
 187 +int run_bench(int type, int size, cacheline_t *src, cacheline_t *dst, lt_t __user *ts);
 188 +
 189 +int lock_buffer(void* vaddr, size_t size, unsigned int lock_way, unsigned int unlock_way);
 190 +
 191 +int test_call(unsigned int param);
 192 +
 193 +int recolor_mem(void* vaddr, int n_pages, int cpu);
 194 +
 195  #ifdef __cplusplus
 196  }
 197  #endif
 198 diff --git src/syscalls.c src/syscalls.c
 199 index c68f15b..62c2ee5 100644
 200 --- src/syscalls.c
 201 +++ src/syscalls.c
 202 @@ -86,3 +86,43 @@ int null_call(cycles_t *timestamp)
 203  {
 204  	return syscall(__NR_null_call, timestamp);
 205  }
 206 +
 207 +int reservation_create(int rtype, void *config)
 208 +{
 209 +	return syscall(__NR_reservation_create, rtype, config);
 210 +}
 211 +
 212 +int reservation_destroy(unsigned int reservation_id, int cpu)
 213 +{
 214 +	return syscall(__NR_reservation_destroy, reservation_id, cpu);
 215 +}
 216 +
 217 +int set_mc2_task_param(pid_t pid, struct mc2_task *param)
 218 +{
 219 +	return syscall(__NR_set_mc2_task_param, pid, param);
 220 +}
 221 +
 222 +int set_page_color(int cpu)
 223 +{
 224 +	return syscall(__NR_set_page_color, cpu);
 225 +}
 226 +
 227 +int run_bench(int type, int wss, cacheline_t *src, cacheline_t *dst, lt_t *ts)
 228 +{
 229 +	return syscall(__NR_run_test, type, wss, src, dst, ts);
 230 +}
 231 +
 232 +int lock_buffer(void* vaddr, size_t size, unsigned int lock_way, unsigned int unlock_way)
 233 +{
 234 +	return syscall(__NR_lock_buffer, vaddr, size, lock_way, unlock_way);
 235 +}
 236 +
 237 +int test_call(unsigned int param)
 238 +{
 239 +	return syscall(__NR_test_call, param);
 240 +}
 241 +
 242 +int recolor_mem(void* vaddr, int num_pages, int cpu)
 243 +{
 244 +	return syscall(__NR_recolor_mem, vaddr, num_pages, cpu);
 245 +}
 246 

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2015-06-04 21:22:59, 244.8 KB) [[attachment:MC2-liblitmus-imx6-rtss15.patch]]
  • [get | view] (2016-05-12 14:35:37, 51.9 KB) [[attachment:MC2-liblitmus-rtss16.patch]]
  • [get | view] (2016-05-12 14:36:06, 190.4 KB) [[attachment:MC2-litmus-rt-rtss16.patch]]
  • [get | view] (2015-07-19 10:27:52, 1119.9 KB) [[attachment:MC2-litmut-rt-imx6-rtss15.patch]]
  • [get | view] (2014-05-27 20:46:19, 58.3 KB) [[attachment:MC2_liblitmus_ipdps15.patch]]
  • [get | view] (2014-05-27 20:45:43, 1044.3 KB) [[attachment:MC2_litmusrt_ipdps15.patch]]
  • [get | view] (2017-04-07 21:48:09, 6099.5 KB) [[attachment:buff_sharing.tar]]
  • [get | view] (2015-01-08 14:20:07, 61.0 KB) [[attachment:feather-trace-patch-against-sched-deadline-v8.patch]]
  • [get | view] (2014-04-01 23:10:10, 38.9 KB) [[attachment:gedf-mp-rtas14.patch]]
  • [get | view] (2012-03-02 20:13:59, 1.9 KB) [[attachment:gpu-klmirqd-liblitmus-rt-ecrts12.patch]]
  • [get | view] (2012-03-02 20:14:25, 389.8 KB) [[attachment:gpu-klmirqd-litmus-rt-ecrts12.patch]]
  • [get | view] (2012-05-26 21:41:34, 418.0 KB) [[attachment:gpusync-rtss12.patch]]
  • [get | view] (2012-05-26 21:42:20, 8.6 KB) [[attachment:gpusync_liblitmus-rtss12.patch]]
  • [get | view] (2013-05-21 15:32:08, 208.6 KB) [[attachment:gpusync_rtss13_liblitmus.patch]]
  • [get | view] (2013-05-21 15:31:32, 779.5 KB) [[attachment:gpusync_rtss13_litmus.patch]]
  • [get | view] (2012-05-26 21:42:41, 71.4 KB) [[attachment:klt_tracker_v1.0.litmus.tgz]]
  • [get | view] (2016-10-13 21:14:05, 19.6 KB) [[attachment:liblitmus-rtas17.patch]]
  • [get | view] (2017-05-01 20:46:22, 90.0 KB) [[attachment:liblitmus-rtns17.patch]]
  • [get | view] (2018-12-11 01:38:53, 49.1 KB) [[attachment:liblitmus-semi-part-with-edfos.patch]]
  • [get | view] (2017-10-09 19:16:09, 304.0 KB) [[attachment:litmus-rt-os-isolation.patch]]
  • [get | view] (2016-10-13 21:13:27, 207.6 KB) [[attachment:litmus-rt-rtas17.patch]]
  • [get | view] (2017-05-01 20:46:40, 207.6 KB) [[attachment:litmus-rt-rtns17.patch]]
  • [get | view] (2018-12-11 01:39:04, 100.5 KB) [[attachment:litmus-rt-semi-part-with-edfos.patch]]
  • [get | view] (2018-06-26 04:31:48, 7.0 KB) [[attachment:mc2_liblitmus_2015.1-rtns18.patch]]
  • [get | view] (2018-06-26 04:31:33, 292.7 KB) [[attachment:mc2_litmus-rt_2015.1-rtns18.patch]]
  • [get | view] (2017-05-01 20:45:10, 2596.9 KB) [[attachment:mcp_study.zip]]
  • [get | view] (2013-07-13 14:11:53, 58.0 KB) [[attachment:omip-ecrts13.patch]]
  • [get | view] (2014-02-19 21:48:33, 17.2 KB) [[attachment:pgmrt-liblitmus-ecrts14.patch]]
  • [get | view] (2014-02-19 21:47:57, 87.8 KB) [[attachment:pgmrt-litmusrt-ecrts14.patch]]
  • [get | view] (2015-01-08 14:22:32, 61.0 KB) [[attachment:sched-deadline-v8-feather-trace-rtas14.patch]]
  • [get | view] (2018-06-26 04:32:13, 2545.1 KB) [[attachment:sched_study_rtns2018.tar.gz]]
  • [get | view] (2017-04-07 21:53:39, 5969.5 KB) [[attachment:seminal.tar]]
  • [get | view] (2017-04-07 21:51:13, 6064.0 KB) [[attachment:shared_libraries.tar]]
  • [get | view] (2013-07-13 13:58:25, 42.7 KB) [[attachment:tracing-and-dflp-rtas13.patch]]
 All files | Selected Files: delete move to page

You are not allowed to attach a file to this page.