[Cbe-oss-dev] [PATCH 7/7]MARS/samples: Remove internal defines usage

Yuji Mano yuji.mano at am.sony.com
Wed Oct 29 06:05:49 EST 2008


This patch updates the sample sources that were using some internal defines that
are now hidden from the public headers. Some structures need to be explicitly
aligned for DMA.

Signed-off-by: Yuji Mano <yuji.mano at am.sony.com>

---
 samples/exit_code/host.c  |    2 +-
 samples/grayscale/host.c  |    2 +-
 samples/queue/host.c      |    2 +-
 samples/queue/mpu_task1.c |    2 +-
 samples/queue/mpu_task2.c |    2 +-
 samples/schedule/host.c   |    2 +-
 samples/signal/host.c     |    4 ++--
 7 files changed, 8 insertions(+), 8 deletions(-)

--- a/samples/exit_code/host.c
+++ b/samples/exit_code/host.c
@@ -51,7 +51,7 @@ extern struct spe_program_handle mpu_tas
 
 static struct mars_context *mars_ctx;
 static struct mars_task_id task1_id;
-static struct mars_task_id task2_id[NUM_TASKS];
+static struct mars_task_id task2_id[NUM_TASKS] __attribute__((aligned(16)));
 static struct mars_task_args task_args;
 
 int main(void)
--- a/samples/grayscale/host.c
+++ b/samples/grayscale/host.c
@@ -85,7 +85,7 @@ extern struct spe_program_handle mpu_tas
 
 static struct mars_context *mars_ctx;
 static struct mars_task_id task1_id;
-static struct mars_task_id task2_id[NUM_TASKS];
+static struct mars_task_id task2_id[NUM_TASKS] __attribute__((aligned(16)));
 static struct mars_task_args task_args;
 static struct mars_task_event_flag *event;
 static struct mars_task_queue *queue;
--- a/samples/queue/host.c
+++ b/samples/queue/host.c
@@ -80,7 +80,7 @@ static struct mars_task_queue *mpu_to_mp
 
 int main(void)
 {
-	struct queue_entry data __attribute__((aligned(MARS_TASK_QUEUE_ENTRY_ALIGN)));
+	struct queue_entry data;
 	int ret, i;
 
 	printf(INFO);
--- a/samples/queue/mpu_task1.c
+++ b/samples/queue/mpu_task1.c
@@ -39,7 +39,7 @@ int mars_task_main(const struct mars_tas
 	uint64_t host_to_mpu_ea = task_args->type.u64[0];
 	uint64_t mpu_to_mpu_ea = task_args->type.u64[1];
 	uint32_t num_entries = task_args->type.u32[4];
-	struct queue_entry data __attribute__((aligned(MARS_TASK_QUEUE_ENTRY_ALIGN)));
+	struct queue_entry data;
 
 	printf("MPU(%d): %s - Started\n",
 		mars_task_get_kernel_id(), mars_task_get_name());
--- a/samples/queue/mpu_task2.c
+++ b/samples/queue/mpu_task2.c
@@ -39,7 +39,7 @@ int mars_task_main(const struct mars_tas
 	uint64_t mpu_to_mpu_ea = task_args->type.u64[0];
 	uint64_t mpu_to_host_ea = task_args->type.u64[1];
 	uint32_t num_entries = task_args->type.u32[4];
-	struct queue_entry data __attribute__((aligned(MARS_TASK_QUEUE_ENTRY_ALIGN)));
+	struct queue_entry data;
 
 	printf("MPU(%d): %s - Started\n",
 		mars_task_get_kernel_id(), mars_task_get_name());
--- a/samples/schedule/host.c
+++ b/samples/schedule/host.c
@@ -54,7 +54,7 @@ extern struct spe_program_handle mpu_tas
 
 static struct mars_context *mars_ctx;
 static struct mars_task_id task1_id;
-static struct mars_task_id task2_id[NUM_TASKS];
+static struct mars_task_id task2_id[NUM_TASKS] __attribute__((aligned(16)));
 static struct mars_task_args task_args;
 
 int main(void)
--- a/samples/signal/host.c
+++ b/samples/signal/host.c
@@ -43,8 +43,8 @@ extern struct spe_program_handle mpu_tas
 extern struct spe_program_handle mpu_task2_prog;
 
 static struct mars_context *mars_ctx;
-static struct mars_task_id task1_id;
-static struct mars_task_id task2_id;
+static struct mars_task_id task1_id __attribute__((aligned(16)));
+static struct mars_task_id task2_id __attribute__((aligned(16)));
 static struct mars_task_args task_args;
 
 int main(void)






More information about the cbe-oss-dev mailing list