Changeset 437 for trunk/kernel/devices/dev_ioc.c
- Timestamp:
- Mar 28, 2018, 2:40:29 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_ioc.c
r408 r437 2 2 * dev_ioc.c - IOC (Block Device Controler) generic device API implementation. 3 3 * 4 * Author Alain Greiner (2016 )4 * Author Alain Greiner (2016,2017,2018) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 101 101 thread_t * this = CURRENT_THREAD; // pointer on client thread 102 102 103 ioc_dmsg("\n[DBG] %s : thread %x in process %x"104 " for lba = %x / buffer = %x / at cycle %d\n",105 __FUNCTION__ , this->trdid , this->process->pid ,106 lba , (intptr_t)buffer , hal_get_cycles() );107 108 103 // software L2/L3 cache coherence for memory buffer 109 104 if( chdev_dir.iob ) … … 130 125 chdev_register_command( dev_xp ); 131 126 132 ioc_dmsg("\n[DBG] in %s : thread %x in process %x"133 " completes / error = %d / at cycle %d\n",134 __FUNCTION__ , this->trdid , this->process->pid ,135 this->ioc_cmd.error , hal_get_cycles() );136 137 127 // return I/O operation status 138 128 return this->ioc_cmd.error; … … 145 135 uint32_t count ) 146 136 { 137 138 #if CONFIG_DEBUG_DEV_IOC_RX 139 uint32_t cycle = (uint32_t)hal_get_cycles(); 140 if( CONFIG_DEBUG_DEV_IOC_RX < cycle ) 141 printk("\n[DBG] %s : thread %x enters / lba %x / buffer %x / cycle %d\n", 142 __FUNCTION__ , this, lba, buffer, cycle ); 143 #endif 144 147 145 return dev_ioc_access( IOC_READ , buffer , lba , count ); 146 147 #if CONFIG_DEBUG_DEV_IOC_RX 148 cycle = (uint32_t)hal_get_cycles(); 149 if( CONFIG_DEBUG_DEV_IOC_RX < cycle ) 150 printk("\n[DBG] %s : thread %x exit / lba %x / buffer %x / cycle %d\n", 151 __FUNCTION__ , this, lba, buffer, cycle ); 152 #endif 153 148 154 } 149 155 … … 153 159 uint32_t count ) 154 160 { 161 162 #if CONFIG_DEBUG_DEV_IOC_TX 163 uint32_t cycle = (uint32_t)hal_get_cycles(); 164 if( CONFIG_DEBUG_DEV_IOC_TX < cycle ) 165 printk("\n[DBG] %s : thread %x enters / lba %x / buffer %x / cycle %d\n", 166 __FUNCTION__ , this, lba, buffer, cycle ); 167 #endif 168 155 169 return dev_ioc_access( IOC_WRITE , buffer , lba , count ); 170 171 #if CONFIG_DEBUG_DEV_IOC_TX 172 cycle = (uint32_t)hal_get_cycles(); 173 if( CONFIG_DEBUG_DEV_IOC_TX < cycle ) 174 printk("\n[DBG] %s : thread %x exit / lba %x / buffer %x / cycle %d\n", 175 __FUNCTION__ , this, lba, buffer, cycle ); 176 #endif 177 156 178 } 157 179 … … 164 186 thread_t * this = CURRENT_THREAD; 165 187 166 ioc_dmsg("\n[DBG] %s : core[%x,%d] enter for %d blocks / lba = %x / cycle %d\n", 167 __FUNCTION__ , local_cxy , this->core->lid , count , lba , hal_time_stamp() ); 188 #if CONFIG_DEBUG_DEV_IOC_RX 189 uint32_t cycle = (uint32_t)hal_get_cycles(); 190 if( CONFIG_DEBUG_DEV_IOC_RX < cycle ) 191 printk("\n[DBG] %s : thread %x enters / lba %x / buffer %x / cycle %d\n", 192 __FUNCTION__ , this, lba, buffer, cycle ); 193 #endif 168 194 169 195 // software L2/L3 cache coherence for memory buffer … … 201 227 dev_pic_enable_irq( lid , ioc_xp ); 202 228 203 ioc_dmsg("\n[DBG] %s : core[%x,%d] exit / error = %d / cycle %d\n", 204 __FUNCTION__ , local_cxy , this->core->lid , this->ioc_cmd.error , hal_time_stamp() ); 229 #if CONFIG_DEBUG_DEV_IOC_RX 230 cycle = (uint32_t)hal_get_cycles(); 231 if( CONFIG_DEBUG_DEV_IOC_RX < cycle ) 232 printk("\n[DBG] %s : thread %x exit / lba %x / buffer %x / cycle %d\n", 233 __FUNCTION__ , this, lba, buffer, cycle ); 234 #endif 205 235 206 236 // return I/O operation status from calling thread descriptor
Note: See TracChangeset
for help on using the changeset viewer.