aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-30 07:31:39 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:31:39 -0500
commit1a53905adddf6cc6d795bd7e988c60a19773f72e (patch)
treec43a3fadda0a7d35185b283bf05727924c9dccf6 /include
parentfc87e9061a5635fe1b367dad95498846dd5eda31 (diff)
x86: move definitions to processor.h
This patch moves definitions that are present in only one of the files (between processor_32.h and processor_64.h), to processor.h. They're mostly structures and function definitions. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/processor.h41
-rw-r--r--include/asm-x86/processor_32.h35
-rw-r--r--include/asm-x86/processor_64.h6
3 files changed, 41 insertions, 41 deletions
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h
index 87466b6d3b92..c6b749a018a7 100644
--- a/include/asm-x86/processor.h
+++ b/include/asm-x86/processor.h
@@ -96,7 +96,12 @@ struct cpuinfo_x86 {
96#define X86_VENDOR_NUM 9 96#define X86_VENDOR_NUM 9
97#define X86_VENDOR_UNKNOWN 0xff 97#define X86_VENDOR_UNKNOWN 0xff
98 98
99/*
100 * capabilities of CPUs
101 */
99extern struct cpuinfo_x86 boot_cpu_data; 102extern struct cpuinfo_x86 boot_cpu_data;
103extern struct cpuinfo_x86 new_cpu_data;
104extern struct tss_struct doublefault_tss;
100 105
101#ifdef CONFIG_SMP 106#ifdef CONFIG_SMP
102DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info); 107DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
@@ -107,11 +112,22 @@ DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
107#define current_cpu_data boot_cpu_data 112#define current_cpu_data boot_cpu_data
108#endif 113#endif
109 114
115void cpu_detect(struct cpuinfo_x86 *c);
116
117extern void identify_cpu(struct cpuinfo_x86 *);
118extern void identify_boot_cpu(void);
119extern void identify_secondary_cpu(struct cpuinfo_x86 *);
110extern void print_cpu_info(struct cpuinfo_x86 *); 120extern void print_cpu_info(struct cpuinfo_x86 *);
111extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); 121extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c);
112extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); 122extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c);
113extern unsigned short num_cache_leaves; 123extern unsigned short num_cache_leaves;
114 124
125#if defined(CONFIG_X86_HT) || defined(CONFIG_X86_64)
126extern void detect_ht(struct cpuinfo_x86 *c);
127#else
128static inline void detect_ht(struct cpuinfo_x86 *c) {}
129#endif
130
115static inline void native_cpuid(unsigned int *eax, unsigned int *ebx, 131static inline void native_cpuid(unsigned int *eax, unsigned int *ebx,
116 unsigned int *ecx, unsigned int *edx) 132 unsigned int *ecx, unsigned int *edx)
117{ 133{
@@ -205,6 +221,11 @@ struct tss_struct {
205 221
206DECLARE_PER_CPU(struct tss_struct, init_tss); 222DECLARE_PER_CPU(struct tss_struct, init_tss);
207 223
224/* Save the original ist values for checking stack pointers during debugging */
225struct orig_ist {
226 unsigned long ist[7];
227};
228
208#ifdef CONFIG_X86_32 229#ifdef CONFIG_X86_32
209# include "processor_32.h" 230# include "processor_32.h"
210#else 231#else
@@ -547,8 +568,28 @@ extern void select_idle_routine(const struct cpuinfo_x86 *c);
547 568
548extern unsigned long boot_option_idle_override; 569extern unsigned long boot_option_idle_override;
549 570
571extern void enable_sep_cpu(void);
572extern int sysenter_setup(void);
573
574/* Defined in head.S */
575extern struct desc_ptr early_gdt_descr;
576
577extern void cpu_set_gdt(int);
578extern void switch_to_new_gdt(void);
579extern void cpu_init(void);
580extern void init_gdt(int cpu);
581
582/* from system description table in BIOS. Mostly for MCA use, but
583 * others may find it useful. */
584extern unsigned int machine_id;
585extern unsigned int machine_submodel_id;
586extern unsigned int BIOS_revision;
587extern unsigned int mca_pentium_flag;
588
550/* Boot loader type from the setup header */ 589/* Boot loader type from the setup header */
551extern int bootloader_type; 590extern int bootloader_type;
591
592extern char ignore_fpu_irq;
552#define cache_line_size() (boot_cpu_data.x86_cache_alignment) 593#define cache_line_size() (boot_cpu_data.x86_cache_alignment)
553 594
554#define HAVE_ARCH_PICK_MMAP_LAYOUT 1 595#define HAVE_ARCH_PICK_MMAP_LAYOUT 1
diff --git a/include/asm-x86/processor_32.h b/include/asm-x86/processor_32.h
index fa921aa1a93f..84a4c5e47d57 100644
--- a/include/asm-x86/processor_32.h
+++ b/include/asm-x86/processor_32.h
@@ -18,36 +18,12 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <asm/desc_defs.h> 19#include <asm/desc_defs.h>
20 20
21/*
22 * capabilities of CPUs
23 */
24extern struct cpuinfo_x86 new_cpu_data;
25extern struct tss_struct doublefault_tss;
26 21
27/* 22/*
28 * the following now lives in the per cpu area: 23 * the following now lives in the per cpu area:
29 * extern int cpu_llc_id[NR_CPUS]; 24 * extern int cpu_llc_id[NR_CPUS];
30 */ 25 */
31DECLARE_PER_CPU(u8, cpu_llc_id); 26DECLARE_PER_CPU(u8, cpu_llc_id);
32extern char ignore_fpu_irq;
33
34void __init cpu_detect(struct cpuinfo_x86 *c);
35
36extern void identify_boot_cpu(void);
37extern void identify_secondary_cpu(struct cpuinfo_x86 *);
38
39#ifdef CONFIG_X86_HT
40extern void detect_ht(struct cpuinfo_x86 *c);
41#else
42static inline void detect_ht(struct cpuinfo_x86 *c) {}
43#endif
44
45/* from system description table in BIOS. Mostly for MCA use, but
46others may find it useful. */
47extern unsigned int machine_id;
48extern unsigned int machine_submodel_id;
49extern unsigned int BIOS_revision;
50extern unsigned int mca_pentium_flag;
51 27
52/* 28/*
53 * User space process size: 3GB (default). 29 * User space process size: 3GB (default).
@@ -277,15 +253,4 @@ static inline void prefetchw(const void *x)
277 "r" (x)); 253 "r" (x));
278} 254}
279 255
280extern void enable_sep_cpu(void);
281extern int sysenter_setup(void);
282
283/* Defined in head.S */
284extern struct desc_ptr early_gdt_descr;
285
286extern void cpu_set_gdt(int);
287extern void switch_to_new_gdt(void);
288extern void cpu_init(void);
289extern void init_gdt(int cpu);
290
291#endif /* __ASM_I386_PROCESSOR_H */ 256#endif /* __ASM_I386_PROCESSOR_H */
diff --git a/include/asm-x86/processor_64.h b/include/asm-x86/processor_64.h
index 1a258749b7ca..45e382989b33 100644
--- a/include/asm-x86/processor_64.h
+++ b/include/asm-x86/processor_64.h
@@ -17,8 +17,6 @@
17#include <linux/personality.h> 17#include <linux/personality.h>
18#include <asm/desc_defs.h> 18#include <asm/desc_defs.h>
19 19
20extern void identify_cpu(struct cpuinfo_x86 *);
21
22/* 20/*
23 * User space process size. 47bits minus one guard page. 21 * User space process size. 47bits minus one guard page.
24 */ 22 */
@@ -51,10 +49,6 @@ union i387_union {
51 struct i387_fxsave_struct fxsave; 49 struct i387_fxsave_struct fxsave;
52}; 50};
53 51
54/* Save the original ist values for checking stack pointers during debugging */
55struct orig_ist {
56 unsigned long ist[7];
57};
58DECLARE_PER_CPU(struct orig_ist, orig_ist); 52DECLARE_PER_CPU(struct orig_ist, orig_ist);
59 53
60#define INIT_THREAD { \ 54#define INIT_THREAD { \