summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* x86: wrap esr setting up in i386 in lapic_setup_esrGlauber de Oliveira Costa2008-04-171-33/+40
| | | | | | | | it is a little bit more complicated than x86_64 due to erratas and other stuff, but its existance will ease integration Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: modify smp_callin in x86_64 to look like i386Glauber de Oliveira Costa2008-04-171-0/+5
| | | | | | | We introduce empty macros just to make them look like the same Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: don't span a new worker in __smp_prepare_cpuGlauber de Oliveira Costa2008-04-171-28/+2
| | | | | | | We can do it now that do_boot_cpu has its own worker. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use create_idle struct in do_boot_cpuGlauber de Oliveira Costa2008-04-171-27/+59
| | | | | | | | | | Use a new worker, with help of the create_idle struct to fork the idle thread. We now have two workers, the first of them triggered by __smp_prepare_cpu. But the later is going away soon. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: get rid of commenced mask.Glauber de Oliveira Costa2008-04-171-8/+0
| | | | | | | As we now boot cpus from cpu_up, we don't need it. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: boot cpus from cpu_up, instead of prepare_cpusGlauber de Oliveira Costa2008-04-171-46/+2
| | | | | | | | | | After all the infrastructure work, we're now prepared to boot the cpus from cpu_up, and not from prepare_cpus. So the difference between cold boot and hotplug is effectively over, and the functions are used to the purposes they're meant to. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: do not zap_low_mappings in __smp_prepare_cpusGlauber de Oliveira Costa2008-04-171-7/+0
| | | | | | | | | | It was okay when cpus were cold booted before this point. But with the new state machine, they will not have arrived to the trampoline yet. zapping low mappings will have the bad effect of breaking it completely after paging enablement Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: schedule work only if keventd is already runningGlauber de Oliveira Costa2008-04-171-2/+6
| | | | | | | | Only call schedule_work if keventd is already running. This is already the way x86_64 does Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: don't initialize sibling and core maps during preparationGlauber de Oliveira Costa2008-04-171-12/+0
| | | | | | | it is redundant, since it is already done by set_cpu_sibling_map() Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: call nmi_watchdog_default in i386Glauber de Oliveira Costa2008-04-172-1/+4
| | | | | | | this does not exist, so it will be an empty macro Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: call check_nmi_watchdog explicitly in native_smp_cpus_doneGlauber de Oliveira Costa2008-04-172-2/+1
| | | | | | | With this, remove its late_initcall marker from nmi_32.c Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: unify nmi_32.h and nmi_64.hGlauber de Oliveira Costa2008-04-174-153/+90
| | | | | | | | Two more files goes away. nmi_64.h and nmi_32.h gives birth to nmi.h Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: wipe get_nmi_reason out of nmi_64.hGlauber de Oliveira Costa2008-04-173-2/+4
| | | | | | | use mach_traps when it is supposed to be used. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: don't set maps in native_smp_prepare_boot_cpu()Glauber de Oliveira Costa2008-04-171-3/+0
| | | | | | | By this time, they are already set in init routines Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: move smp_intr_init away from smpboot_32.cGlauber de Oliveira Costa2008-04-172-21/+23
| | | | | | | | We move it to apic_32.c, since it's irq related anyway, and only called from that file. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: include smpboot_hooks.h in smpboot_64.cGlauber de Oliveira Costa2008-04-171-26/+3
| | | | | | | | We do it and also fix conflicts, which makes x86_64 automatically closer to i386 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: include mach_wakecpu.h in smpboot_64Glauber de Oliveira Costa2008-04-171-8/+3
| | | | | | | | Do it and also fix conflicts, which automatically makes x86_64 look closer to i386 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: add subarch support (for headers) to x86_64Glauber de Oliveira Costa2008-04-171-1/+0
| | | | | | | | | | this patch allows x86_64 to use subarch mach_ headers in practice, since x86_64 does not have any subarch, it will use mach_default. But it will allow for substantially less code duplication Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: move impress_friends and smp_check to cpus_doneGlauber de Oliveira Costa2008-04-173-12/+22
| | | | | | | | | the cpu count is changed accordingly: now, what matters is online cpus. Also, we add those functions for x86_64 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: do smp tainting checks in a separate functionGlauber de Oliveira Costa2008-04-172-20/+21
| | | | | | | It will ease integration for x86_64 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: allow user to impress friends.Glauber de Oliveira Costa2008-04-172-15/+22
| | | | | | | | | Impressing friends is a very important thing. Do it in a separate function to make it even more explicit, and ease integration. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: get rid of cpucountGlauber de Oliveira Costa2008-04-171-9/+3
| | | | | | | weighting a map will do. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: fill cpu to apicid and present map in mpparse, fixIngo Molnar2008-04-171-0/+6
| | | | Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: fill cpu to apicid and present map in mpparseGlauber de Oliveira Costa2008-04-172-19/+24
| | | | | | | | This is the way x86_64 does, and complement the already present patch that does the bios cpu to apicid mapping here Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: fill bios cpu to apicid mapsGlauber de Oliveira Costa2008-04-171-3/+8
| | | | | | | | We fill the per-cpu (or array) that maps bios cpu id to apicid in mpparse_32.c, the way x86_64 does Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use specialized routine for setup per-cpu areaGlauber de Oliveira Costa2008-04-175-79/+107
| | | | | | | | | | | We use the same routing as x86_64, moved now to setup.c. Just with a few ifdefs inside. Note that this routing uses prefill_possible_map(). It has the very nice side effect of allowing hotplugging of cpus that are marked as present but disabled by acpi bios. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: fix alloc_bootmem_pages_node macroGlauber de Oliveira Costa2008-04-171-1/+1
| | | | | | | missing a semicolon Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make node to apic mapping declarations unconditionalGlauber de Oliveira Costa2008-04-171-4/+4
| | | | | | | | Instead of declaring them inside of X86_64 ifdef, do it unconditionally Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: initialize map pointers in setup_32.cGlauber de Oliveira Costa2008-04-171-0/+24
| | | | | | | | | this will serve as a reference as to whether or not to use the per_cpu variables in mpparse. Done the same way as x86_64 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: define bios to apicid mappingGlauber de Oliveira Costa2008-04-174-12/+12
| | | | | | | | This mapping already exists in x86_64, just provide it for i386 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: unify extern masks declarationGlauber de Oliveira Costa2008-04-173-19/+12
| | | | | | | take them off smp_{32,64}.h and move to smp.h Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: move assignment of CPU_PREPARE before do_boot_cpuGlauber de Oliveira Costa2008-04-171-1/+1
| | | | | | | Done to match x86_64 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make __smp_prepare_cpu voidGlauber de Oliveira Costa2008-04-171-10/+3
| | | | | | | | We have already removed the only condition that could fail here. so just don't test for any return value Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: do tests before do_boot_cpu in i386Glauber de Oliveira Costa2008-04-171-5/+13
| | | | | | | | | | Do tests before do_boot_cpu in native_cpu_up for i386. Tests are a little bit broader than originally, and are the same as x86_64. Test for smp_callin is not applicable right now and is deferred. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: isolate logic to disable smpGlauber de Oliveira Costa2008-04-171-16/+16
| | | | | | | Put it in a disable_smp() function, as x86_64 does Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: isolate sanity checkingGlauber de Oliveira Costa2008-04-171-26/+31
| | | | | | | | Isolate all sanity checking in a smp_sanity_check() function as x86_64 does. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: add barriers statementGlauber de Oliveira Costa2008-04-172-0/+5
| | | | | | | | goal is to have i386 and x86_64 closer, so we add barriers to match Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use APIC_INTEGRATED tests in x86_64Glauber de Oliveira Costa2008-04-171-1/+13
| | | | | | | | | This patch does not change the behaviour of x86_64, since APIC_INTEGRATED is always defined as (1). But the code now matches exactly i386 version (well, this part of the code, at least) Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: provide APIC_INTEGRATED definition for x86_64Glauber de Oliveira Costa2008-04-171-1/+5
| | | | | | | it is always integrated, so define as 1. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: move state update out of ipi_lockGlauber de Oliveira Costa2008-04-171-2/+2
| | | | | | | it does not need to be inside lock. Do the way i386 does. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: move setup_secondary_clock a little bit down in the functionGlauber de Oliveira Costa2008-04-171-1/+2
| | | | | | | | | This is done so we call setup_secondary_clock() in the same place x86_64 does. A separate patch for this is appearantly not needed. But clock initialization is such a delicate thing, that it's safer to do this way Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: don't call local_irq_enable before entering idleGlauber de Oliveira Costa2008-04-171-3/+0
| | | | | | | the call to idle is guaranteed to do it. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: always enable irqs when entering idleGlauber de Oliveira Costa2008-04-171-2/+7
| | | | | | | This matches x86_64 behaviour, which is a superior one IMHO Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: merge smp_store_cpu_infoGlauber de Oliveira Costa2008-04-175-87/+80
| | | | | | | now that it is the same between arches, put it into smpboot.c Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: call identify_secondary_cpu in smp_store_cpu_infoGlauber de Oliveira Costa2008-04-171-1/+2
| | | | | | | | Call it conditionally for secondary cpus. This behaviour matches i386 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use identify_boot_cpuGlauber de Oliveira Costa2008-04-171-1/+1
| | | | | | | Call this function instead of identify_cpu in bugs_64.c Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: provide specialized identification routines for x86_64Glauber de Oliveira Costa2008-04-171-2/+12
| | | | | | | | | provide two specialized identify_secondary_cpu() and identify_boot_cpu() routines for x86_64. Although not strictly needed, they are functionally correct, and will ease integration with i386 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: decouple call to print_cpu_info from smp_store_cpu_infoGlauber de Oliveira Costa2008-04-171-1/+4
| | | | | | | This will ease integration with i386 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: add an smp_apply_quirks to smpboot_32.cGlauber de Oliveira Costa2008-04-171-12/+18
| | | | | | | | The split of smp_store_cpu_info in a quirks-only part will ease integration with x86_64 Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use start_ipi_hook in x86_64Glauber de Oliveira Costa2008-04-173-4/+11
| | | | | | | | It is used to match i386. The definition for the non-paravirt case is moved to smp.h instead of smp_32.h Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>