aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/processor.h
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-03-03 12:12:48 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:55 -0400
commit3d3f487c58ef1ece714af280b29411960908149c (patch)
tree74a117e5cf717a41ed82ca1f752b99fcb9983872 /include/asm-x86/processor.h
parent2513926c286ca1d0d189c206966011bdd4080354 (diff)
x86: provide hlt_works function.
In x86_64, hlt always work. in i386, we'll query the cpuinfo associated with this cpu Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/processor.h')
-rw-r--r--include/asm-x86/processor.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
index 9054734589fe..8bec23c15527 100644
--- a/include/asm-x86/processor.h
+++ b/include/asm-x86/processor.h
@@ -144,6 +144,15 @@ DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
144#define current_cpu_data boot_cpu_data 144#define current_cpu_data boot_cpu_data
145#endif 145#endif
146 146
147static inline int hlt_works(int cpu)
148{
149#ifdef CONFIG_X86_32
150 return cpu_data(cpu).hlt_works_ok;
151#else
152 return 1;
153#endif
154}
155
147#define cache_line_size() (boot_cpu_data.x86_cache_alignment) 156#define cache_line_size() (boot_cpu_data.x86_cache_alignment)
148 157
149extern void cpu_detect(struct cpuinfo_x86 *c); 158extern void cpu_detect(struct cpuinfo_x86 *c);