Yinghai Lu
11fdd252bb
x86: cpu make amd.c more like amd_64.c v2
...
1. make 32bit have early_init_amd_mc and amd_detect_cmp
2. seperate init_amd_k5/k6/k7 ...
v2: fix compiling for !CONFIG_SMP
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-08 15:31:58 +02:00
Jan Beulich
2d9cd6c27f
x86-64: add two __cpuinit annotations
...
Signed-off-by: Jan Beulich <jbeulich@novell.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-06 19:50:41 +02:00
Yinghai Lu
e322423471
x86, cpu init: call early_init_xxx in init_xxx
...
so we:
1. could set some cap to ap
2. restore some cap after memset in identify_cpu for boot cpu
esp for CONSTANT_TSC this matters, as:
before this patch:
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow rep_good nopl pni monitor cx16 lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
after this patch:
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl pni monitor cx16 lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
so constant_tsc is back...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-06 14:09:14 +02:00
Yinghai Lu
1b05d60d60
x86: remove duplicated get_model_name() calling
...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-06 14:09:12 +02:00
Yinghai Lu
bd220a24a9
x86: move nonx_setup etc from common.c to init_64.c
...
like 32 bit put it in init_32.c
Signed-off-by: Yinghai <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 10:23:47 +02:00
Yinghai Lu
102bbe3ab8
x86: cpu/common*.c, merge identify_cpu()
...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:56 +02:00
Yinghai Lu
b89d3b3e2c
x86: cpu/common*.c, merge generic_identify()
...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:55 +02:00
Yinghai Lu
6627d24230
x86: cpu/common*.c, merge early_identify_cpu()
...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:54 +02:00
Yinghai Lu
5122c890ba
x86: cpu/common.c: merge get_cpu_cap()
...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:53 +02:00
Yinghai Lu
1cd78776c7
x86: cpu/common*.c, merge detect_ht()
...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:52 +02:00
Yinghai Lu
140fc72709
x86: cpu/common*.c, merge display_cacheinfo()
...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:51 +02:00
Yinghai Lu
b9e67f0042
x86: cpu/common.c, merge default_init()
...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:50 +02:00
Yinghai Lu
fab334c1d5
x86: cpu/common*.c, merge switch_to_new_gdt()
...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:50 +02:00
Yinghai Lu
1ba76586f7
x86: cpu/common*.c have same cpu_init(), with copying and #ifdef
...
hard to merge by lines... (as here we have material differences between
32-bit and 64-bit mode) - will try to do it later.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:49 +02:00
Yinghai Lu
d5494d4f51
x86: cpu/common*.c, make 32-bit have 64-bit only functions
...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:48 +02:00
Yinghai Lu
ba51dced0b
x86: cpu/common.c, let 64-bit code have 32-bit only functions
...
No effect on 64-bit.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:47 +02:00
Yinghai Lu
950ad7ff6e
x86: same gdt_page with macro
...
Move the 32-bit and 64-bit gdt_page definitions next to each
other, separated with an #ifdef.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:47 +02:00
Yinghai Lu
f0fc4aff1f
x86: make header file the same in arch/x86/kernel/cpu/common_xx.c
...
Make the files more similar in preparation to unification, no
code changed.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:46 +02:00
Yinghai Lu
97e4db7c87
x86: make detect_ht depend on CONFIG_X86_HT
...
64-bit has X86_HT set too, so use that instead of SMP.
This also removes a include/asm-x86/processor.h ifdef.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:40:45 +02:00
Ingo Molnar
d3d0ba7b8f
Merge commit '63cc8c75156462d4b42cbdd76c293b7eee7ddbfe':
...
"percpu: introduce DEFINE_PER_CPU_PAGE_ALIGNED() macro"
into x86/core
Conflicts:
arch/x86/kernel/cpu/common.c
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-05 09:24:30 +02:00
Ingo Molnar
446d27338d
Merge branch 'x86/cpu' into x86/core
2008-09-05 09:19:50 +02:00
Yinghai Lu
0a488a53d7
x86: move 32bit related functions together
...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-04 21:09:47 +02:00
Yinghai Lu
a0854a46c5
x86: make 32bit support show_msr like 64 bit
...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-04 21:09:46 +02:00
Yinghai Lu
10a434fcb2
x86: remove cpu_vendor_dev
...
1. add c_x86_vendor into cpu_dev
2. change cpu_devs to static
3. check c_x86_vendor before put that cpu_dev into array
4. remove alignment for 64bit
5. order the sequence in cpu_devs according to link sequence...
so could put intel at first, then amd...
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-04 21:09:45 +02:00
Yinghai Lu
9d31d35b5f
x86: order functions in cpu/common.c and cpu/common_64.c v2
...
v2: make 64 bit get c->x86_cache_alignment = c->x86_clfush_size
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2008-09-04 21:09:44 +02:00