summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/genapic_flat_64.c
Commit message (Collapse)AuthorAgeFilesLines
* x86, apic: move APIC drivers to arch/x86/kernel/apic/*Ingo Molnar2009-02-171-389/+0
| | | | | | | | | | | | | arch/x86/kernel/ is getting a bit crowded, and the APIC drivers are scattered into various different files. Move them to arch/x86/kernel/apic/*, and also remove the 'gen' prefix from those which had it. Also move APIC related functionality: the IO-APIC driver, the NMI and the IPI code. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: rename 'genapic' to 'apic'Ingo Molnar2009-02-171-2/+2
| | | | | | | | | | | Impact: cleanup Now that all APIC code is consolidated there's nothing 'gen' about apics anymore - so rename 'struct genapic' to 'struct apic'. This shortens the code and is nicer to read as well. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: remove ->store_NMI_vector()Ingo Molnar2009-02-171-2/+0
| | | | | | | | Impact: cleanup It's not used by anything anymore. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: remove genapic.hIngo Molnar2009-02-171-1/+1
| | | | | | | | Impact: cleanup Remove genapic.h and remove all references to it. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: fold apic_ops into genapicYinghai Lu2009-02-171-1/+15
| | | | | | | | | | | | Impact: cleanup make it simpler, don't need have one extra struct. v2: fix the sgi_uv build Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: seperate default_send_IPI_mask_sequence/allbutself from logicalYinghai Lu2009-01-301-3/+3
| | | | | | | | | | | | | | | Impact: 32-bit should use logical version there are two version: for default_send_IPI_mask_sequence/allbutself one in ipi.h and one in ipi.c for 32bit it seems .h version overwrote ipi.c for a while. restore it so 32 bit could use its old logical version. also remove dupicated functions in .c Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: remove mach_apicdef.hIngo Molnar2009-01-281-1/+0
| | | | | | Move its definitions into apic.h. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, smp: remove ->restore_NMI_vector()Ingo Molnar2009-01-281-2/+0
| | | | | | | Nothing actually restores the NMI vector - so remove this logic altogether. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: set ->trampoline_phys_low/high on 64-bit tooIngo Molnar2009-01-281-4/+4
| | | | | | | | 64-bit x86 has zero for ->trampoline_phys_low/high, but the smpboot code can use these values - so it's better to set them up to their correct values. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: untangle the send_IPI_*() jungleIngo Molnar2009-01-281-10/+14
| | | | | | | | | | | | | | | | Our send_IPI_*() methods and definitions are a twisted mess: the same symbol is defined to different things depending on .config details, in a non-transparent way. - spread out the quirks into separately named per apic driver methods - prefix the standard PC methods with default_ - get rid of wrapper macro obfuscation - clean up various details Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: refactor ->cpu_mask_to_apicid*()Ingo Molnar2009-01-281-1/+3
| | | | | | | | | | - spread out the namespace on a per driver basis - clean up the functions - get rid of macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: refactor ->apic_id_mask & APIC_ID_MASKIngo Molnar2009-01-281-1/+1
| | | | | | | | - spread out the namespace on a per driver basis - get rid of wrapper macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: refactor ->get_apic_id() & GET_APIC_ID()Ingo Molnar2009-01-281-4/+5
| | | | | | | | | | - spread out the namespace on a per driver basis - get rid of macro wrappers - small cleanups Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: unify phys_pkg_id()Ingo Molnar2009-01-281-3/+3
| | | | | | | | | | - unify the call signature of 64-bit to that of 32-bit - clean up the types all around - clean up namespace contamination Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: refactor ->check_phys_apicid_present() subarch methodsIngo Molnar2009-01-281-2/+2
| | | | | | | | | - 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, apic: clean up ->cpu_present_to_apicid()Ingo Molnar2009-01-281-2/+2
| | | | | | | | - separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: remove no_balance_irq and no_ioapic_check flagsIngo Molnar2009-01-281-6/+0
| | | | | | | These flags are completely unused. (the in-kernel IRQ balancer has been removed from the upstream kernel.) Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, apic: rename genapic::apic_destination_logical to genapic::dest_logicalIngo Molnar2009-01-281-5/+5
| | | | | | 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-6/+6
| | | | | | | | | | | | | | | 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: rename ->ESR_DISABLE to ->disable_esrIngo Molnar2009-01-281-2/+2
| | | | | | | | the ->ESR_DISABLE shouting variant was used to enable the esr_disable macro wrappers. Those ugly macros are removed now so we can rename ->ESR_DISABLE to ->disable_esr Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, genapic: rename int_delivery_mode, et. al.Ingo Molnar2009-01-281-4/+4
| | | | | | | | | | | | | | | int_delivery_mode is supposed to mean 'interrupt delivery mode', but it's quite a misnomer as 'int' we usually think of as an integer type ... The standard naming for such attributes is 'irq' - so rename the following fields and macros: int_delivery_mode => irq_delivery_mode INT_DELIVERY_MODE => IRQ_DELIVERY_MODE int_dest_mode => irq_dest_mode INT_DEST_MODE => IRQ_DEST_MODE Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: clean up genapic_phys_flatIngo Molnar2009-01-281-19/+56
| | | | | | | | | - reorder fields so that they appear in struct genapic field ordering - add zero-initialized fields too so that it's apparent which functionality is default / missing. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: clean up genapic_flatIngo Molnar2009-01-281-19/+54
| | | | | | | | | - reorder fields so that they appear in struct genapic field ordering - add zero-initialized fields too so that it's apparent which functionality is default / missing. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: fix cpu_mask_to_apicid_and to include cpu_online_maskMike Travis2008-12-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Impact: fix potential APIC crash In determining the destination apicid, there are usually three cpumasks that are considered: the incoming cpumask arg, cfg->domain and the cpu_online_mask. Since we are just introducing the cpu_mask_to_apicid_and function, make sure it includes the cpu_online_mask in it's evaluation. [Added with this patch.] There are two io_apic.c functions that did not previously use the cpu_online_mask: setup_IO_APIC_irq and msi_compose_msg. Both of these simply used cpu_mask_to_apicid(cfg->domain & TARGET_CPUS), and all but one arch (NUMAQ[*]) returns only online cpus in the TARGET_CPUS mask, so the behavior is identical for all cases. [*: NUMAQ bug?] Note that alloc_cpumask_var is only used for the 32-bit cases where it's highly likely that the cpumask set size will be small and therefore CPUMASK_OFFSTACK=n. But if that's not the case, failing the allocate will cause the same return value as the default. Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: cosmetic changes apic-related files.Mike Travis2008-12-161-24/+26
| | | | | | | | This patch simply changes cpumask_t to struct cpumask and similar trivial modernizations. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Mike Travis <travis@sgi.com>
* x86: update add-cpu_mask_to_apicid_and to use struct cpumask*Mike Travis2008-12-161-10/+11
| | | | | | | | | | | Impact: use updated APIs Various API updates for x86:add-cpu_mask_to_apicid_and (Note: separate because previous patch has been "backported" to 2.6.27.) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Mike Travis <travis@sgi.com>
* x86: Add cpu_mask_to_apicid_andMike Travis2008-12-161-0/+26
| | | | | | | | | | | Impact: new API Add a helper function that takes two cpumask's, and's them and then returns the apicid of the result. This removes a need in io_apic.c that uses a temporary cpumask to hold (mask & cfg->domain). Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* x86 smp: modify send_IPI_mask interface to accept cpumask_t pointersMike Travis2008-12-161-26/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Impact: cleanup, change parameter passing * Change genapic interfaces to accept cpumask_t pointers where possible. * Modify external callers to use cpumask_t pointers in function calls. * Create new send_IPI_mask_allbutself which is the same as the send_IPI_mask functions but removes smp_processor_id() from list. This removes another common need for a temporary cpumask_t variable. * Functions that used a temp cpumask_t variable for: cpumask_t allbutme = cpu_online_map; cpu_clear(smp_processor_id(), allbutme); if (!cpus_empty(allbutme)) ... become: if (!cpus_equal(cpu_online_map, cpumask_of_cpu(cpu))) ... * Other minor code optimizations (like using cpus_clear instead of CPU_MASK_NONE, etc.) Applies to linux-2.6.tip/master. Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Ingo Molnar <mingo@elte.hu>
* x86: fix section mismatch warning - apic_physflatMarcin Slusarz2008-10-221-1/+1
| | | | | | | | | | | Impact: cleanup only, no functionality changed WARNING: vmlinux.o(.data+0xbe88): Section mismatch in reference from the variable apic_physflat to the function .init.text:physflat_acpi_madt_oem_check() The variable apic_physflat references the function __init physflat_acpi_madt_oem_check() Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: fix section mismatch warning - apic_flatMarcin Slusarz2008-10-221-1/+1
| | | | | | | | | | | | | | | | Impact: cleanup only, no functionality changed WARNING: vmlinux.o(.data+0xbe08): Section mismatch in reference from the variable apic_flat to the function .init.text:flat_acpi_madt_oem_check() The variable apic_flat references the function __init flat_acpi_madt_oem_check() This is harmless, because the .acpi_madt_oem_check is only called during init time. But we keep the function pointer around in a .data function pointer template, so it's better we do not keep that stale - so mark this function non-__init. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: print out if acpi want physical flat of allYinghai Lu2008-10-161-1/+3
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* Merge branch 'linus' into x86/x2apicIngo Molnar2008-07-251-1/+1
|\ | | | | | | | | | | | | | | Conflicts: drivers/pci/dmar.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genapic_flat_64.cMike Travis2008-07-201-1/+1
| | | | | | | | | | | | | | | | * nr_cpu_ids should be used to determine if a percpu area is available for a given cpu. Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: add apic probe for genapic 64bit, v2Yinghai Lu2008-07-221-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introducing an APIC handling probing abstraction: static struct genapic *apic_probe[] __initdata = { &apic_x2apic_uv_x, &apic_x2apic_phys, &apic_x2apic_cluster, &apic_physflat, NULL, }; This way we can remove UV, x2apic specific code from genapic_64.c and move them to their specific genapic files. [ v2: fix compiling when CONFIG_ACPI is not set ] Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Cc: Jack Steiner <steiner@sgi.com> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: make 64bit have get_apic_idYinghai Lu2008-07-131-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generalize the x2apic code some more. let read_apic_id become a macro (later on a function/inline) GET_APIC_ID(apic_read(APIC_ID)) +#define read_apic_id() (GET_APIC_ID(apic_read(APIC_ID))) instead of this weird construct: -#define read_apic_id (genapic->read_apic_id) Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86: make read_apic_id return final apicidYinghai Lu2008-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | also remove GET_APIC_ID when read_apic_id is used. need to apply after [PATCH] x86: mach_apicdef.h need to include before smp.h Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x64, x2apic/intr-remap: introcude self IPI to genapic routinesSuresh Siddha2008-07-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Introduce self IPI op for genapic. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: akpm@linux-foundation.org Cc: arjan@linux.intel.com Cc: andi@firstfloor.org Cc: ebiederm@xmission.com Cc: jbarnes@virtuousgeek.org Cc: steiner@sgi.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x64, x2apic/intr-remap: introduce read_apic_id() to genapic routinesSuresh Siddha2008-07-121-1/+13
|/ | | | | | | | | | | | | Move the read_apic_id() to genapic routines. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: akpm@linux-foundation.org Cc: arjan@linux.intel.com Cc: andi@firstfloor.org Cc: ebiederm@xmission.com Cc: jbarnes@virtuousgeek.org Cc: steiner@sgi.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use cpumask_of_cpu()Akinobu Mita2008-04-171-4/+1
| | | | | | | Use cpumask_of_cpu() rather than the pair of cpus_clear() and cpu_set(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: change GET_APIC_ID() from an inline function to an out-of-line functionJack Steiner2008-04-171-1/+1
| | | | | | | | | | Introduce a function to read the local APIC_ID. This change is in preparation for additional changes to the APICID functions that will come in a later patch. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: convert cpu_to_apicid to be a per cpu variableMike Travis2007-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This patch converts the x86_cpu_to_apicid array to be a per cpu variable. This saves sizeof(apicid) * NR unused cpus. Access is mostly from startup and CPU HOTPLUG functions. MP_processor_info() is one of the functions that require access to the x86_cpu_to_apicid array before the per_cpu data area is setup. For this case, a pointer to the __initdata array is initialized in setup_arch() and removed in smp_prepare_cpus() after the per_cpu data area is initialized. A second change is included to change the initial array value of ARCH i386 from 0xff to BAD_APICID to be consistent with ARCH x86_64. Signed-off-by: Mike Travis <travis@sgi.com> Cc: Andi Kleen <ak@suse.de> Cc: Christoph Lameter <clameter@sgi.com> Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* x86: remove x86_cpu_to_log_apicidMike Travis2007-10-171-1/+0
| | | | | | | | | | | | | | | | Remove the x86_cpu_to_log_apicid array. It is set in arch/x86_64/kernel/genapic_flat.c:flat_init_apic_ldr() and arch/x86_64/kernel/smpboot.c:do_boot_cpu() but it is never referenced. [ tglx: arch/x86 adaptation ] Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* x86_64: move kernelThomas Gleixner2007-10-111-0/+194
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
OpenPOWER on IntegriCloud