/** * @brief This function initializes the global variable for measuring stack depth * * @return none * * @author SongHo Yoon * @version 1.0.0 * */ PUBLIC VOID FSR_DBG_InitStackDepth(VOID) { gnMaxStackDepth = 0; gnCurStackDepth = 0; gbRecordStart = FALSE32; FSR_OAM_MEMSET(gszStackStartMsg, 0x00, MAX_STACK_FUNCNAME); FSR_OAM_MEMSET(gszStackEndMsg, 0x00, MAX_STACK_FUNCNAME); FSR_OAM_MEMSET(gszStackStartMsgTmp, 0x00, MAX_STACK_FUNCNAME); FSR_OAM_MEMSET(gszStackEndMsgTmp, 0x00, MAX_STACK_FUNCNAME); }
/** * fsr_init - [Init] initalize the fsr */ static int __init fsr_init(void) { int error; DECLARE_TIMER; /*initialize global array*/ START_TIMER(); DEBUG(DL3,"TINY[I]\n"); #if defined(FSR_OAM_ALL_DBGMSG) FSR_DBG_SetDbgZoneMask(FSR_DBZ_ALL_ENABLE); #endif FSR_OAM_MEMSET(vol_spec, 0x00, sizeof(FSRVolSpec) * FSR_MAX_VOLUMES); FSR_OAM_MEMSET(part_spec, 0x00, sizeof(FSRPartI) * FSR_MAX_VOLUMES); error = FSR_BML_Init(FSR_BML_FLAG_NONE); STOP_TIMER("BML_Init"); if (error != FSR_BML_SUCCESS && error != FSR_BML_ALREADY_INITIALIZED) { ERRPRINTK("Tiny BML_Init: error (%x)\n", error); ERRPRINTK("Check the PAM module\n"); return -ENXIO; } /* call init bml block device */ if(bml_block_init()) { ERRPRINTK("Tiny BML_Block init: error (%x)\n", error); return -ENXIO; } DEBUG(DL3,"TINY[O]\n"); return 0; }