]> Zhao Yanbai Git Server - minix.git/commitdiff
procfs: compile in x86 support only for x86 target 83/2883/2
authorDavid van Moolenbroek <david@minix3.org>
Wed, 5 Nov 2014 14:07:38 +0000 (14:07 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Wed, 12 Nov 2014 12:13:23 +0000 (12:13 +0000)
Issue reported by Emmanuel Blot.

Change-Id: I7f5b1b65273e6ac841d5451e0be7b0e1c92d537c

minix/fs/procfs/cpuinfo.c

index cdf28ac9d01b5cfc6aa13e9fff81d6e20f708956..3d7d5a7bacd64732024c384b666b0e89f26bd563 100644 (file)
@@ -1,10 +1,13 @@
 #include "inc.h"
+#if defined(__i386__)
 #include "../../kernel/arch/i386/include/archconst.h"
+#endif
 
 #ifndef CONFIG_MAX_CPUS
 #define CONFIG_MAX_CPUS        1
 #endif
 
+#if defined(__i386__)
 static const char * x86_flag[] = {
        "fpu",
        "vme",
@@ -72,7 +75,7 @@ static const char * x86_flag[] = {
        "",
 };
 
-static void print_cpu_flags(u32_t * flags)
+static void print_x86_cpu_flags(u32_t * flags)
 {
        int i, j;
 
@@ -85,6 +88,7 @@ static void print_cpu_flags(u32_t * flags)
        }
        buf_printf("\n");
 }
+#endif
 
 static void print_cpu(struct cpu_info * cpu_info, unsigned id)
 {
@@ -109,7 +113,7 @@ static void print_cpu(struct cpu_info * cpu_info, unsigned id)
        buf_printf("%-16s: %d\n", "stepping", cpu_info->stepping);
        buf_printf("%-16s: %d\n", "cpu MHz", cpu_info->freq);
        buf_printf("%-16s: ", "flags");
-       print_cpu_flags(cpu_info->flags);
+       print_x86_cpu_flags(cpu_info->flags);
        buf_printf("\n");
 #endif
 }