aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/mach-generic
AgeCommit message (Collapse)Author
2009-01-29x86, smp: remove mach_ipi.hIngo Molnar
Move mach_ipi.h definitions into genapic.h. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-29x86: remove mach_apic.hIngo Molnar
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>
2009-01-28x86, smp: refactor ->wake_cpuIngo Molnar
- remove macro wrappers Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86: remove mach_apicdef.hIngo Molnar
Move its definitions into apic.h. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86: remove mach_mpspec.hIngo Molnar
Move its definitions into mpspec.h. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86: eliminate asm/mach-*/mach_mpparse.hIngo Molnar
Move the definition to mpparse.h. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, smp: refactor ->inquire_remote_apic() methodsIngo Molnar
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>
2009-01-28x86, smp: refactor ->store/restore_NMI_vector() methodsIngo Molnar
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>
2009-01-28x86, smp: refactor ->smp_callin_clear_local_apic() methodsIngo Molnar
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>
2009-01-28x86, smp: refactor ->wait_for_init_deassert()Ingo Molnar
- 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>
2009-01-28x86, smp: clean up ->trampoline_phys_low/high handlingIngo Molnar
- spread out the namespace on a per apic driver basis - remove wrapper macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: untangle the send_IPI_*() jungleIngo Molnar
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>
2009-01-28x86, apic: refactor ->cpu_mask_to_apicid*()Ingo Molnar
- 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>
2009-01-28x86, apic: refactor ->apic_id_mask & APIC_ID_MASKIngo Molnar
- spread out the namespace on a per driver basis - get rid of wrapper macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: refactor ->get_apic_id() & GET_APIC_ID()Ingo Molnar
- spread out the namespace on a per driver basis - get rid of macro wrappers - small cleanups Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86: consolidate the ->mps_oem_check() codeIngo Molnar
- spread out the mps_oem_check() namespace on a per APIC driver basis Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: refactor ->phys_pkg_id()Ingo Molnar
Refactor the ->phys_pkg_id() methods: - namespace separation - macro wrapper removal - open-coded calls to the methods in the generic code Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86: refactor ->enable_apic_mode() subarch methodsIngo Molnar
Only ES7000 has a real ->enable_apic_mode() 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. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86: refactor ->check_phys_apicid_present() subarch methodsIngo Molnar
- 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>
2009-01-28x86: refactor ->setup_portio_remap() subarch methodsIngo Molnar
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>
2009-01-28x86, apic: clean up ->apicid_to_cpu_present()Ingo Molnar
- separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: clean up ->cpu_present_to_apicid()Ingo Molnar
- separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: clean up ->cpu_to_logical_apicid()Ingo Molnar
- separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: clean up ->apicid_to_node()Ingo Molnar
- separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: streamline the ->multi_timer_check() quirkIngo Molnar
only NUMAQ uses this quirk: to prevent the timer IRQ from being added on secondary nodes. All other genapic templates can have a NULL ->multi_timer_check() callback. Also, extend the generic code to treat a NULL pointer accordingly. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: clean up ->setup_apic_routing()Ingo Molnar
- separate the namespace - remove macros - remove namespace clash on 64-bit Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: clean up ->ioapic_phys_id_map()Ingo Molnar
- separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: clean up ->init_apic_ldr()Ingo Molnar
- separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: clean up ->vector_allocation_domain()Ingo Molnar
- separate the namespace - remove macros - move the default vector-allocation-domain to mach-generic - fix whitespace damage Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: remove no_balance_irq and no_ioapic_check flagsIngo Molnar
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>
2009-01-28x86, apic: clean up check_apicid*() callbacksIngo Molnar
Clean up these methods - to make it clearer which function is used in which case. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86: clean up the APIC_DEST_LOGICAL logicIngo Molnar
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>
2009-01-28x86: clean up esr_disable() methodsIngo Molnar
Impact: cleanup Most subarchitectures want to disable the APIC ESR (Error Status Register), because they generally have hardware hacks that wrap standard CPUs into a bigger system and hence the APIC bus is quite non-standard and weirdnesses (lockups) have been seen with ESR reporting. Remove the esr_disable macros and put the desired flag into each subarchitecture's genapic template directly. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: clean up / remove TARGET_CPUSIngo Molnar
Impact: cleanup use apic->target_cpus() directly instead of the TARGET_CPUS wrapper. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, apic: remove IRQ_DEST_MODE / IRQ_DELIVERY_MODEIngo Molnar
Remove the wrapper macros IRQ_DEST_MODE and IRQ_DELIVERY_MODE. The typical 32-bit and the 64-bit build all dereference via the genapic, so it's pointless to hide that indirection via these ugly macros. Furthermore, it also obscures subarchitecture details. So replace it with apic->irq_dest_mode / etc. accesses. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86, genapic: rename int_delivery_mode, et. al.Ingo Molnar
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>
2009-01-28x86: clean up apic->apic_id_registered() methodsIngo Molnar
Impact: cleanup x86 subarchitectures each defined a "apic_id_registered()" method, which could be an inline function depending on which subarch we build for, and which was also the name of a genapic field. Untangle this namespace spaghetti by giving each of the instances a separate name. Also remove wrapper macro obfuscation. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86: clean up apic->acpi_madt_oem_check methodsIngo Molnar
Impact: refactor code x86 subarchitectures each defined a "acpi_madt_oem_check()" method, which could be an inline function, or an extern, or a static function, and which was also the name of a genapic field. Untangle this namespace spaghetti by setting ->acpi_madt_oem_check() to NULL on those subarchitectures that have no detection quirks, and rename the other ones (summit, es7000) that do. Also change default_acpi_madt_oem_check() to handle NULL entries, and clean its control flow up as well. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-28x86: rename 'genapic' to 'apic'Ingo Molnar
Rename genapic-> to apic-> references because in a future chagne we'll open-code all the indirect calls (instead of obscuring them via macros), so we want this reference to be as short as possible. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-04x86: rename mp_config_table to mpc_tableJaswinder Singh Rajput
Impact: cleanup, solve 80 columns wrap problems mp_config_table should be renamed to mpc_table. The reason: the 'c' in MPC already means 'config' - no need to repeat that in the type name. Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-16x86: Add cpu_mask_to_apicid_andMike Travis
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>
2008-11-18x86: fix wakeup_cpu with numaq/es7000, v2, fixYinghai Lu
Impact: fix wakeup_secondary_cpu with hotplug We can not put that into x86_quirks, because that is __initdata. So try to move that to genapic, and add update_genapic in x86_quirks. later we even could use that stub to: 1. autodetect CONFIG_ES7000_CLUSTERED_APIC 2. more correct inquire_remote_apic with apic_verbosity setting. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-11-17x86: fix wakeup_cpu with numaq/es7000, v2Yinghai Lu
Impact: fix secondary-CPU wakeup/init path with numaq and es7000 While looking at wakeup_secondary_cpu for WAKE_SECONDARY_VIA_NMI: |#ifdef WAKE_SECONDARY_VIA_NMI |/* | * Poke the other CPU in the eye via NMI to wake it up. Remember that the normal | * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this | * won't ... remember to clear down the APIC, etc later. | */ |static int __devinit |wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip) |{ | unsigned long send_status, accept_status = 0; | int maxlvt; |... | if (APIC_INTEGRATED(apic_version[phys_apicid])) { | maxlvt = lapic_get_maxlvt(); I noticed that there is no warning about undefined phys_apicid... because WAKE_SECONDARY_VIA_NMI and WAKE_SECONDARY_VIA_INIT can not be defined at the same time. So NUMAQ is using wrong wakeup_secondary_cpu. WAKE_SECONDARY_VIA_NMI, WAKE_SECONDARY_VIA_INIT and WAKE_SECONDARY_VIA_MIP are variants of a weird and fragile preprocessor-driven "HAL" mechanisms to specify the kind of secondary-CPU wakeup strategy a given x86 kernel will use. The vast majority of systems want to use INIT for secondary wakeup - NUMAQ uses an NMI, (old-style-) ES7000 uses 'MIP' (a firmware driven in-memory flag to let secondaries continue). So convert these mechanisms to x86_quirks and add a ->wakeup_secondary_cpu() method to specify the rare exception to the sane default. Extend genapic accordingly as well, for 32-bit. While looking further, I noticed that functions in wakecup.h for numaq and es7000 are different to the default in mach_wakecpu.h - but smpboot.c will only use default mach_wakecpu.h with smphook.h. So we need to add mach_wakecpu.h for mach_generic, to properly support numaq and es7000, and vectorize the following SMP init methods: int trampoline_phys_low; int trampoline_phys_high; void (*wait_for_init_deassert)(atomic_t *deassert); void (*smp_callin_clear_local_apic)(void); void (*store_NMI_vector)(unsigned short *high, unsigned short *low); void (*restore_NMI_vector)(unsigned short *high, unsigned short *low); void (*inquire_remote_apic)(int apicid); Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-23x86: drop double underscores from header guardsH. Peter Anvin
Drop double underscores from header guards in arch/x86/include. They are used inconsistently, and are not necessary. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-22x86: Fix ASM_X86__ header guardsH. Peter Anvin
Change header guards named "ASM_X86__*" to "_ASM_X86_*" since: a. the double underscore is ugly and pointless. b. no leading underscore violates namespace constraints. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-22x86, um: ... and asm-x86 moveAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: H. Peter Anvin <hpa@zytor.com>