summaryrefslogtreecommitdiffstats
path: root/arch/x86
Commit message (Collapse)AuthorAgeFilesLines
* x86: use cpu_relax instead of rep_nopGlauber Costa2008-04-171-2/+2
| | | | | | | This is done for smpboot_32.c Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use wait_for_init_deassert in x86_64Glauber Costa2008-04-171-2/+8
| | | | | | | | 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>
* x86: unify setup_trampolineGlauber Costa2008-04-173-43/+33
| | | | | | | | | | | | 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>
* x86: adapt voyager's setup_trampolineGlauber Costa2008-04-171-1/+1
| | | | | | | | 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>
* x86: adapt voyager's trampoline_baseGlauber Costa2008-04-171-4/+4
| | | | | | | | | 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>
* x86: move trampoline arrays extern definition to smp.hGlauber Costa2008-04-172-13/+0
| | | | | | | In here, they can serve both architectures Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make x86_64 accept the max_cpus parameterGlauber Costa2008-04-173-13/+19
| | | | | | | 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>
* x86: merge __cpu_disable and cpu_dieGlauber Costa2008-04-173-146/+85
| | | | | | | 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>
* x86: do not clear cpu_online_mapGlauber Costa2008-04-171-2/+1
| | | | | | | | 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>
* x86: use remove_from_maps in cpu_disableGlauber Costa2008-04-172-6/+9
| | | | | | | | 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>
* x86: remove vector_lock around cpu_online_mapGlauber Costa2008-04-171-3/+1
| | | | | | | | 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>
* x86: move cpu_coregroup_map to common fileGlauber Costa2008-04-173-28/+16
| | | | | | | it is equal between architectures Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: move sibling functions to common fileGlauber Costa2008-04-173-177/+88
| | | | | | | | | 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>
* x86: make remove_siblinginfo non-staticGlauber Costa2008-04-171-1/+1
| | | | | | | this is done to match i386 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make set_cpu_sibling_map nonstaticGlauber Costa2008-04-171-1/+1
| | | | | | | 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>
* x86: move equal types to common fileGlauber Costa2008-04-173-60/+28
| | | | | | | | | | | 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>
* x86: adjust types in smpcommon_32.cGlauber Costa2008-04-171-3/+3
| | | | | | | 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>
* x86: get rid of smp_32.c and smp_64.cGlauber Costa2008-04-174-118/+93
| | | | | | | | | 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>
* x86: create tlb filesGlauber Costa2008-04-175-511/+517
| | | | | | | | 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>
* x86: create ipi.cGlauber Costa2008-04-173-154/+179
| | | | | | | | 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>
* x86: create smp.cGlauber Costa2008-04-174-429/+255
| | | | | | | | 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>
* x86: unify smp_send_stopGlauber Costa2008-04-171-1/+2
| | | | | | | | 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>
* x86: add reboot_force test to native_smp_send_stopGlauber Costa2008-04-171-2/+7
| | | | | | | | 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>
* x86: make stop_this_cpu looks exactly equal in both archesGlauber Costa2008-04-172-3/+4
| | | | | | | | | 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>
* x86: change x86_64 smp_call_function_mask to look alike i386Glauber Costa2008-04-172-42/+17
| | | | | | | | | 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>
* x86: provide __smp_call_functionGlauber Costa2008-04-171-1/+33
| | | | | | | | | | | 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>
* x86: create smpcommon.cGlauber Costa2008-04-174-139/+85
| | | | | | | | | | | | | 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>
* x86: remove irqs disabled warning.Glauber Costa2008-04-171-3/+0
| | | | | | | 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>
* x86: remove export for smp_call_function_mask.Glauber Costa2008-04-171-1/+0
| | | | | | | | 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>
* x86: move prefill_possible_map to common fileGlauber Costa2008-04-173-52/+54
| | | | | | | | | 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>
* x86: use disabled_cpus in i386Glauber Costa2008-04-171-1/+5
| | | | | | | | 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>
* x86: unify smp_cpus_doneGlauber Costa2008-04-172-1/+3
| | | | | | | | 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>
* x86: unify smp_prepare_cpusGlauber Costa2008-04-172-1/+2
| | | | | | | | 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>
* x86: unify prepare_boot_cpuGlauber Costa2008-04-172-1/+2
| | | | | | | | 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>
* x86: unify __cpu_up.Glauber Costa2008-04-172-1/+2
| | | | | | | | 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>
* x86: unify smp_call_function_maskGlauber Costa2008-04-171-3/+4
| | | | | | | | 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>
* x86: merge smp_send_rescheduleGlauber Costa2008-04-171-2/+5
| | | | | | | | 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>
* x86: move smp_ops extern declaration to common headerGlauber Costa2008-04-171-0/+2
| | | | | | | | 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>
* x86: reserve end-of-conventional-memory to 1MB, 64-bit, use paravirt_enabledAlexander van Heukelum2008-04-171-5/+1
| | | | | | | | | | | | | 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>
* x86: reserve end-of-conventional-memory to 1MB, 32-bit, use paravirt_enabledAlexander van Heukelum2008-04-171-5/+2
| | | | | | | | | | | | | 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>
* x86: if we cannot calibrate the TSC, we panic.Rusty Russell2008-04-171-8/+5
| | | | | | | | | | | | | | | | | 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>
* x86: debug pmd_bad()Ingo Molnar2008-04-171-0/+7
| | | | Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: warn about RAM pages in ioremap()Ingo Molnar2008-04-171-2/+4
| | | | Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: reserve end-of-conventional-memory to 1MB, 64-bitAlexander van Heukelum2008-04-172-9/+27
| | | | | | | | | | | | | | | | | | | | | | 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>
* x86: reserve_early end-of-conventional-memory to 1MB, 64-bitAlexander van Heukelum2008-04-171-18/+27
| | | | | | | | | | | 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>
* x86: reserve end-of-conventional-memory to 1MB on 32-bitAlexander van Heukelum2008-04-172-33/+58
| | | | | | | | | | | | | | | | | | 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>
* x86: fix recursive dependenciesRoman Zippel2008-04-171-6/+4
| | | | | | | | | 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>
* xen: use iret instruction all the timeJeremy Fitzhardinge2008-04-173-11/+5
| | | | | | | | 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>
* x86: coding style fixes to x86/kernel/early_printk.cPaolo Ciarrocchi2008-04-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* x86: coding style fixes to arch/x86/kernel/early_printk.cPaolo Ciarrocchi2008-04-171-10/+10
| | | | | | | | | | | | | | | | | | | | 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>