Changeset 406 for trunk/kernel/mm/mapper.c
- Timestamp:
- Aug 29, 2017, 12:03:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/mm/mapper.c
r367 r406 143 143 error_t error; 144 144 145 mapper_dmsg("\n[ INFO] %s : enters for page %d inmapper %x\n",145 mapper_dmsg("\n[DMSG] %s : enters for page %d / mapper %x\n", 146 146 __FUNCTION__ , index , mapper ); 147 147 … … 170 170 if ( page == NULL ) // missing page => create it and load it from file system 171 171 { 172 mapper_dmsg("\n[ INFO] %s : missing page => load from device\n", __FUNCTION__ );172 mapper_dmsg("\n[DMSG] %s : missing page => load from device\n", __FUNCTION__ ); 173 173 174 174 // allocate one page from PPM … … 212 212 } 213 213 214 // update the mapper and index fields in page descriptor215 // required by the vfs_move_page_to_mapper()216 page->mapper = mapper;217 page->index = index;218 219 214 // launch I/O operation to load page from file system 220 215 error = vfs_mapper_move_page( page, … … 259 254 } 260 255 261 mapper_dmsg("\n[ INFO] %s : exit for page %d inmapper %x / page_desc = %x\n",256 mapper_dmsg("\n[DMSG] %s : exit for page %d / mapper %x / page_desc = %x\n", 262 257 __FUNCTION__ , index , mapper , page ); 263 258 … … 315 310 uint8_t * buf_ptr; // current buffer address 316 311 317 mapper_dmsg("\n[ INFO] %s : enters / to_buf = %d / buffer = %x\n",312 mapper_dmsg("\n[DMSG] %s : enters / to_buf = %d / buffer = %x\n", 318 313 __FUNCTION__ , to_buffer , buffer ); 319 314 … … 341 336 else page_count = CONFIG_PPM_PAGE_SIZE; 342 337 343 mapper_dmsg("\n[ INFO] %s : index = %d / offset = %d / count = %d\n",338 mapper_dmsg("\n[DMSG] %s : index = %d / offset = %d / count = %d\n", 344 339 __FUNCTION__ , index , page_offset , page_count ); 345 340 … … 356 351 buf_ptr = (uint8_t *)buffer + done; 357 352 358 mapper_dmsg("\n[ INFO] %s : index = %d / buf_ptr = %x / map_ptr = %x\n",353 mapper_dmsg("\n[DMSG] %s : index = %d / buf_ptr = %x / map_ptr = %x\n", 359 354 __FUNCTION__ , index , buf_ptr , map_ptr ); 360 355 … … 373 368 } 374 369 375 mapper_dmsg("\n[ INFO] %s : exit for buffer %x\n",370 mapper_dmsg("\n[DMSG] %s : exit for buffer %x\n", 376 371 __FUNCTION__, buffer ); 377 372 … … 398 393 cxy_t dst_cxy; // destination cluster 399 394 400 mapper_dmsg("\n[INFO] %s : enters / to_buf = %d / buffer = %l / size = %x / cycle %d\n", 401 __FUNCTION__ , to_buffer , buffer_xp , size , hal_time_stamp() ); 395 // get buffer cluster and local pointer 396 cxy_t buffer_cxy = GET_CXY( buffer_xp ); 397 uint8_t * buffer_ptr = (uint8_t *)GET_PTR( buffer_xp ); 398 399 mapper_dmsg("\n[DMSG] %s : to_buf = %d / buf_cxy = %x / buf_ptr = %x / size = %x\n", 400 __FUNCTION__ , to_buffer , buffer_cxy , buffer_ptr , size ); 402 401 403 402 // compute offsets of first and last bytes in file … … 409 408 uint32_t last = max_byte >> CONFIG_PPM_PAGE_SHIFT; 410 409 411 // get buffer cluster and local pointer 412 cxy_t buffer_cxy = GET_CXY( buffer_xp ); 413 uint8_t * buffer_ptr = (uint8_t *)GET_PTR( buffer_xp ); 410 mapper_dmsg("\n[DMSG] %s : first_page = %d / last_page = %d\n", 411 __FUNCTION__ , first , last ); 414 412 415 413 // compute source and destination clusters … … 440 438 else page_count = CONFIG_PPM_PAGE_SIZE; 441 439 442 mapper_dmsg("\n[ INFO] %s : page_index = %d / offset = %d / count= %d\n",440 mapper_dmsg("\n[DMSG] %s : page_index = %d / offset = %d / bytes = %d\n", 443 441 __FUNCTION__ , index , page_offset , page_count ); 444 442 … … 466 464 } 467 465 468 mapper_dmsg("\n[INFO] %s : index = %d\n", __FUNCTION__ , index );469 470 466 // move fragment 471 467 hal_remote_memcpy( XPTR( dst_cxy , dst_ptr ), XPTR( src_cxy , src_ptr ), page_count ); … … 474 470 } 475 471 476 mapper_dmsg("\n[ INFO] %s : exit for buffer %l / size = %x / cycle %d\n",477 __FUNCTION__ , buffer_xp , size , hal_time_stamp());472 mapper_dmsg("\n[DMSG] %s : exit / buf_cxy = %x / buf_ptr = %x / size = %x\n", 473 __FUNCTION__ , buffer_cxy , buffer_ptr , size ); 478 474 479 475 return 0; 480 476 481 } // end mapper_move_kernel _buffer()482 477 } // end mapper_move_kernel() 478
Note: See TracChangeset
for help on using the changeset viewer.