[Cbe-oss-dev] [PATCH 1/2] libspe2: move register definition to spebase.h
Jeremy Kerr
jk at ozlabs.org
Wed Aug 13 16:15:54 EST 2008
Currently, struct spe_reg128 is defined in handler_utils.h, indicating
that only the callback handlers will need to use it.
This change moves struct spe_reg128 to spebase.h. To do this, we also
need to remove the duplicate definition of LS_SIZE from handler_utils.h.
This allows other components of libspe to use struct spe_reg128.
Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---
spebase/default_c99_handler.c | 1 +
spebase/default_libea_handler.c | 1 +
spebase/default_posix1_handler.c | 1 +
spebase/handler_utils.h | 9 ---------
spebase/spebase.h | 6 ++++++
5 files changed, 9 insertions(+), 9 deletions(-)
Index: libspe2/spebase/handler_utils.h
===================================================================
--- libspe2.orig/spebase/handler_utils.h 2008-08-13 13:27:08.000000000 +1000
+++ libspe2/spebase/handler_utils.h 2008-08-13 13:28:40.000000000 +1000
@@ -20,15 +20,6 @@
#ifndef __HANDLER_UTILS_H__
#define __HANDLER_UTILS_H__
-struct spe_reg128 {
- unsigned int slot[4];
-};
-
-#ifndef LS_SIZE
-#define LS_SIZE 0x40000 /* 256K (in bytes) */
-#define LS_ADDR_MASK (LS_SIZE - 1)
-#endif /* LS_SIZE */
-
#define __PRINTF(fmt, args...) { fprintf(stderr,fmt , ## args); }
#ifdef DEBUG
#define DEBUG_PRINTF(fmt, args...) __PRINTF(fmt , ## args)
Index: libspe2/spebase/spebase.h
===================================================================
--- libspe2.orig/spebase/spebase.h 2008-08-13 13:27:08.000000000 +1000
+++ libspe2/spebase/spebase.h 2008-08-13 13:28:40.000000000 +1000
@@ -108,6 +108,10 @@ struct spe_context_base_priv {
int active_tagmask;
};
+struct spe_reg128 {
+ unsigned int slot[4];
+};
+
/* spe related sizes
*/
@@ -125,6 +129,8 @@ struct spe_context_base_priv {
#define SIGNAL1_OFFSET 0x14000
#define SIGNAL2_OFFSET 0x1c000
+#define LS_ADDR_MASK (LS_SIZE - 1)
+
/**
* Location of the PPE-assisted library call buffer
* for emulated isolation contexts.
Index: libspe2/spebase/default_c99_handler.c
===================================================================
--- libspe2.orig/spebase/default_c99_handler.c 2008-08-13 13:27:08.000000000 +1000
+++ libspe2/spebase/default_c99_handler.c 2008-08-13 13:28:40.000000000 +1000
@@ -29,6 +29,7 @@
#include "default_c99_handler.h"
#include "handler_utils.h"
+#include "spebase.h"
/* SPE C99 Handlers - Overview:
* This file implements handlers for SPE C99 library operations such
Index: libspe2/spebase/default_libea_handler.c
===================================================================
--- libspe2.orig/spebase/default_libea_handler.c 2008-08-13 13:27:08.000000000 +1000
+++ libspe2/spebase/default_libea_handler.c 2008-08-13 13:28:40.000000000 +1000
@@ -1,6 +1,7 @@
#define _GNU_SOURCE
#include "default_libea_handler.h"
+#include "spebase.h"
#include "handler_utils.h"
#include <stdlib.h>
#include <stdio.h>
Index: libspe2/spebase/default_posix1_handler.c
===================================================================
--- libspe2.orig/spebase/default_posix1_handler.c 2008-08-13 13:27:08.000000000 +1000
+++ libspe2/spebase/default_posix1_handler.c 2008-08-13 13:28:40.000000000 +1000
@@ -42,6 +42,7 @@
#include "default_posix1_handler.h"
#include "handler_utils.h"
+#include "spebase.h"
/* SPE POSIX.1 Handlers - Overview:
* This file implements handlers for SPE POSIX.1 library calls such as
More information about the cbe-oss-dev
mailing list