Changeset 528
- Timestamp:
- Sep 21, 2018, 10:15:58 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/vfs.c
r527 r528 1130 1130 uint32_t y_size = LOCAL_CLUSTER->y_size; 1131 1131 uint32_t y_width = LOCAL_CLUSTER->y_width; 1132 uint32_t index = ( hal_get_cycles() + hal_get_gid() ) % (x_size * y_size);1133 uint32_t x = index / y_size;1134 uint32_t y = index % y_size;1132 uint32_t index = ( hal_get_cycles() + hal_get_gid() ) % (x_size * (y_size - 1)); // [FIXME] 1133 uint32_t x = index / (y_size - 1); // [FIXME] 1134 uint32_t y = index % (y_size - 1); // [FIXME] 1135 1135 1136 1136 return (x<<y_width) + y; -
trunk/kernel/kern/kernel_init.c
r517 r528 250 250 for( x = 0 ; x < info->x_size ; x++ ) 251 251 { 252 for( y = 0 ; y < info->y_size ; y++ )252 for( y = 0 ; y < info->y_size - 1; y++ ) // [FIXME] 253 253 { 254 254 cxy_t cxy = (x<<info->y_width) + y; … … 316 316 for( x = 0 ; x < info->x_size ; x++ ) 317 317 { 318 for( y = 0 ; y < info->y_size ; y++ )318 for( y = 0 ; y < info->y_size - 1; y++ ) // [FIXME] 319 319 { 320 320 cxy_t cxy = (x<<info->y_width) + y; … … 439 439 440 440 // compute target cluster for chdev[func,channel,direction] 441 uint32_t offset = ext_chdev_gid % ( info->x_size * info->y_size );442 uint32_t cx = offset / info->y_size;443 uint32_t cy = offset % info->y_size;441 uint32_t offset = ext_chdev_gid % ( info->x_size * (info->y_size - 1) ); // [FIXME] 442 uint32_t cx = offset / (info->y_size - 1); // [FIXME] 443 uint32_t cy = offset % (info->y_size - 1); // [FIXME] 444 444 uint32_t target_cxy = (cx<<info->y_width) + cy; 445 445 … … 479 479 for( x = 0 ; x < info->x_size ; x++ ) 480 480 { 481 for( y = 0 ; y < info->y_size ; y++ )481 for( y = 0 ; y < info->y_size - 1; y++ ) // [FIXME] 482 482 { 483 483 cxy_t cxy = (x<<info->y_width) + y; … … 562 562 for( x = 0 ; x < info->x_size ; x++ ) 563 563 { 564 for( y = 0 ; y < info->y_size ; y++ )564 for( y = 0 ; y < info->y_size - 1; y++ ) // [FIXME] 565 565 { 566 566 cxy_t cxy = (x<<info->y_width) + y; … … 576 576 for( x = 0 ; x < info->x_size ; x++ ) 577 577 { 578 for( y = 0 ; y < info->y_size ; y++ )578 for( y = 0 ; y < info->y_size - 1; y++ ) // [FIXME] 579 579 { 580 580 cxy_t cxy = (x<<info->y_width) + y; … … 613 613 for( x = 0 ; x < info->x_size ; x++ ) 614 614 { 615 for( y = 0 ; y < info->y_size ; y++ )615 for( y = 0 ; y < info->y_size - 1; y++ ) // [FIXME] 616 616 { 617 617 cxy_t cxy = (x<<info->y_width) + y; … … 792 792 thread->remote_locks = 0; 793 793 794 // CP0 in cluster 0 initialises TXT0 chdev descriptor 795 if( (core_lid == 0) && (core_cxy == 0) ) txt0_device_init( info ); 796 797 ///////////////////////////////////////////////////////////////////////////////// 798 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), 799 (info->x_size * info->y_size) ); 794 // CP0 in I/O cluster initialises TXT0 chdev descriptor 795 //if( (core_lid == 0) && (core_cxy == io_cxy) ) txt0_device_init( info ); 796 // CP0 in cluster 0 initializes TXT0 chdev descriptor 797 if( core_cxy == 0 && core_lid == 0 ) txt0_device_init( info ); 798 // [FIXME] 799 800 ///////////////////////////////////////////////////////////////////////////////// 801 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), // [FIXME] 802 (info->x_size * (info->y_size - 1)) ); 800 803 barrier_wait( &local_barrier , info->cores_nr ); 801 804 ///////////////////////////////////////////////////////////////////////////////// … … 834 837 835 838 ///////////////////////////////////////////////////////////////////////////////// 836 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), 837 (info->x_size * info->y_size) );839 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), // [FIXME] 840 (info->x_size * (info->y_size - 1)) ); 838 841 barrier_wait( &local_barrier , info->cores_nr ); 839 842 ///////////////////////////////////////////////////////////////////////////////// … … 861 864 862 865 //////////////////////////////////////////////////////////////////////////////// 863 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), 864 (info->x_size * info->y_size) );866 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), // [FIXME] 867 (info->x_size * (info->y_size - 1)) ); 865 868 barrier_wait( &local_barrier , info->cores_nr ); 866 869 //////////////////////////////////////////////////////////////////////////////// … … 894 897 895 898 ///////////////////////////////////////////////////////////////////////////////// 896 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), 897 (info->x_size * info->y_size) );899 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), // [FIXME] 900 (info->x_size * (info->y_size - 1)) ); 898 901 barrier_wait( &local_barrier , info->cores_nr ); 899 902 ///////////////////////////////////////////////////////////////////////////////// … … 999 1002 1000 1003 ///////////////////////////////////////////////////////////////////////////////// 1001 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), 1002 (info->x_size * info->y_size) );1004 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), // [FIXME] 1005 (info->x_size * (info->y_size - 1)) ); 1003 1006 barrier_wait( &local_barrier , info->cores_nr ); 1004 1007 ///////////////////////////////////////////////////////////////////////////////// … … 1060 1063 1061 1064 ///////////////////////////////////////////////////////////////////////////////// 1062 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), 1063 (info->x_size * info->y_size) );1065 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), // [FIXME] 1066 (info->x_size * (info->y_size - 1)) ); 1064 1067 barrier_wait( &local_barrier , info->cores_nr ); 1065 1068 ///////////////////////////////////////////////////////////////////////////////// … … 1077 1080 ///////////////////////////////////////////////////////////////////////////////// 1078 1081 1079 if( (core_lid == 0) && (local_cxy == 0) ) 1082 if( (core_lid == 0) && (local_cxy == 0) ) // [FIXME] 1080 1083 { 1081 1084 // create "dev" and "external" directories. … … 1095 1098 1096 1099 ///////////////////////////////////////////////////////////////////////////////// 1097 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), 1098 (info->x_size * info->y_size) );1100 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), // [FIXME] 1101 (info->x_size * (info->y_size - 1)) ); 1099 1102 barrier_wait( &local_barrier , info->cores_nr ); 1100 1103 ///////////////////////////////////////////////////////////////////////////////// … … 1116 1119 if( core_lid == 0 ) 1117 1120 { 1118 // get extended pointer on "extend" field of VFS context for DEVFS in cluster 01119 xptr_t extend_xp = XPTR( 0 , &fs_context[FS_TYPE_DEVFS].extend ); 1121 // get extended pointer on "extend" field of VFS context for DEVFS in cluster IO 1122 xptr_t extend_xp = XPTR( 0 , &fs_context[FS_TYPE_DEVFS].extend ); // [FIXME] 1120 1123 1121 1124 // get pointer on DEVFS context in cluster 0 … … 1132 1135 1133 1136 ///////////////////////////////////////////////////////////////////////////////// 1134 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), 1135 (info->x_size * info->y_size) );1137 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), // [FIXME] 1138 (info->x_size * (info->y_size - 1)) ); 1136 1139 barrier_wait( &local_barrier , info->cores_nr ); 1137 1140 ///////////////////////////////////////////////////////////////////////////////// … … 1158 1161 1159 1162 ///////////////////////////////////////////////////////////////////////////////// 1160 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), 1161 (info->x_size * info->y_size) );1163 if( core_lid == 0 ) remote_barrier( XPTR( 0 , &global_barrier ), // [FIXME] 1164 (info->x_size * (info->y_size - 1)) ); 1162 1165 barrier_wait( &local_barrier , info->cores_nr ); 1163 1166 ///////////////////////////////////////////////////////////////////////////////// … … 1178 1181 ///////////////////////////////////////////////////////////////////////////////// 1179 1182 1180 if( (core_lid == 0) && (local_cxy == 0) )1183 if( (core_lid == 0) && (local_cxy == 0) ) // [FIXME] 1181 1184 { 1182 1185 print_banner( (info->x_size * info->y_size) , info->cores_nr ); -
trunk/kernel/mm/vmm.c
r492 r528 1387 1387 uint32_t y_size = LOCAL_CLUSTER->y_size; 1388 1388 uint32_t y_width = LOCAL_CLUSTER->y_width; 1389 uint32_t index = vpn & ((x_size * y_size) - 1);1390 uint32_t x = index / y_size;1391 uint32_t y = index % y_size;1389 uint32_t index = vpn & ((x_size * (y_size - 1)) - 1); // [FIXME] 1390 uint32_t x = index / (y_size - 1); // [FIXME] 1391 uint32_t y = index % (y_size - 1); // [FIXME] 1392 1392 page_cxy = (x<<y_width) + y; 1393 1393 } -
trunk/user/init/init.c
r475 r528 90 90 91 91 #if DEBUG_PROCESS_INIT 92 unsigned int x_size; // number of clusters in a row 93 unsigned int y_size; // number of clusters in a column 94 unsigned int ncores; // number of cores per cluster 95 unsigned int x; // cluster x coordinate 96 unsigned int y; // cluster y coordinate 97 unsigned int cxy; // cluster identifier 98 unsigned int lid; // core local index 92 { 93 unsigned int x_size; // number of clusters in a row 94 unsigned int y_size; // number of clusters in a column 95 unsigned int ncores; // number of cores per cluster 96 unsigned int x; // cluster x coordinate 97 unsigned int y; // cluster y coordinate 98 unsigned int cxy; // cluster identifier 99 unsigned int lid; // core local index 99 100 100 // get hardware config 101 get_config( &x_size , &y_size , &ncores ); 102 103 // INIT displays processes and threads in all clusters 104 for( x = 0 ; x < x_size ; x++ ) 105 { 106 for( y = 0 ; y < y_size ; y++ ) 101 // get hardware config 102 get_config( &x_size , &y_size , &ncores ); 103 104 // INIT displays processes and threads in all clusters 105 for( x = 0 ; x < x_size ; x++ ) 107 106 { 108 cxy = CXY_FROM_XY( x , y ); 109 display_cluster_processes( cxy ); 110 for( lid = 0 ; lid < ncores ; lid++ ) 111 { 112 display_sched( cxy , lid ); 107 for( y = 0 ; y < y_size - 1 ; y++ ) 108 { 109 cxy = CXY_FROM_XY( x , y ); 110 display_cluster_processes( cxy ); 111 for( lid = 0 ; lid < ncores ; lid++ ) 112 { 113 display_sched( cxy , lid ); 114 } 113 115 } 114 116 }
Note: See TracChangeset
for help on using the changeset viewer.