]> pilppa.com Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agox86: cleanup duplicate includes
Joe Perches [Sun, 9 Mar 2008 19:35:00 +0000 (12:35 -0700)]
x86: cleanup duplicate includes

Signed-off-by: Joe Perches <joe@perches.com>
 arch/x86/kernel/reboot.c      |    1 -
 include/asm-x86/elf.h         |    5 ++---
 include/asm-x86/posix_types.h |    8 +-------
 include/asm-x86/processor.h   |    3 +--
 include/asm-x86/unistd.h      |    8 +-------
 5 files changed, 5 insertions(+), 20 deletions(-)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: coding style fixes to arch/x86/kernel/setup_32.c
Paolo Ciarrocchi [Fri, 7 Mar 2008 18:26:26 +0000 (19:26 +0100)]
x86: coding style fixes to arch/x86/kernel/setup_32.c

Fix:

  ERROR: do not initialise externals to 0 or NULL

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: sort address_markers for dump_pagetables
Yinghai Lu [Sat, 8 Mar 2008 03:17:55 +0000 (19:17 -0800)]
x86: sort address_markers for dump_pagetables

otherwise Vmemmap and High Kernel Mapping string is not showing up.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: introduce initial apicid
Yinghai Lu [Thu, 6 Mar 2008 21:46:39 +0000 (13:46 -0800)]
x86: introduce initial apicid

store initial_apicid from early identify. it is could be different from
phys_proc_id later.

also print it out in /proc/cpuinfo.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: remove mach_reboot.h
Ingo Molnar [Thu, 6 Mar 2008 17:38:52 +0000 (18:38 +0100)]
x86: remove mach_reboot.h

all reboot details are handled in reboot.c and quirks are handled
via reboot_fixups_32.c.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: enhance DEBUG_RODATA support for hotplug and kprobes
Mathieu Desnoyers [Sat, 2 Feb 2008 20:42:20 +0000 (15:42 -0500)]
x86: enhance DEBUG_RODATA support for hotplug and kprobes

Standardize DEBUG_RODATA, removing special cases for hotplug and kprobes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: pageexec@freemail.hu
Cc: akpm@linux-foundation.org
CC: Andi Kleen <andi@firstfloor.org>
CC: pageexec@freemail.hu
CC: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: enhance DEBUG_RODATA support - alternatives
Mathieu Desnoyers [Thu, 6 Mar 2008 13:48:49 +0000 (08:48 -0500)]
x86: enhance DEBUG_RODATA support - alternatives

Fix a memcpy that should be a text_poke (in apply_alternatives).

Use kernel_wp_save/kernel_wp_restore in text_poke to support DEBUG_RODATA
correctly and so the CPU HOTPLUG special case can be removed.

Add text_poke_early, for alternatives and paravirt boot-time and module load
time patching.

Changelog:

- Fix text_set and text_poke alignment check (mixed up bitwise and and or)
- Remove text_set
- Export add_nops, so it can be used by others.
- Document text_poke_early.
- Remove clflush, since it breaks some VIA architectures and is not strictly
  necessary.
- Add kerneldoc to text_poke and text_poke_early.
- Create a second vmap instead of using the WP bit to support Xen and VMI.
- Move local_irq disable within text_poke and text_poke_early to be able to
  be sleepable in these functions.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: Andi Kleen <andi@firstfloor.org>
CC: pageexec@freemail.hu
CC: H. Peter Anvin <hpa@zytor.com>
CC: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: replace remaining __FUNCTION__ occurances
Harvey Harrison [Mon, 3 Mar 2008 19:37:23 +0000 (11:37 -0800)]
x86: replace remaining __FUNCTION__ occurances

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: show apicid for cpu in proc
Yinghai Lu [Thu, 6 Mar 2008 09:13:34 +0000 (01:13 -0800)]
x86: show apicid for cpu in proc

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix amd_detect_cmp
Yinghai Lu [Thu, 6 Mar 2008 09:11:11 +0000 (01:11 -0800)]
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>
16 years agox86: add KERN_INFO to show_unhandled_signals printout
Ingo Molnar [Thu, 6 Mar 2008 09:43:17 +0000 (10:43 +0100)]
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>
16 years agox86: move extern declaration to vdso.h
Ingo Molnar [Thu, 6 Mar 2008 09:39:07 +0000 (10:39 +0100)]
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>
16 years agox86: clean up arch/x86/kernel/signal_32.c
Ingo Molnar [Thu, 6 Mar 2008 09:33:08 +0000 (10:33 +0100)]
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>
16 years agox86: remove DEBUG_SIG
Ingo Molnar [Thu, 6 Mar 2008 09:24:04 +0000 (10:24 +0100)]
x86: remove DEBUG_SIG

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: arch/x86/kernel/cpu/feature_names.c - use angle brackets for include
Joe Perches [Wed, 5 Mar 2008 00:47:00 +0000 (16:47 -0800)]
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>
16 years agox86: include/asm-x86/mutex_32.h - use angle brackets for include
Joe Perches [Wed, 5 Mar 2008 00:46:27 +0000 (16:46 -0800)]
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>
16 years agox86: clean up i387.c
Ingo Molnar [Wed, 5 Mar 2008 14:37:32 +0000 (15:37 +0100)]
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>
16 years agox86: add comments to processor.h
Ingo Molnar [Wed, 5 Mar 2008 14:15:42 +0000 (15:15 +0100)]
x86: add comments to processor.h

add comments to the FPU structures of processor.h.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: use cpu_relax instead of rep_nop
Glauber Costa [Mon, 3 Mar 2008 17:13:14 +0000 (14:13 -0300)]
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>
16 years agox86: use wait_for_init_deassert in x86_64
Glauber Costa [Mon, 3 Mar 2008 17:13:13 +0000 (14:13 -0300)]
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>
16 years agox86: unify setup_trampoline
Glauber Costa [Mon, 3 Mar 2008 17:13:12 +0000 (14:13 -0300)]
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>
16 years agox86: adapt voyager's setup_trampoline
Glauber Costa [Mon, 3 Mar 2008 17:13:11 +0000 (14:13 -0300)]
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>
16 years agox86: adapt voyager's trampoline_base
Glauber Costa [Mon, 3 Mar 2008 17:13:10 +0000 (14:13 -0300)]
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>
16 years agox86: move trampoline arrays extern definition to smp.h
Glauber Costa [Mon, 3 Mar 2008 17:13:09 +0000 (14:13 -0300)]
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>
16 years agox86: make x86_64 accept the max_cpus parameter
Glauber Costa [Mon, 3 Mar 2008 17:13:08 +0000 (14:13 -0300)]
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>
16 years agox86: merge __cpu_disable and cpu_die
Glauber Costa [Mon, 3 Mar 2008 17:13:07 +0000 (14:13 -0300)]
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>
16 years agox86: do not clear cpu_online_map
Glauber Costa [Mon, 3 Mar 2008 17:13:06 +0000 (14:13 -0300)]
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>
16 years agox86: use remove_from_maps in cpu_disable
Glauber Costa [Mon, 3 Mar 2008 17:13:05 +0000 (14:13 -0300)]
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>
16 years agox86: remove vector_lock around cpu_online_map
Glauber Costa [Mon, 3 Mar 2008 17:13:04 +0000 (14:13 -0300)]
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>
16 years agox86: move cpu_coregroup_map to common file
Glauber Costa [Mon, 3 Mar 2008 17:13:03 +0000 (14:13 -0300)]
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>
16 years agox86: move sibling functions to common file
Glauber Costa [Mon, 3 Mar 2008 17:13:02 +0000 (14:13 -0300)]
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>
16 years agox86: move hotplug related extern definitions to smp.h
Glauber Costa [Mon, 3 Mar 2008 17:13:01 +0000 (14:13 -0300)]
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>
16 years agox86: make remove_siblinginfo non-static
Glauber Costa [Mon, 3 Mar 2008 17:13:00 +0000 (14:13 -0300)]
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>
16 years agox86: make set_cpu_sibling_map nonstatic
Glauber Costa [Mon, 3 Mar 2008 17:12:59 +0000 (14:12 -0300)]
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>
16 years agox86: move equal types to common file
Glauber Costa [Mon, 3 Mar 2008 17:12:58 +0000 (14:12 -0300)]
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>
16 years agox86: adjust types in smpcommon_32.c
Glauber Costa [Mon, 3 Mar 2008 17:12:57 +0000 (14:12 -0300)]
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>
16 years agox86: remove cpu_llc_id from processor.h
Glauber Costa [Mon, 3 Mar 2008 17:12:56 +0000 (14:12 -0300)]
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>
16 years agox86: get rid of smp_32.c and smp_64.c
Glauber Costa [Mon, 3 Mar 2008 17:12:55 +0000 (14:12 -0300)]
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>
16 years agox86: create tlb files
Glauber Costa [Mon, 3 Mar 2008 17:12:54 +0000 (14:12 -0300)]
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>
16 years agox86: create ipi.c
Glauber Costa [Mon, 3 Mar 2008 17:12:53 +0000 (14:12 -0300)]
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>
16 years agox86: create smp.c
Glauber Costa [Mon, 3 Mar 2008 17:12:52 +0000 (14:12 -0300)]
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>
16 years agox86: unify smp_send_stop
Glauber Costa [Mon, 3 Mar 2008 17:12:51 +0000 (14:12 -0300)]
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>
16 years agox86: add reboot_force test to native_smp_send_stop
Glauber Costa [Mon, 3 Mar 2008 17:12:50 +0000 (14:12 -0300)]
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>
16 years agox86: make stop_this_cpu looks exactly equal in both arches
Glauber Costa [Mon, 3 Mar 2008 17:12:49 +0000 (14:12 -0300)]
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>
16 years agox86: provide hlt_works function.
Glauber Costa [Mon, 3 Mar 2008 17:12:48 +0000 (14:12 -0300)]
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>
16 years agox86: change x86_64 smp_call_function_mask to look alike i386
Glauber Costa [Mon, 3 Mar 2008 17:12:47 +0000 (14:12 -0300)]
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>
16 years agox86: provide __smp_call_function
Glauber Costa [Mon, 3 Mar 2008 17:12:46 +0000 (14:12 -0300)]
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>
16 years agox86: create smpcommon.c
Glauber Costa [Mon, 3 Mar 2008 17:12:45 +0000 (14:12 -0300)]
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>
16 years agox86: remove irqs disabled warning.
Glauber Costa [Mon, 3 Mar 2008 17:12:44 +0000 (14:12 -0300)]
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>
16 years agox86: remove export for smp_call_function_mask.
Glauber Costa [Mon, 3 Mar 2008 17:12:43 +0000 (14:12 -0300)]
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>
16 years agox86: move prefill_possible_map to common file
Glauber Costa [Mon, 3 Mar 2008 17:12:42 +0000 (14:12 -0300)]
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>
16 years agox86: use disabled_cpus in i386
Glauber Costa [Mon, 3 Mar 2008 17:12:41 +0000 (14:12 -0300)]
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>
16 years agox86: move disabled_cpus to common header
Glauber Costa [Mon, 3 Mar 2008 17:12:40 +0000 (14:12 -0300)]
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>
16 years agox86: unify smp_cpus_done
Glauber Costa [Mon, 3 Mar 2008 17:12:39 +0000 (14:12 -0300)]
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>
16 years agox86: unify smp_prepare_cpus
Glauber Costa [Mon, 3 Mar 2008 17:12:38 +0000 (14:12 -0300)]
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>
16 years agox86: unify prepare_boot_cpu
Glauber Costa [Mon, 3 Mar 2008 17:12:37 +0000 (14:12 -0300)]
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>
16 years agox86: unify __cpu_up.
Glauber Costa [Mon, 3 Mar 2008 17:12:36 +0000 (14:12 -0300)]
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>
16 years agox86: unify smp_call_function_mask
Glauber Costa [Mon, 3 Mar 2008 17:12:35 +0000 (14:12 -0300)]
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>
16 years agox86: merge smp_send_reschedule
Glauber Costa [Mon, 3 Mar 2008 17:12:34 +0000 (14:12 -0300)]
x86: merge smp_send_reschedule

function definition is moved to common header, x86_64 version is now called
native_smp_send_reschedule

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: move smp_ops extern declaration to common header
Glauber Costa [Mon, 3 Mar 2008 17:12:33 +0000 (14:12 -0300)]
x86: move smp_ops extern declaration to common header

the smp_ops symbol is temporarily defined in smp_64.c, but it will soon
be unified

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: define smp_ops in common header
Glauber Costa [Mon, 3 Mar 2008 17:12:32 +0000 (14:12 -0300)]
x86: define smp_ops in common header

x86_64 will benefit from it
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: merge extern variables definitions
Glauber Costa [Mon, 3 Mar 2008 17:12:31 +0000 (14:12 -0300)]
x86: merge extern variables definitions

move extern definitions that are the same between smp_{32,64}.h
to smp.h

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: merge extern function definitions
Glauber Costa [Mon, 3 Mar 2008 17:12:30 +0000 (14:12 -0300)]
x86: merge extern function definitions

move extern function definitions that are the same between smp_{32,64}.h
to smp.h

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: commonize smp.h
Glauber Costa [Mon, 3 Mar 2008 17:12:29 +0000 (14:12 -0300)]
x86: commonize smp.h

this is the first step of integrating smp.h between x86_64
and i386

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix switch_to() clobbers
Ingo Molnar [Wed, 5 Mar 2008 09:46:38 +0000 (10:46 +0100)]
x86: fix switch_to() clobbers

Liu Pingfan noticed that switch_to() clobbers more registers than its
asm constraints specify.

We get away with this due to luck mostly - schedule()
by its nature only has 'local' state which gets reloaded
automatically. Fix it nevertheless, we could hit this anytime.

it turns out that with the extra constraints gcc manages to make
schedule() even more compact:

   text    data     bss     dec     hex filename
  28626     684    2640   31950    7cce sched.o.before
  28613     684    2640   31937    7cc1 sched.o.after

Reported-by: Liu Pingfan <kernelfans@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up switch_to()
Ingo Molnar [Wed, 5 Mar 2008 09:24:37 +0000 (10:24 +0100)]
x86: clean up switch_to()

Make the code more readable and more hackable:

 - use symbolic asm parameters
 - use readable indentation
 - add comments that explains the details

No code changed:

kernel/sched.o:

   text    data     bss     dec     hex filename
  28626     684    2640   31950    7cce sched.o.before
  28626     684    2640   31950    7cce sched.o.after

md5:
   2823d406c18b781975cdb2e7cfea0059  sched.o.before.asm
   2823d406c18b781975cdb2e7cfea0059  sched.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: reserve end-of-conventional-memory to 1MB, 64-bit, use paravirt_enabled
Alexander van Heukelum [Tue, 4 Mar 2008 19:12:28 +0000 (20:12 +0100)]
x86: reserve end-of-conventional-memory to 1MB, 64-bit, use paravirt_enabled

Jeremy Fitzhardinge pointed out that looking at the boot_params
struct to determine if the system is running in a paravirtual
environment is not reliable for the Xen case, currently. He also
points out that there already exists a function to determine if
the system is running in a paravirtual environment. So let's use
that instead. This gets rid of the preprocessor test too.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: reserve end-of-conventional-memory to 1MB, 32-bit, use paravirt_enabled
Alexander van Heukelum [Tue, 4 Mar 2008 18:57:42 +0000 (19:57 +0100)]
x86: reserve end-of-conventional-memory to 1MB, 32-bit, use paravirt_enabled

Jeremy Fitzhardinge pointed out that looking at the boot_params
struct to determine if the system is running in a paravirtual
environment is not reliable for the Xen case, currently. He also
points out that there already exists a function to determine if
the system is running in a paravirtual environment. So let's use
that instead. This gets rid of the preprocessor test too.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: wmb() confusion in system.h
Pavel Machek [Mon, 3 Mar 2008 11:49:09 +0000 (12:49 +0100)]
x86: wmb() confusion in system.h

Comment says wmb is a nop, but it is implemented as lock addl
below... Should it be compiled to nop if we know we are running on
"good" Intel cpu?

At least remove confusing comment for now.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: if we cannot calibrate the TSC, we panic.
Rusty Russell [Tue, 4 Mar 2008 12:07:50 +0000 (23:07 +1100)]
x86: if we cannot calibrate the TSC, we panic.

The current tsc_init() clears the TSC feature bit if the TSC khz
cannot be calculated, causing us to panic in
arch/x86/kernel/cpu/bugs.c check_config().  We should simply mark it
unstable.

Frankly, someone should take an axe to this code.  mark_tsc_unstable()
not only marks it unstable, but sets tsc_enabled to 0, which seems
redundant but is actually important here because means it won't be
used by sched_clock() either.  Perhaps a tristate enum "UNUSABLE,
UNSTABLE, OK" would be clearer, and separate mark_tsc_unstable() and
mark_tsc_broken() functions?

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: debug pmd_bad()
Ingo Molnar [Mon, 3 Mar 2008 08:53:17 +0000 (09:53 +0100)]
x86: debug pmd_bad()

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: redo cded932b75ab0a5f9181e
Ingo Molnar [Mon, 3 Mar 2008 12:55:32 +0000 (13:55 +0100)]
x86: redo cded932b75ab0a5f9181e

redo commit cded932b75ab0a5f9181e.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: warn about RAM pages in ioremap()
Ingo Molnar [Mon, 3 Mar 2008 08:37:41 +0000 (09:37 +0100)]
x86: warn about RAM pages in ioremap()

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: reserve end-of-conventional-memory to 1MB, 64-bit
Alexander van Heukelum [Sat, 1 Mar 2008 16:12:43 +0000 (17:12 +0100)]
x86: reserve end-of-conventional-memory to 1MB, 64-bit

This patch is an add-on to the 64-bit ebda patch. It makes
the functions reserve_ebda_region (renamed from reserve_ebda)
and copy_e820_map equal to the 32-bit versions of the previous
patch.

Changes:

Use u64 and u32 for local variables in copy_e820_map.

The amount of conventional memory and the start of the EBDA are
detected by reading the BIOS data area directly. Paravirtual
environments do not provide this area, so we bail out early
in that case. They will just have to set up a correct memory
map to start with.

Add a safety net for zeroed out BIOS data area.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: reserve_early end-of-conventional-memory to 1MB, 64-bit
Alexander van Heukelum [Mon, 25 Feb 2008 18:07:51 +0000 (19:07 +0100)]
x86: reserve_early end-of-conventional-memory to 1MB, 64-bit

Explicitly reserve_early the whole address range from the end of
conventional memory as reported by the bios data area up to the
1Mb mark. Regard the info retrieved from the BIOS data area with
a bit of paranoia, though, because some biosses forget to register
the EBDA correctly.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: reserve end-of-conventional-memory to 1MB on 32-bit
Alexander van Heukelum [Sat, 1 Mar 2008 16:09:12 +0000 (17:09 +0100)]
x86: reserve end-of-conventional-memory to 1MB on 32-bit

This patch adds explicit detection of the EBDA and reservation
of the rom and adapter address space 0xa0000-0x100000 to the
i386 kernels. Before this patch, the EBDA size was hardcoded
as 4Kb. Also, the reservation of the adapter range was done by
modifying the e820 map which is now not necessary any longer,
and that code is removed from copy_e820_map.

The amount of conventional memory and the start of the EBDA are
detected by reading the BIOS data area directly. Paravirtual
environments do not provide this area, so we bail out early
in that case. They will just have to set up a correct memory
map to start with.

Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix recursive dependencies
Roman Zippel [Fri, 29 Feb 2008 04:09:02 +0000 (05:09 +0100)]
x86: fix recursive dependencies

The proper dependency check uncovered a few dependency problems,
the subarchitecture used a mixture of selects and depends on SMP
and PCI dependency was messed up.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoxen: use iret instruction all the time
Jeremy Fitzhardinge [Thu, 17 Apr 2008 15:40:51 +0000 (17:40 +0200)]
xen: use iret instruction all the time

Change iret implementation to not be dependent on direct-access vcpu
structure.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: coding style fixes to x86/kernel/early_printk.c
Paolo Ciarrocchi [Fri, 29 Feb 2008 12:26:56 +0000 (13:26 +0100)]
x86: coding style fixes to x86/kernel/early_printk.c

Depends on:
[PATCH 2/3] x86: coding style fixes to arch/x86/kernel/early_printk.c

Remove two:
ERROR: do not initialise statics to 0 or NULL

paolo@paolo-desktop:/tmp/c$ size *
   text    data     bss     dec     hex filename
   1172     280      12    1464     5b8 early_printk.o.after
   1172     280      12    1464     5b8 early_printk.o.before

This patch is changing the binary output:

paolo@paolo-desktop:/tmp/c$ md5sum *
dad9a9a881e0eeda62cc5645bd3d7cad  early_printk.o.after
da32f5cd8f248970e4809e1005393e95  early_printk.o.before

because the two variables moved to another section. No
change in functionality.

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: coding style fixes to arch/x86/kernel/early_printk.c
Paolo Ciarrocchi [Fri, 29 Feb 2008 12:25:30 +0000 (13:25 +0100)]
x86: coding style fixes to arch/x86/kernel/early_printk.c

Before:
total: 17 errors, 3 warnings, 254 lines checked

After:
total: 2 errors, 3 warnings, 254 lines checked

paolo@paolo-desktop:/tmp/b$ md5sum *
da32f5cd8f248970e4809e1005393e95  early_printk.o.after
da32f5cd8f248970e4809e1005393e95  early_printk.o.before

paolo@paolo-desktop:/tmp/b$ size *
   text    data     bss     dec     hex filename
   1172     280      12    1464     5b8 early_printk.o.after
   1172     280      12    1464     5b8 early_printk.o.befor

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: coding style fixes to arch/x86/lib/usercopy_32.c
Paolo Ciarrocchi [Fri, 29 Feb 2008 11:50:56 +0000 (12:50 +0100)]
x86: coding style fixes to arch/x86/lib/usercopy_32.c

Before:
 total: 63 errors, 2 warnings, 878 lines checked
After:
 total: 0 errors, 2 warnings, 878 lines checked

Compile tested, no change in the binary output:

text    data     bss     dec     hex filename
3231       0       0    3231     c9f usercopy_32.o.after
3231       0       0    3231     c9f usercopy_32.o.before

md5sum:
9f9a3eb43970359ae7cecfd1c9e7cf42  usercopy_32.o.after
9f9a3eb43970359ae7cecfd1c9e7cf42  usercopy_32.o.before

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: ioremap(), extend check to all RAM pages
Ingo Molnar [Thu, 28 Feb 2008 13:10:49 +0000 (14:10 +0100)]
x86: ioremap(), extend check to all RAM pages

Suggested by Jan Beulich.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jan Beulich <jbeulich@novell.com>
16 years agox86: X86_HT always enable on X86_64 SMP
Hiroshi Shimamoto [Wed, 27 Feb 2008 21:16:30 +0000 (13:16 -0800)]
x86: X86_HT always enable on X86_64 SMP

X86_HT is used for hyperthreading or multicore on 32-bit.
The X86_HT on 64-bit is different from 32-bit, it means hyperthreading only.
And X86_HT is not used on 64-bit except from cpu/initel_cacheinfo.c.

Unify X86_HT for hyperthreading or multicore.
Turn X86_HT on when X86_64 and SMP are enabled.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: check physical address range in ioremap
Thomas Gleixner [Wed, 27 Feb 2008 19:57:40 +0000 (20:57 +0100)]
x86: check physical address range in ioremap

Roland Dreier reported in http://lkml.org/lkml/2008/2/27/194

[ 8425.915139] BUG: unable to handle kernel paging request at ffffc20001a0a000
[ 8425.919087] IP: [<ffffffff8021dacc>] clflush_cache_range+0xc/0x25
[ 8425.919087] PGD 1bf80e067 PUD 1bf80f067 PMD 1bb497067 PTE 80000047000ee17b

This is on a Intel machine with 36bit physical address space. The PTE
entry references 47000ee000, which is outside of it.

Add a check for the physical address space and warn/printk about the
stupid caller.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoxen: make hvc0 the preferred console in domU
Markus Armbruster [Wed, 27 Feb 2008 13:56:35 +0000 (14:56 +0100)]
xen: make hvc0 the preferred console in domU

This makes the Xen console just work.  Before, you had to ask for it
on the kernel command line with console=hvc0

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, tracing: add notrace to asm-x86/linkage.h
Ingo Molnar [Thu, 17 Apr 2008 15:40:51 +0000 (17:40 +0200)]
x86, tracing: add notrace to asm-x86/linkage.h

notrace signals that a function should not be traced. Most of the
time this is used by tracers to annotate code that cannot be
traced - it's in a volatile state (such as in user vdso context
or NMI context) or it's in the tracer internals.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: switch to proc_create()
Alexey Dobriyan [Tue, 26 Feb 2008 10:23:32 +0000 (13:23 +0300)]
x86: switch to proc_create()

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up traps_32.c
Ingo Molnar [Tue, 26 Feb 2008 10:15:50 +0000 (11:15 +0100)]
x86: clean up traps_32.c

Before:
   total: 86 errors, 29 warnings, 1248 lines checked
After:
   total: 0 errors, 17 warnings, 1281 lines checked

No code changed:

arch/x86/kernel/traps_32.o:

   text    data     bss     dec     hex filename
   8711    2168      72   10951    2ac7 traps_32.o.before
   8711    2168      72   10951    2ac7 traps_32.o.after

(md5 sums differ because some stack offset positions changed.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up cpu capabilities accesses, transmeta.c
Ingo Molnar [Tue, 26 Feb 2008 07:52:39 +0000 (08:52 +0100)]
x86: clean up cpu capabilities accesses, transmeta.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up cpu capabilities in arch/x86/kernel/cpu/intel.c
Ingo Molnar [Tue, 26 Feb 2008 07:52:33 +0000 (08:52 +0100)]
x86: clean up cpu capabilities in arch/x86/kernel/cpu/intel.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up cpu capabilities accesses, cyrix.c
Ingo Molnar [Tue, 26 Feb 2008 07:52:27 +0000 (08:52 +0100)]
x86: clean up cpu capabilities accesses, cyrix.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up cpu capabilities accesses, common.c
Ingo Molnar [Tue, 26 Feb 2008 07:51:32 +0000 (08:51 +0100)]
x86: clean up cpu capabilities accesses, common.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up cpu capabilities accesses, centaur.c
Ingo Molnar [Tue, 26 Feb 2008 07:51:22 +0000 (08:51 +0100)]
x86: clean up cpu capabilities accesses, centaur.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up cpu capabilities accesses, amd.c
Ingo Molnar [Tue, 26 Feb 2008 07:49:57 +0000 (08:49 +0100)]
x86: clean up cpu capabilities accesses, amd.c

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up cpu capabilities accesses, generic
Ingo Molnar [Tue, 26 Feb 2008 07:54:01 +0000 (08:54 +0100)]
x86: clean up cpu capabilities accesses, generic

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up cpu capabilities accesses
Ingo Molnar [Tue, 26 Feb 2008 07:34:21 +0000 (08:34 +0100)]
x86: clean up cpu capabilities accesses

introduce test_cpu_cap() for raw access to the real CPU
capabilities as they are present in x86_capability.

(cpu_has() will shortcut certain tests during build-time)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: remove wrong setting about CONSTANT_TSC for intel cpu
Yinghai Lu [Tue, 26 Feb 2008 07:20:01 +0000 (23:20 -0800)]
x86: remove wrong setting about CONSTANT_TSC for intel cpu

early_init_intel() on 64-bit is introduced by

  commit 2b16a2353814a513cdb5c5c739b76a19d7ea39ce
  Author: Andi Kleen <ak@suse.de>
  Date:   Wed Jan 30 13:32:40 2008 +0100

      x86: move X86_FEATURE_CONSTANT_TSC into early cpu feature detection

sets CONSTANT_TSC for intel cpus - but it is already set in init_intel().

don't need to set that two times in early_init_intel() and init_intel().
this patch removes the init_intel() one.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86, rdc321x: remove watchdog file
Florian Fainelli [Mon, 25 Feb 2008 10:44:07 +0000 (11:44 +0100)]
x86, rdc321x: remove watchdog file

remove the arch/x86/mach-rdc321x/wdt.c file.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: apic_is_clustered_box for vsmp
Yinghai Lu [Mon, 25 Feb 2008 05:36:28 +0000 (21:36 -0800)]
x86: apic_is_clustered_box for vsmp

quad core 8 socket system will have apic id lifting.the apic id range could
be [4, 0x23]. and apic_is_clustered_box will think that need to three clusters
and that is larger than 2. So it is treated as a clustered_box.

and will get:

   Marking TSC unstable due to TSCs unsynchronized

even if the CPUs have X86_FEATURE_CONSTANT_TSC set.

this quick fix will check if the cpu is from AMD.

but vsmp still needs that checking...

this patch is fix to make sure that vsmp not to be passed.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: coding style fixes to arch/x86/kernel/cpu/common.c
Paolo Ciarrocchi [Sun, 24 Feb 2008 10:58:13 +0000 (11:58 +0100)]
x86: coding style fixes to arch/x86/kernel/cpu/common.c

Before:
   total: 55 errors, 6 warnings, 727 lines checked
After:
   total: 0 errors, 3 warnings, 734 lines checked

No code changed:

arch/x86/kernel/cpu/common.o:

   text    data     bss     dec     hex filename
   3500    4611      44    8155    1fdb common.o.before
   3500    4611      44    8155    1fdb common.o.after

md5:
   e37091f11fbeb682c0db152ac3022a38  common.o.before.asm
   e37091f11fbeb682c0db152ac3022a38  common.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>