x86: cpu/cpu.h cleanup
PATCH 1/1 x86: cpu/cpu.h cleanup
Hello Ingo,
Is it worth to move arch/x86/kernel/cpu/cpu.h data to asm/cpu.h and if required we can also make it private like:
#ifdef __KERNEL__
#ifndef MODULE
private data for kernel only
#endif
#endif
By this way we move header files to include directory. Or you have some better option.
From: Jaswinder Singh Rajput <[email protected]>
Date: Sun, 22 Mar 2009 13:28:39 +0530
Subject: [PATCH] x86: cpu/cpu.h cleanup
Impact: cleanup
- Fix various style issues
--- arch/x86/kernel/cpu/cpu.h | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
arch/x86/kernel/cpu/cpu.h +10 -10
@@ -3,25 +3,25 @@#define ARCH_X86_CPU_H struct cpu_model_info { -int vendor; -int family; -const char *model_names[16 ]; +int vendor; +int family; +const char *model_names[16 ]; };/* attempt to consolidate cpu attributes */ struct cpu_dev { -const char * c_vendor; +const char *c_vendor;/* some have two possibilities for cpuid string */ -const char * c_ident[2 ]; +const char *c_ident[2 ];struct cpu_model_info c_models[4 ]; -void (*c_early_init)(struct cpuinfo_x86 *c); -void (*c_init)(struct cpuinfo_x86 * c); -void (*c_identify)(struct cpuinfo_x86 * c); -unsigned int (*c_size_cache)(struct cpuinfo_x86 * c,unsigned int size); -int c_x86_vendor; +void (*c_early_init)(struct cpuinfo_x86 *); +void (*c_init)(struct cpuinfo_x86 *); +void (*c_identify)(struct cpuinfo_x86 *); +unsigned int (*c_size_cache)(struct cpuinfo_x86 *,unsigned int ); +int c_x86_vendor; };#define cpu_dev_register (cpu_devX) \
Signature · 1 line
1.6.0.6
Quoted 10 lines · Jaswinder Singh Rajput
Is it worth to move
arch/x86/kernel/cpu/cpu.hdata toasm/cpu.hand if required we can also make it private like:
#ifdef__KERNEL__
#ifndef MODULE
private data for kernel only
#endif
#endifBy this way we move header files to include directory. Or you have some better option.
There is no option at all. The header files which are in source directories stay just where they are.
They are there for a reason. Have you even looked which files include arch/x86/kernel/cpu/cpu.h ?
Thanks,
tglx