Archived
14
0
Fork 0
Commit graph

88576 commits

Author SHA1 Message Date
Yinghai Lu
282bfe21cf x86: show apicid for cpu in proc
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Yinghai Lu
a706221186 x86: fix amd_detect_cmp
for system with apicid lifting, boot cpu apicid will be 4

got:

  CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
  CPU: L2 Cache: 512K (64 bytes/line)
  CPU 0/4 -> Node 0
  CPU: Physical Processor ID: 1
  CPU: Processor Core ID: 0

so try to offset apicid back before get phys_proc_id with bits shift.
then we can get correct socket ID

also remove remove cpu_data(0) reference.

because cpu_data(0) only be ready after smp_prepare_cpus with the assignment
from boot_cpu_data to current_cpu_data aka cpu_data(0).

and check_bugs()==>identify_cpu(&boot_cpu_data) is quite before than
smp_prepare_cpus. So just use boot_cpu_id instead.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Ingo Molnar
97b44ae6cd x86: add KERN_INFO to show_unhandled_signals printout
Before:
   total: 0 errors, 1 warnings, 678 lines checked
After:
   total: 0 errors, 0 warnings, 678 lines checked

No code changed:

arch/x86/kernel/signal_32.o:

   text	   data	    bss	    dec	    hex	filename
   5333	      0	      4	   5337	   14d9	signal_32.o.before
   5336	      0	      4	   5340	   14dc	signal_32.o.after

md5:
   c279e98012a2808e90cfa2a7787e42a4  signal_32.o.before.asm
   c279e98012a2808e90cfa2a7787e42a4  signal_32.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Ingo Molnar
eee6dd1572 x86: move extern declaration to vdso.h
Before:
   total: 0 errors, 3 warnings, 685 lines checked
After:
   total: 0 errors, 1 warnings, 678 lines checked

No code changed:

arch/x86/kernel/signal_32.o:

   text	   data	    bss	    dec	    hex	filename
   5333	      0	      4	   5337	   14d9	signal_32.o.before
   5333	      0	      4	   5337	   14d9	signal_32.o.after

md5:
   c279e98012a2808e90cfa2a7787e42a4  signal_32.o.before.asm
   c279e98012a2808e90cfa2a7787e42a4  signal_32.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Ingo Molnar
7e907f4898 x86: clean up arch/x86/kernel/signal_32.c
Before:
   total: 21 errors, 6 warnings, 665 lines checked
After:
   total: 0 errors, 3 warnings, 685 lines checked

No code changed:

arch/x86/kernel/signal_32.o:

   text	   data	    bss	    dec	    hex	filename
   5333	      0	      4	   5337	   14d9	signal_32.o.before
   5333	      0	      4	   5337	   14d9	signal_32.o.after

md5:
   c279e98012a2808e90cfa2a7787e42a4  signal_32.o.before.asm
   c279e98012a2808e90cfa2a7787e42a4  signal_32.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Ingo Molnar
a711317021 x86: remove DEBUG_SIG
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Joe Perches
c1db29dbc7 x86: arch/x86/kernel/cpu/feature_names.c - use angle brackets for include
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Joe Perches
16281a998d x86: include/asm-x86/mutex_32.h - use angle brackets for include
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Ingo Molnar
f668964ea1 x86: clean up i387.c
minor coding style cleanups.

Before:
   total: 0 errors, 3 warnings, 479 lines checked
After:
   total: 0 errors, 1 warnings, 483 lines checked

No code changed:

arch/x86/kernel/i387.o:

   text	   data	    bss	    dec	    hex	filename
   2379	      4	      8	   2391	    957	i387.o.before
   2379	      4	      8	   2391	    957	i387.o.after

md5:
   e1434553a3b4ff1f52ad97a68b1fad8a  i387.o.before.asm
   e1434553a3b4ff1f52ad97a68b1fad8a  i387.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Ingo Molnar
ca9cda2f7b x86: add comments to processor.h
add comments to the FPU structures of processor.h.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Glauber Costa
e104383fbf x86: use cpu_relax instead of rep_nop
This is done for smpboot_32.c

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Glauber Costa
e90009bcc1 x86: use wait_for_init_deassert in x86_64
wraps the busy loop for wait_for_init_deasserted() in a function,
so smp_callin in x86_64 looks like more i386

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Glauber Costa
91718e8d13 x86: unify setup_trampoline
setup_trampoline() looks very similar between architectures, and this
patch unifies them. The i386 version allocates bootmem memory, while
the x86_64 version uses a fixed address.

In this patch, we initialize the global trampoline_base to the x86_64 version,
and i386 allocation can later override it.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Glauber Costa
da522b0729 x86: adapt voyager's setup_trampoline
make setup_trampoline non-static. This way, it won't conflict
with the extern declaration in smp.h

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Glauber Costa
d507897b2f x86: adapt voyager's trampoline_base
Change voyager's trampoline base to unsigned char *
instead of u32. This way, it won't conflict with
the other architectures when including smp.h

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:57 +02:00
Glauber Costa
4206882939 x86: move trampoline arrays extern definition to smp.h
In here, they can serve both architectures

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
89b08200ad x86: make x86_64 accept the max_cpus parameter
The parameter passing parsing is done in the common smpboot.c

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
69c18c15d3 x86: merge __cpu_disable and cpu_die
They are now equal, and are moved to a common file

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
e9a6cb96fa x86: do not clear cpu_online_map
it was already cleared two lines above, and so, this removal
is bogus

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
045f9d2202 x86: use remove_from_maps in cpu_disable
it is already used in x86_64. In i386, it only
removes from cpu_online_map

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
fc25da9ec6 x86: remove vector_lock around cpu_online_map
This lock does not protect cpu_online_map, so its
length can be shortened, and in some cases, removed.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
70708a18e8 x86: move cpu_coregroup_map to common file
it is equal between architectures

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
768d95051b x86: move sibling functions to common file
set_cpu_sibling_map() and remove_sibling_info() are
equal between architectures, and are now moved to common
file

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
1dbb4726fa x86: move hotplug related extern definitions to smp.h
definitions that are inside CONFIG_HOTPLUG_CPU in
the arch-specific smp*.h files are moved to common
header

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
61d5989973 x86: make remove_siblinginfo non-static
this is done to match i386

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
1452207689 x86: make set_cpu_sibling_map nonstatic
And move its extern definition to smp.h, the common header

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
a355352b97 x86: move equal types to common file
move definitions that are now equal in type from
smpboot_{32,64}.c to smpboot.c

cpu_callin_map is put temporarily in smp_64.h (already
exists in smp_32.h), and will soon be merged.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
5382e89670 x86: adjust types in smpcommon_32.c
so they can have the same type as x86_64

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
fe6762030c x86: remove cpu_llc_id from processor.h
it is already defined in smp.h

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
0941ecb55f x86: get rid of smp_32.c and smp_64.c
This patch merges the copyright notices, and valuable
comments that were left back on smp_{32,64}.c. With that,
files are empty, and are deleted

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
c048fdfe61 x86: create tlb files
this patch creates tlb_32.c and tlb_64.c, with
tlb-related functions that used to live in smp*.c files.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
8202350367 x86: create ipi.c
This patch moves all ipi and apic related functions
from smp_32.c to ipi.c

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
f9e47a126b x86: create smp.c
this patch moves all the functions and data structures that look
like exactly the same from smp_{32,64}.c to smp.c

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
377d698426 x86: unify smp_send_stop
function definition is moved to common header.
x86_64 version is now called native_smp_send_stop

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:56 +02:00
Glauber Costa
321183c145 x86: add reboot_force test to native_smp_send_stop
This can be safely added to i386. After that,
functions look exactly the same for both arches

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:55 +02:00
Glauber Costa
3be5b49e8f x86: make stop_this_cpu looks exactly equal in both arches
with the hlt_works change, it is possible to have i386
and x86_64 stop_this_cpu() looking exactly the same. They
can, after that, be merged.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:55 +02:00
Glauber Costa
3d3f487c58 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>
2008-04-17 17:40:55 +02:00
Glauber Costa
2513926c28 x86: change x86_64 smp_call_function_mask to look alike i386
the two versions (the inner version, and the outer version, that takes
the locks) of smp_call_function_mask are made into one. With the changes,
i386 and x86_64 versions look exactly the same.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:55 +02:00
Glauber Costa
3a36d1e435 x86: provide __smp_call_function
This function is used in smp_send_stop(). It's like
smp_call_function_mask, but always go to all online cpus,
and does not take any locks.

It is added to x86_64, but will soon be unified in a common file

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:55 +02:00
Glauber Costa
e32640a2cd x86: create smpcommon.c
This patch creates smpcommon.c with functions that are
equal between architectures. The i386-only init_gdt
is ifdef'd.

Note that smpcommon.o figures twice in the Makefile:
this is because sub-architectures like voyager that does
not use the normal smp_$(BITS) files also have to access them

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:55 +02:00
Glauber Costa
3428f3d6ca x86: remove irqs disabled warning.
there's already a warning in the topmost function

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:55 +02:00
Glauber Costa
7930e53422 x86: remove export for smp_call_function_mask.
with this removal, exports for both i386 and x86_64,
regarding the "smp_call_function" series are now the same.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:54 +02:00
Glauber Costa
68a1c3f8cd x86: move prefill_possible_map to common file
this patches moves prefill_possible_map() to smpboot.c
Right now it is x86_64-specific, but nothing intrinsically
prevents it to be used by i386

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:53 +02:00
Glauber Costa
7b1292e237 x86: use disabled_cpus in i386
this patch allows a cpu to be marked as present but disabled in i386,
just as x86_64 currently does.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:53 +02:00
Glauber Costa
93b016f8f3 x86: move disabled_cpus to common header
disabled_cpus is (up to now) a x86_64-only contruction.
But it's extern declaration can be moved to common header anyway

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:53 +02:00
Glauber Costa
c559764923 x86: unify smp_cpus_done
definition is moved to common header. x86_64 version is now called
native_smp_cpus_done

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:53 +02:00
Glauber Costa
7557da6720 x86: unify smp_prepare_cpus
definition is moved to common header. x86_64 version is now called
native_smp_prepare_cpus

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:53 +02:00
Glauber Costa
1e3fac83da x86: unify prepare_boot_cpu
definition is moved to common header. x86_64 version is now called
native_prepare_boot_cpu

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:53 +02:00
Glauber Costa
71d195492a x86: unify __cpu_up.
function definition is moved to common header. x86_64 version
is now called native_cpu_up

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:53 +02:00
Glauber Costa
64b1a21e09 x86: unify smp_call_function_mask
definition is moved to common header, x86_64 function name
now is native_smp_call_function_mask

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-17 17:40:53 +02:00