2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 11:44:01 +08:00

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>
This commit is contained in:
Glauber Costa 2008-03-03 14:12:48 -03:00 committed by Ingo Molnar
parent 2513926c28
commit 3d3f487c58

View File

@ -144,6 +144,15 @@ DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
#define current_cpu_data boot_cpu_data
#endif
static inline int hlt_works(int cpu)
{
#ifdef CONFIG_X86_32
return cpu_data(cpu).hlt_works_ok;
#else
return 1;
#endif
}
#define cache_line_size() (boot_cpu_data.x86_cache_alignment)
extern void cpu_detect(struct cpuinfo_x86 *c);