procfs: compile in x86 support only for x86 target
Issue reported by Emmanuel Blot. Change-Id: I7f5b1b65273e6ac841d5451e0be7b0e1c92d537c
This commit is contained in:
parent
a8a812ef6a
commit
7ee000e54a
@ -1,10 +1,13 @@
|
|||||||
#include "inc.h"
|
#include "inc.h"
|
||||||
|
#if defined(__i386__)
|
||||||
#include "../../kernel/arch/i386/include/archconst.h"
|
#include "../../kernel/arch/i386/include/archconst.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_MAX_CPUS
|
#ifndef CONFIG_MAX_CPUS
|
||||||
#define CONFIG_MAX_CPUS 1
|
#define CONFIG_MAX_CPUS 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__i386__)
|
||||||
static const char * x86_flag[] = {
|
static const char * x86_flag[] = {
|
||||||
"fpu",
|
"fpu",
|
||||||
"vme",
|
"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;
|
int i, j;
|
||||||
|
|
||||||
@ -85,6 +88,7 @@ static void print_cpu_flags(u32_t * flags)
|
|||||||
}
|
}
|
||||||
buf_printf("\n");
|
buf_printf("\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void print_cpu(struct cpu_info * cpu_info, unsigned id)
|
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", "stepping", cpu_info->stepping);
|
||||||
buf_printf("%-16s: %d\n", "cpu MHz", cpu_info->freq);
|
buf_printf("%-16s: %d\n", "cpu MHz", cpu_info->freq);
|
||||||
buf_printf("%-16s: ", "flags");
|
buf_printf("%-16s: ", "flags");
|
||||||
print_cpu_flags(cpu_info->flags);
|
print_x86_cpu_flags(cpu_info->flags);
|
||||||
buf_printf("\n");
|
buf_printf("\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user