From: Lionel Sambuc Date: Mon, 1 Sep 2014 14:17:18 +0000 (+0200) Subject: Make the kernel less chatty X-Git-Tag: v3.3.0~27 X-Git-Url: http://zhaoyanbai.com/repos/icons/jhe061.png?a=commitdiff_plain;h=da9af514b56b48cf4ed3843769d88a6a6b54eb2d;p=minix.git Make the kernel less chatty Change some messages from always printed to varying level of the "verbose" argument. Change-Id: I6899268aa895c66e72806ca4d02bb53a0e4ea785 --- diff --git a/minix/kernel/arch/i386/acpi.c b/minix/kernel/arch/i386/acpi.c index 7770f336c..2ab8995db 100644 --- a/minix/kernel/arch/i386/acpi.c +++ b/minix/kernel/arch/i386/acpi.c @@ -60,7 +60,7 @@ static int acpi_check_signature(const char * orig, const char * match) static u32_t acpi_phys2vir(u32_t p) { if(!vm_running) { - printf("acpi: returning 0x%lx as vir addr\n", p); + DEBUGEXTRA(("acpi: returning 0x%lx as vir addr\n", p)); return p; } panic("acpi: can't get virtual address of arbitrary physical address"); @@ -304,7 +304,7 @@ static void acpi_init_poweroff(void) exit: if (msg) { - printf("acpi: %s\n", msg); + DEBUGBASIC(("acpi: %s\n", msg)); } } diff --git a/minix/kernel/arch/i386/arch_clock.c b/minix/kernel/arch/i386/arch_clock.c index ba7af4d0f..6c5fffdc5 100644 --- a/minix/kernel/arch/i386/arch_clock.c +++ b/minix/kernel/arch/i386/arch_clock.c @@ -136,7 +136,7 @@ int init_local_timer(unsigned freq) tsc_per_ms[cpu] = (unsigned long)(cpu_get_freq(cpu) / 1000); lapic_set_timer_one_shot(1000000 / system_hz); } else { - BOOT_VERBOSE(printf("Initiating legacy i8253 timer\n")); + DEBUGBASIC(("Initiating legacy i8253 timer\n")); #else { #endif diff --git a/minix/kernel/arch/i386/arch_system.c b/minix/kernel/arch/i386/arch_system.c index edffee577..194dd1dae 100644 --- a/minix/kernel/arch/i386/arch_system.c +++ b/minix/kernel/arch/i386/arch_system.c @@ -271,10 +271,10 @@ void arch_init(void) #if defined(USE_APIC) && !defined(CONFIG_SMP) if (config_no_apic) { - BOOT_VERBOSE(printf("APIC disabled, using legacy PIC\n")); + DEBUGBASIC(("APIC disabled, using legacy PIC\n")); } else if (!apic_single_cpu_init()) { - BOOT_VERBOSE(printf("APIC not present, using legacy PIC\n")); + DEBUGBASIC(("APIC not present, using legacy PIC\n")); } #endif diff --git a/minix/kernel/arch/i386/memory.c b/minix/kernel/arch/i386/memory.c index 320dbe12f..17a97dd84 100644 --- a/minix/kernel/arch/i386/memory.c +++ b/minix/kernel/arch/i386/memory.c @@ -939,13 +939,13 @@ int arch_phys_map_reply(const int index, const vir_bytes addr) /* select the right set of IPC routines to map into processes */ if(minix_feature_flags & MKF_I386_INTEL_SYSENTER) { - printf("kernel: selecting intel sysenter ipc style\n"); + DEBUGBASIC(("kernel: selecting intel sysenter ipc style\n")); minix_kerninfo.minix_ipcvecs = &minix_ipcvecs_sysenter; } else if(minix_feature_flags & MKF_I386_AMD_SYSCALL) { - printf("kernel: selecting amd syscall ipc style\n"); + DEBUGBASIC(("kernel: selecting amd syscall ipc style\n")); minix_kerninfo.minix_ipcvecs = &minix_ipcvecs_syscall; } else { - printf("kernel: selecting fallback (int) ipc style\n"); + DEBUGBASIC(("kernel: selecting fallback (int) ipc style\n")); minix_kerninfo.minix_ipcvecs = &minix_ipcvecs_softint; } diff --git a/minix/kernel/main.c b/minix/kernel/main.c index cf59c09b0..68b531541 100644 --- a/minix/kernel/main.c +++ b/minix/kernel/main.c @@ -141,7 +141,7 @@ void kmain(kinfo_t *local_cbi) arch_ser_init(); #endif /* We can talk now */ - printf("MINIX booting\n"); + DEBUGBASIC(("MINIX booting\n")); /* Kernel may use bits of main memory before VM is started */ kernel_may_alloc = 1; @@ -299,10 +299,10 @@ void kmain(kinfo_t *local_cbi) #ifdef CONFIG_SMP if (config_no_apic) { - BOOT_VERBOSE(printf("APIC disabled, disables SMP, using legacy PIC\n")); + DEBUGBASIC(("APIC disabled, disables SMP, using legacy PIC\n")); smp_single_cpu_fallback(); } else if (config_no_smp) { - BOOT_VERBOSE(printf("SMP disabled, using legacy PIC\n")); + DEBUGBASIC(("SMP disabled, using legacy PIC\n")); smp_single_cpu_fallback(); } else { smp_init(); @@ -505,7 +505,7 @@ void cpu_print_freq(unsigned cpu) u64_t freq; freq = cpu_get_freq(cpu); - printf("CPU %d freq %lu MHz\n", cpu, (unsigned long)(freq / 1000000)); + DEBUGBASIC(("CPU %d freq %lu MHz\n", cpu, (unsigned long)(freq / 1000000))); } int is_fpu(void) diff --git a/releasetools/gen_uEnv.txt.sh b/releasetools/gen_uEnv.txt.sh index 3ef25d1ed..2bfe6d6fd 100755 --- a/releasetools/gen_uEnv.txt.sh +++ b/releasetools/gen_uEnv.txt.sh @@ -24,7 +24,7 @@ BOOT="mmcbootcmd" #default for the beagleboard-xM CONSOLE=tty02 #verbosity -VERBOSE=3 +VERBOSE=0 HZ=1000 while getopts "c:v:h:p:n?" c