4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-03-04 03:05:27 +08:00

[components/vmm]remove log_trace item from vmm

This commit is contained in:
yangjie 2019-04-23 14:01:55 +08:00
parent 36c78e5480
commit 3ebd59f41d
2 changed files with 1 additions and 23 deletions

View File

@ -24,14 +24,6 @@ extern void rt_application_init(void);
void vmm_entry(struct vmm_entry_param* param) SECTION(".vmm_init"); void vmm_entry(struct vmm_entry_param* param) SECTION(".vmm_init");
#ifdef RT_USING_LOGTRACE
#include <log_trace.h>
static struct log_trace_session _lgs = {
.id = {.name = "vmm"},
.lvl = LOG_TRACE_LEVEL_VERBOSE,
};
#endif
struct rt_thread vmm_thread SECTION(".bss.share.vmm"); struct rt_thread vmm_thread SECTION(".bss.share.vmm");
extern rt_uint8_t vmm_stack_start; extern rt_uint8_t vmm_stack_start;
extern rt_uint8_t vmm_stack_end; extern rt_uint8_t vmm_stack_end;
@ -122,15 +114,6 @@ void vmm_entry(struct vmm_entry_param *param)
/* init board */ /* init board */
rt_hw_board_init(); rt_hw_board_init();
#ifdef RT_USING_LOGTRACE
/* Some parts of VMM use log_trace, so we need to init it right after
* board_init. */
log_trace_init();
log_trace_set_device(RT_CONSOLE_DEVICE_NAME);
log_trace_register_session(&_lgs);
#endif
/* show version */ /* show version */
rt_show_version(); rt_show_version();
rt_kprintf("share ctx: %p(%x)\n", rt_kprintf("share ctx: %p(%x)\n",

View File

@ -30,18 +30,13 @@ unsigned long vmm_find_iomap_by_pa(unsigned long pa);
void vmm_vector_init(void); void vmm_vector_init(void);
#ifndef RT_USING_LOGTRACE
/* If the rshell is run, we could not rt_kprintf in some situation because /* If the rshell is run, we could not rt_kprintf in some situation because
* write to a vbus channel *Would BLOCK*. So we cannot use it in interrupt * write to a vbus channel *Would BLOCK*. So we cannot use it in interrupt
* context, we cannot use it within the context of idle(vmm). */ * context, we cannot use it within the context of idle(vmm). */
#define vmm_debug(fmt, ...) #define vmm_debug(fmt, ...)
#define vmm_verbose(fmt, ...) #define vmm_verbose(fmt, ...)
#define vmm_info(fmt, ...) #define vmm_info(fmt, ...)
#else // have RT_USING_LOGTRACE
#define vmm_debug(fmt, ...) log_trace(LOG_TRACE_DEBUG "[vmm]"fmt, ##__VA_ARGS__)
#define vmm_verbose(fmt, ...) log_trace(LOG_TRACE_VERBOSE"[vmm]"fmt, ##__VA_ARGS__)
#define vmm_info(fmt, ...) log_trace(LOG_TRACE_INFO "[vmm]"fmt, ##__VA_ARGS__)
#endif // RT_USING_LOGTRACE
#endif #endif
#define ARRAY_SIZE(ar) (sizeof(ar)/sizeof(ar[0])) #define ARRAY_SIZE(ar) (sizeof(ar)/sizeof(ar[0]))