summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
Commit message (Collapse)AuthorAgeFilesLines
* cpumask: use new cpumask functions throughout x86Rusty Russell2009-03-131-6/+5
| | | | | | | | | | Impact: cleanup 1) &cpu_online_map -> cpu_online_mask 2) first_cpu/next_cpu_nr -> cpumask_first/cpumask_next 3) cpu_*_map manipulation -> init_cpu_* / set_cpu_* Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* cpumask: convert struct cpuinfo_x86's llc_shared_map to cpumask_var_tRusty Russell2009-03-131-7/+26
| | | | | | Impact: reduce kernel memory usage when CONFIG_CPUMASK_OFFSTACK=y Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* cpumask: convert node_to_cpumask_map[] to cpumask_var_tRusty Russell2009-03-131-2/+2
| | | | | | | | | | | | Impact: reduce kernel memory usage when CONFIG_CPUMASK_OFFSTACK=y Straightforward conversion: done for 32 and 64 bit kernels. node_to_cpumask_map is now a cpumask_var_t array. 64-bit used to be a dynamic cpumask_t array, and 32-bit used to be a static cpumask_t array. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* x86: unify 32 and 64-bit node_to_cpumask_mapRusty Russell2009-03-131-5/+0
| | | | | | | | | | | | Impact: cleanup We take the 64-bit code and use it on 32-bit as well. The new file is called mm/numa.c. In a minor cleanup, we use cpu_none_mask instead of declaring a local cpu_mask_none. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* cpumask: x86: convert cpu_sibling_map/cpu_core_map to cpumask_var_tRusty Russell2009-03-131-2/+10
| | | | | | | | | | | Impact: reduce per-cpu size for CONFIG_CPUMASK_OFFSTACK=y In most places it's cleaner to use the accessors cpu_sibling_mask() and cpu_core_mask() wrappers which already exist. I couldn't avoid cleaning up the access in oprofile, either. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* cpumask: remove cpu_coregroup_map: x86Rusty Russell2009-03-131-5/+0
| | | | | | | | Impact: cleanup cpu_coregroup_mask is the New Hotness. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* x86: remove smp_apply_quirks()/smp_checks()Yinghai Lu2009-03-081-78/+0
| | | | | | | | | | | | | | | Impact: cleanup and code size reduction on 64-bit This code is only applied to Intel Pentium and AMD K7 32-bit cpus. Move those checks to intel_init()/amd_init() for 32-bit so 64-bit will not build this code. Also change to use cpu_index check to see if we need to emit warning. Signed-off-by: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <49B377D2.8030108@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic: simplify secondary CPU wakeup methodsIngo Molnar2009-02-261-3/+8
| | | | | | | | | | | | | | Impact: cleanup - rename apic->wakeup_cpu to apic->wakeup_secondary_cpu, to make it apparent that this is an SMP-only method - handle NULL ->wakeup_secondary_cpus to mean the default INIT wakeup sequence - this allows simplification of the APIC driver templates. Cc: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: remove update_apic from x86_quirksYinghai Lu2009-02-261-7/+1
| | | | | | | | | | | | | Impact: cleanup x86_quirks->update_apic() calling looks crazy. so try to remove it: 1. every apic take wakeup_cpu member directly 2. separate es7000_apic to es7000_apic_cluster 3. use uv_wakeup_cpu directly Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: remove ->store_NMI_vector()Ingo Molnar2009-02-171-8/+5
| | | | | | | | Impact: cleanup It's not used by anything anymore. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: remove duplicate asm/apic.h inclusionsIngo Molnar2009-02-171-1/+0
| | | | | | Impact: cleanup Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: remove genapic.hIngo Molnar2009-02-171-2/+2
| | | | | | | | Impact: cleanup Remove genapic.h and remove all references to it. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: add x2apic configYinghai Lu2009-02-171-1/+1
| | | | | | | | | | | Impact: cleanup so could deselect x2apic and INTR_REMAP will select x2apic Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make 32bit to call enable_IO_APIC early like 64bitYinghai Lu2009-02-151-2/+1
| | | | | | | | | Impact: cleanup So we remove some #ifdefs. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* Merge branch 'x86/paravirt' into x86/apicIngo Molnar2009-02-091-1/+1
|\ | | | | | | | | Conflicts: arch/x86/mach-voyager/voyager_smp.c
| * x86: pass in cpu number to switch_to_new_gdt()Brian Gerst2009-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | Impact: cleanup, prepare for xen boot fix. Xen needs to call this function very early to setup the GDT and per-cpu segments. Remove the call to smp_processor_id() and just pass in the cpu number. Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* | smp, generic: introduce arch_disable_smp_support() instead of ↵Ingo Molnar2009-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | disable_ioapic_setup() Impact: cleanup disable_ioapic_setup() in init/main.c is ugly as the function is x86-specific. The #ifdef inline prototype there is ugly too. Replace it with a generic arch_disable_smp_support() function - which has a weak alias for non-x86 architectures and for non-ioapic x86 builds. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: update copyrightsIngo Molnar2009-01-311-1/+1
| | | | | | | | Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: don't treat bigsmp as non-standardYinghai Lu2009-01-301-1/+1
| | | | | | | | | | | | | | | | just like 64 bit switch from flat logical APIC messages to flat physical mode automatically. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: fix compiling with 64bit with def_to_bigsmpYinghai Lu2009-01-301-1/+1
| | | | | | | | | | | | | | only need to do cut off with 32bit Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: allow more than 8 cpus to be used on 32-bitYinghai Lu2009-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | X86_PC is the only remaining 'sub' architecture, so we dont need it anymore. This also cleans up a few spurious references to X86_PC in the driver space - those certainly should be X86. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: rename X86_GENERICARCH to X86_32_NON_STANDARDIngo Molnar2009-01-291-1/+1
| | | | | | | | | | | | | | | | | | X86_GENERICARCH is a misnomer - it contains non-PC 32-bit architectures that are not included in the default build. Rename it to X86_32_NON_STANDARD. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: generalize boot_cpu_idIngo Molnar2009-01-291-12/+0
| | | | | | | | | | | | | | | | x86/Voyager can boot on non-zero processors. While that can probably be fixed by properly remapping the physical CPU IDs, keep boot_cpu_id for now for easier transition - and expand it to all of x86. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: move mach-default/*.h files to asm/Ingo Molnar2009-01-291-1/+1
| | | | | | | | | | | | | | | | We are getting rid of subarchitecture support - move the hook files to asm/. (These are now stale and should be replaced with more explicit runtime mechanisms - but the transition is simpler this way.) Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: remove mach_apic.hIngo Molnar2009-01-291-1/+1
| | | | | | | | | | | | | | Spread mach_apic.h definitions into genapic.h. (with some knock-on effects on smp.h and apic.h.) Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, smp: refactor ->wake_cpuIngo Molnar2009-01-281-2/+2
| | | | | | | | | | | | - remove macro wrappers Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, smp: eliminate asm/mach-default/mach_wakecpu.hIngo Molnar2009-01-281-1/+0
| | | | | | | | | | | | | | Spread mach_wakecpu.h's definitions into apic.h and genapic.h and remove mach_wakecpu.h. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, smp: refactor ->inquire_remote_apic() methodsIngo Molnar2009-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Nothing exciting - a few subarches dont want APIC remote reads to be performed - the others are content with the default method. - extend the generic code to handle NULL methods - clear out dummy methods and replace them with NULL - clean up: remove wrapper macros, etc. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, smp: refactor ->store/restore_NMI_vector() methodsIngo Molnar2009-01-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Only NUMAQ does something substantial here, because it initializes via NMIs (not via INIT as standard SMP startup) - so it needs to store and restore the NMI vector. - extend the generic code to handle NULL methods - clear out dummy methods and replace them with NULL - clean up: remove wrapper macros, etc. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, smp: refactor ->smp_callin_clear_local_apic() methodsIngo Molnar2009-01-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Only NUMAQ does something substantial here, because it initializes via NMIs (not via INIT as standard SMP startup) - so it needs to reset the APIC. - extend the generic code to handle NULL methods - clear out dummy methods and replace them with NULL - clean up: remove wrapper macros, etc. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, smp: refactor ->wait_for_init_deassert()Ingo Molnar2009-01-281-1/+2
| | | | | | | | | | | | | | | | | | | | - spread out the namespace on a per APIC driver basis - handle a NULL ->wait_for_init_deassert() as a 'dont wait' default method - remove NUMAQ and Summit handlers Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: refactor ->check_phys_apicid_present() subarch methodsIngo Molnar2009-01-281-1/+6
| | | | | | | | | | | | | | | | | | - spread out the namespace to per driver methods - extend it to 64-bit as well so that we can use apic->check_phys_apicid_present() unconditionally Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: refactor ->setup_portio_remap() subarch methodsIngo Molnar2009-01-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Only NUMAQ has a real ->setup_portio_remap() method, the other subarchitectures define it but keep it empty. So mark the vector as NULL, extend the generic code to handle NULL -setup_portio_remap() entries and remove all the empty handlers. Also move the NUMAQ method from the header file into the apic driver .c file. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, apic: clean up ->cpu_present_to_apicid()Ingo Molnar2009-01-281-1/+8
| | | | | | | | | | | | | | | | - separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, apic: clean up ->apicid_to_node()Ingo Molnar2009-01-281-1/+1
| | | | | | | | | | | | | | | | - separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, apic: clean up ->setup_apic_routing()Ingo Molnar2009-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | - separate the namespace - remove macros - remove namespace clash on 64-bit Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, apic: rename genapic::apic_destination_logical to genapic::dest_logicalIngo Molnar2009-01-281-1/+1
| | | | | | | | | | | | This field name was unreasonably long - shorten it. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: clean up the APIC_DEST_LOGICAL logicIngo Molnar2009-01-281-1/+1
|/ | | | | | | | | | | | | | | Impact: cleanup The bigsmp and es7000 subarchitectures un-defined APIC_DEST_LOGICAL in a rather nasty way by re-defining it to zero. That is infinitely fragile and makes it very hard to see what to code really does in a given context. The very same constant has different meanings and values - depending on which subarch is enabled. Untangle this mess by never undefining the constant, but instead propagating the right values into the genapic driver templates. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: initialize per-cpu GDT segment in per-cpu setupBrian Gerst2009-01-271-4/+0
| | | | | | | | | | Impact: cleanup Rename init_gdt() to setup_percpu_segment(), and move it to setup_percpu.c. Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* x86: uv cleanupTejun Heo2009-01-211-0/+1
| | | | | | | | | | | | | | | | | | | | | Impact: cleanup Make the following uv related cleanups. * collect visible uv related definitions and interfaces into uv/uv.h and use it. this cleans up the messy situation where on 64bit, uv is defined properly, on 32bit generic it's dummy and on the rest undefined. after this clean up, uv is defined on 64 and dummy on 32. * update uv_flush_tlb_others() such that it takes cpumask of to-be-flushed cpus as argument, instead of that minus self, and returns yet-to-be-flushed cpumask, instead of modifying the passed in parameter. this interface change will ease dummy implementation of uv_flush_tlb_others() and makes uv tlb flush related stuff defined in tlb_uv proper. Signed-off-by: Tejun Heo <tj@kernel.org>
* x86-64: Move kernelstack from PDA to per-cpu.Brian Gerst2009-01-191-0/+3
| | | | | | | | | | | Also clean up PER_CPU_VAR usage in xen-asm_64.S tj: * remove now unused stack_thread_info() * s/kernelstack/kernel_stack/ * added FIXME comment in xen-asm_64.S Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* x86-64: Move current task from PDA to per-cpu and consolidate with 32-bit.Brian Gerst2009-01-191-2/+1
| | | | | Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* x86: misc clean up after the percpu updateTejun Heo2009-01-161-1/+1
| | | | | | | | | | | | Do the following cleanups: * kill x86_64_init_pda() which now is equivalent to pda_init() * use per_cpu_offset() instead of cpu_pda() when initializing initial_gs Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: fold pda into percpu area on SMPTejun Heo2009-01-161-59/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Based on original patch from Christoph Lameter and Mike Travis. ] Currently pdas and percpu areas are allocated separately. %gs points to local pda and percpu area can be reached using pda->data_offset. This patch folds pda into percpu area. Due to strange gcc requirement, pda needs to be at the beginning of the percpu area so that pda->stack_canary is at %gs:40. To achieve this, a new percpu output section macro - PERCPU_VADDR_PREALLOC() - is added and used to reserve pda sized chunk at the start of the percpu area. After this change, for boot cpu, %gs first points to pda in the data.init area and later during setup_per_cpu_areas() gets updated to point to the actual pda. This means that setup_per_cpu_areas() need to reload %gs for CPU0 while clearing pda area for other cpus as cpu0 already has modified it when control reaches setup_per_cpu_areas(). This patch also removes now unnecessary get_local_pda() and its call sites. A lot of this patch is taken from Mike Travis' "x86_64: Fold pda into per cpu area" patch. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: load pointer to pda into %gs while brining up a CPUTejun Heo2009-01-161-0/+1
| | | | | | | | | | | | | | | [ Based on original patch from Christoph Lameter and Mike Travis. ] CPU startup code in head_64.S loaded address of a zero page into %gs for temporary use till pda is loaded but address to the actual pda is available at the point. Load the real address directly instead. This will help unifying percpu and pda handling later on. This patch is mostly taken from Mike Travis' "x86_64: Fold pda into per cpu area" patch. Signed-off-by: Tejun Heo <tj@kernel.org>
*-. Merge branches 'cpus4096', 'x86/cleanups' and 'x86/urgent' into x86/percpuIngo Molnar2009-01-151-1/+1
|\ \
| | * x86: fully honor "nolapic"Jan Beulich2009-01-151-0/+1
| |/ |/| | | | | | | | | | | | | | | | | | | Impact: widen the effect of the 'nolapic' boot parameter "nolapic" should not only suppress SMP and use of the LAPIC, but it also ought to have the effect of disabling all IO-APIC related activity as well as PCI MSI and HT-IRQs. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * x86: smp.h move cpu_callout_mask and cpu_callout_map declartion to cpumask.hJaswinder Singh Rajput2009-01-101-1/+0
| | | | | | | | | | | | | | Impact: cleanup Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * x86: smp.h move cpu_callin_mask and cpu_callin_map declartion to cpumask.hJaswinder Singh Rajput2009-01-101-0/+1
| | | | | | | | | | | | | | Impact: cleanup Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * Merge branch 'linus' into x86/cleanupsIngo Molnar2009-01-101-63/+65
| |\ | |/ |/|
OpenPOWER on IntegriCloud