Index: trunk/kernel/kern/cluster.c
===================================================================
--- trunk/kernel/kern/cluster.c	(revision 437)
+++ trunk/kernel/kern/cluster.c	(revision 438)
@@ -89,7 +89,7 @@
 	spinlock_init( &cluster->kcm_lock );
 
-#if CONFIG_DEBUG_CLUSTER_INIT
+#if DEBUG_CLUSTER_INIT
 uint32_t cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
+if( DEBUG_CLUSTER_INIT < cycle )
 printk("\n[DBG] %s : thread %x enters for cluster %x / cycle %d\n",
 __FUNCTION__ , CURRENT_THREAD , local_cxy , cycle );
@@ -99,7 +99,5 @@
     cluster->dqdt_root_level = dqdt_init( info->x_size,
                                           info->y_size,
-                                          info->y_width );
-    cluster->threads_var = 0;
-    cluster->pages_var   = 0;
+                                          info->y_width ) - 1;
 
     // initialises embedded PPM
@@ -113,7 +111,7 @@
     }
 
-#if( CONFIG_DEBUG_CLUSTER_INIT & 1 )
+#if( DEBUG_CLUSTER_INIT & 1 )
 cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
+if( DEBUG_CLUSTER_INIT < cycle )
 printk("\n[DBG] %s : PPM initialized in cluster %x / cycle %d\n",
 __FUNCTION__ , local_cxy , cycle );
@@ -123,7 +121,7 @@
 	khm_init( &cluster->khm );
 
-#if( CONFIG_DEBUG_CLUSTER_INIT & 1 )
+#if( DEBUG_CLUSTER_INIT & 1 )
 uint32_t cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
+if( DEBUG_CLUSTER_INIT < cycle )
 printk("\n[DBG] %s : KHM initialized in cluster %x at cycle %d\n",
 __FUNCTION__ , local_cxy , hal_get_cycles() );
@@ -133,7 +131,7 @@
 	kcm_init( &cluster->kcm , KMEM_KCM );
 
-#if( CONFIG_DEBUG_CLUSTER_INIT & 1 )
+#if( DEBUG_CLUSTER_INIT & 1 )
 uint32_t cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
+if( DEBUG_CLUSTER_INIT < cycle )
 printk("\n[DBG] %s : KCM initialized in cluster %x at cycle %d\n",
 __FUNCTION__ , local_cxy , hal_get_cycles() );
@@ -148,7 +146,7 @@
 	}
 
-#if( CONFIG_DEBUG_CLUSTER_INIT & 1 )
+#if( DEBUG_CLUSTER_INIT & 1 )
 cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
+if( DEBUG_CLUSTER_INIT < cycle )
 printk("\n[DBG] %s : cores initialized in cluster %x / cycle %d\n",
 __FUNCTION__ , local_cxy , cycle );
@@ -159,7 +157,7 @@
     cluster->rpc_threads = 0;
 
-#if( CONFIG_DEBUG_CLUSTER_INIT & 1 )
+#if( DEBUG_CLUSTER_INIT & 1 )
 cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
+if( DEBUG_CLUSTER_INIT < cycle )
 printk("\n[DBG] %s : RPC fifo inialized in cluster %x at cycle %d\n",
 __FUNCTION__ , local_cxy , hal_get_cycles() );
@@ -188,7 +186,7 @@
     }
 
-#if CONFIG_DEBUG_CLUSTER_INIT
+#if DEBUG_CLUSTER_INIT
 cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_CLUSTER_INIT < cycle )
+if( DEBUG_CLUSTER_INIT < cycle )
 printk("\n[DBG] %s , thread %x exit for cluster %x / cycle %d\n",
 __FUNCTION__ , CURRENT_THREAD , local_cxy , cycle );
@@ -456,7 +454,7 @@
     pmgr_t * pm = &LOCAL_CLUSTER->pmgr;
 
-#if CONFIG_DEBUG_CLUSTER_PROCESS_COPIES
+#if DEBUG_CLUSTER_PROCESS_COPIES
 uint32_t cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_CLUSTER_PROCESS_COPIES < cycle )
+if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
 printk("\n[DBG] %s enters / cluster %x / process %x / cycle %d\n",
 __FUNCTION__ , local_cxy , process , cycle );
@@ -487,7 +485,7 @@
     remote_spinlock_unlock_busy( copies_lock , irq_state );
 
-#if CONFIG_DEBUG_CLUSTER_PROCESS_COPIES
+#if DEBUG_CLUSTER_PROCESS_COPIES
 cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_CLUSTER_PROCESS_COPIES < cycle )
+if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
 printk("\n[DBG] %s exit / cluster %x / process %x / cycle %d\n",
 __FUNCTION__ , local_cxy , process , cycle );
@@ -502,7 +500,7 @@
     pmgr_t * pm = &LOCAL_CLUSTER->pmgr;
 
-#if CONFIG_DEBUG_CLUSTER_PROCESS_COPIES
+#if DEBUG_CLUSTER_PROCESS_COPIES
 uint32_t cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_CLUSTER_PROCESS_COPIES < cycle )
+if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
 printk("\n[DBG] %s enters / cluster %x / process %x / cycle %d\n",
 __FUNCTION__ , local_cxy , process , cycle );
@@ -530,7 +528,7 @@
     remote_spinlock_unlock_busy( copies_lock , irq_state );
 
-#if CONFIG_DEBUG_CLUSTER_PROCESS_COPIES
+#if DEBUG_CLUSTER_PROCESS_COPIES
 cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_CLUSTER_PROCESS_COPIES < cycle )
+if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
 printk("\n[DBG] %s exit / cluster %x / process %x / cycle %d\n",
 __FUNCTION__ , local_cxy , process , cycle );
