[shortcut-fe] Add 64 bits support to simulated driver

Define a new common type for uint32_t and uint64_t.

Signed-off-by: Murat Sezgin <msezgin@codeaurora.org>
Change-Id: Ic3b9c5e1fbc449e3fbe637e38f1ceccd2c3e3eda
diff --git a/simulated-driver/sfe_drv.c b/simulated-driver/sfe_drv.c
index 64aa04d..7e58347 100644
--- a/simulated-driver/sfe_drv.c
+++ b/simulated-driver/sfe_drv.c
@@ -335,8 +335,8 @@
 	ncm->version = SFE_MESSAGE_VERSION;
 	ncm->type = type;
 	ncm->len = len;
-	ncm->cb = (u32)cb;
-	ncm->app_data = (u32)app_data;
+	ncm->cb = (sfe_ptr_t)cb;
+	ncm->app_data = (sfe_ptr_t)app_data;
 }
 
 /*
diff --git a/simulated-driver/sfe_drv.h b/simulated-driver/sfe_drv.h
index bb25109..729caff 100644
--- a/simulated-driver/sfe_drv.h
+++ b/simulated-driver/sfe_drv.h
@@ -56,6 +56,15 @@
 #define SFE_RULE_CREATE_MC_NAT_VALID       (1<<7) /**< Interface is configured with Source-NAT */
 #define SFE_RULE_CREATE_DIRECTION_VALID    (1<<8) /**< specify acceleration directions */
 
+/*
+ * 32/64 bits pointer type
+ */
+#ifdef __LP64__
+typedef uint64_t sfe_ptr_t;
+#else
+typedef uint32_t sfe_ptr_t;
+#endif
+
 typedef enum sfe_rule_sync_reason {
 	SFE_RULE_SYNC_REASON_STATS,	/* Sync is to synchronize stats */
 	SFE_RULE_SYNC_REASON_FLUSH,	/* Sync is to flush a entry */
@@ -113,8 +122,8 @@
 	enum sfe_cmn_response response;	/**< Primary response */
 	u32 type;			/**< Decetralized request #, to be used to match response # */
 	u32 error;			/**< Decentralized specific error message, response == EMSG */
-	u32 cb;			/**< Place for callback pointer */
-	u32 app_data;		/**< Place for app data */
+	sfe_ptr_t cb;			/**< Place for callback pointer */
+	sfe_ptr_t app_data;		/**< Place for app data */
 	u32 len;			/**< What is the length of the message excluding this header */
 };