]> Zhao Yanbai Git Server - minix.git/commitdiff
Make the kernel less chatty 04/2804/1
authorLionel Sambuc <lionel@minix3.org>
Mon, 1 Sep 2014 14:17:18 +0000 (16:17 +0200)
committerLionel Sambuc <lionel@minix3.org>
Mon, 1 Sep 2014 14:36:26 +0000 (16:36 +0200)
Change some messages from always printed to varying level of the "verbose"
argument.

Change-Id: I6899268aa895c66e72806ca4d02bb53a0e4ea785

minix/kernel/arch/i386/acpi.c
minix/kernel/arch/i386/arch_clock.c
minix/kernel/arch/i386/arch_system.c
minix/kernel/arch/i386/memory.c
minix/kernel/main.c
releasetools/gen_uEnv.txt.sh

index 7770f336cf75eb7ad48008c573b2454d9c7dec2b..2ab8995db75742be7eb047d5bb132a4e1fd5ef72 100644 (file)
@@ -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));
        }
 }
 
index ba7af4d0f70dbc9a483acf610e64a52625ac2a14..6c5fffdc5600b488b5fe75315400fcd3485b8dbb 100644 (file)
@@ -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
index edffee577b676c6aa1529dab610652adefb393ae..194dd1daeb763d73b791fa98148e4eebdca2fb6e 100644 (file)
@@ -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
 
index 320dbe12f6c34c6318055fb74aaeeeb37f9d239b..17a97dd84ccd7857e213c4ef856be4d97a0f115e 100644 (file)
@@ -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;
                }
 
index cf59c09b0d78f5efcc9af2bb8d47135b386eecb8..68b5315411360b2c8e9a998a82804b9d80b18f7a 100644 (file)
@@ -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)
index 3ef25d1ed176c62d4363fc480e2ff99faa3e7221..2bfe6d6fdbe541e2f7847b976d80b313c83ffddf 100755 (executable)
@@ -24,7 +24,7 @@ BOOT="mmcbootcmd"
 #default for the beagleboard-xM
 CONSOLE=tty02 
 #verbosity
-VERBOSE=
+VERBOSE=0
 HZ=1000
 
 while getopts "c:v:h:p:n?" c