Lines Matching defs:log

3  * Decription: TEE Logging Subsystem, read the tee os log from log memory
41 /* for log item ----------------------------------- */
48 #define LOGGER_LOG_TEEOS "teelog" /* tee os log */
63 /* set the log reader pos to current pos */
89 #define CONFIG_TEE_LOG_ACHIVE_PATH "/data/log/tee/last_teemsg"
98 /* 64 byte head + user log */
104 unsigned short real_len; /* log real len */
105 unsigned short buffer_len; /* log buffer's len, multiple of 32 bytes */
110 unsigned char new_line; /* '\n' char, easy viewing log in bbox.bin file */
114 /* --- for log mem --------------------------------- */
123 * last_pos : current log's end position, last log's start position.
132 /* [0] is magic failed, [1] is serial_no failed, used fior log retention feature */
149 struct list_head logs; /* log channels list */
150 struct miscdevice misc_device; /* misc device log */
151 struct list_head readers; /* log's readers */
157 struct tlogger_log *log; /* tlogger_log info data */
158 struct list_head list; /* log entry in tlogger_log's list */
182 return reader->log;
279 struct tlogger_log *log = NULL;
283 log = reader->log;
284 if (!log)
287 buffer_tmp = (struct log_buffer*)log->buffer_info;
294 mutex_lock(&log->mutex_info);
297 mutex_unlock(&log->mutex_info);
471 tlogd("wake up write tz log\n");
480 struct tlogger_log *log = NULL;
482 list_for_each_entry(log, &m_log_list, logs) {
483 if (log->misc_device.minor == minor)
484 return log;
493 struct tlogger_log *log = NULL;
503 tlogd("Before get log from minor\n");
504 log = get_tlogger_log_by_minor(MINOR(inode->i_rdev));
505 if (!log)
512 reader->log = log;
523 mutex_lock(&log->mutex_info);
524 list_add_tail(&reader->list, &log->readers);
526 mutex_unlock(&log->mutex_info);
540 struct tlogger_log *log = NULL;
555 log = reader->log;
556 if (!log) {
557 tloge("log is null\n");
561 mutex_lock(&log->mutex_info);
565 mutex_unlock(&log->mutex_info);
581 struct tlogger_log *log = NULL;
597 log = reader->log;
598 if (!log) {
599 tloge("log is null\n");
603 buffer = (struct log_buffer*)log->buffer_info;
609 poll_wait(file, &log->wait_queue_head, wait);
621 struct tlogger_log *log = NULL;
628 log = reader->log;
629 if (!log)
632 buffer = (struct log_buffer*)log->buffer_info;
722 tloge("log pool size error\n");
736 tloge("log pool size error\n");
742 tloge("log pool addr error\n");
827 tloge("log pool paddr error\n");
833 tloge("log pool addr or size error\n");
839 * the struct log_buffer magic field use for log retention feature,
840 * if hit the magic, will retain the old log before reset in log pool,
841 * or will memset log pool.
867 struct tlogger_log *log = NULL;
873 log = get_reader_log(file);
874 if (!log) {
875 tloge("log is null\n");
880 mutex_lock(&log->mutex_info);
911 mutex_unlock(&log->mutex_info);
941 struct tlogger_log *log = NULL;
945 log = kzalloc(sizeof(*log), GFP_KERNEL);
946 if (ZERO_OR_NULL_PTR((unsigned long)(uintptr_t)log)) {
950 log->buffer_info = buffer;
951 log->misc_device.minor = MISC_DYNAMIC_MINOR;
952 log->misc_device.name = kstrdup(log_name, GFP_KERNEL);
953 if (!log->misc_device.name) {
958 log->misc_device.fops = &g_logger_fops;
959 log->misc_device.parent = NULL;
961 init_waitqueue_head(&log->wait_queue_head);
962 INIT_LIST_HEAD(&log->readers);
963 mutex_init(&log->mutex_info);
964 INIT_LIST_HEAD(&log->logs);
965 list_add_tail(&log->logs, &m_log_list);
967 /* register misc device for this log */
968 ret = misc_register(&log->misc_device);
971 log->misc_device.name);
974 g_log = log;
978 if (log->misc_device.name)
979 kfree(log->misc_device.name);
981 kfree(log);
1285 /* copy logs from log memory, then parse the logs */
1318 /* trigger write teeos log */
1368 tloge("Send log mem info failed\n");
1378 tloge("register log mem failed %x\n", ret);
1382 tloge("teeos register exception to log module failed\n");
1390 tloge("log mem init error, too small len:0x%x\n", mem_len);