summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/io_apic.c
Commit message (Collapse)AuthorAgeFilesLines
* x86, apic: move APIC drivers to arch/x86/kernel/apic/*Ingo Molnar2009-02-171-4160/+0Star
| | | | | | | | | | | | | 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: 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: pre init pirq_entries[]Yinghai Lu2009-02-161-13/+3Star
| | | | | | | | | | | Impact: cleanup set default value early - this allows the removal of a number of dynamic initialization codepaths, and an #ifdef. 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-4/+0Star
| | | | | | | | | Impact: cleanup So we remove some #ifdefs. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: unstatic ioapic entry funcsJeremy Fitzhardinge2009-02-091-5/+5
| | | | | | | Unstatic ioapic_write_entry and setup_ioapic_entry functions so that the Xen code can do its own ioapic routing setup. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
* x86: find nr_irqs_gsi with mp_ioapic_routingYinghai Lu2009-02-091-5/+15
| | | | | | | | | | | | | | | | | | | | | | Impact: find right nr_irqs_gsi on some systems. One test-system has gap between gsi's: [ 0.000000] ACPI: IOAPIC (id[0x04] address[0xfec00000] gsi_base[0]) [ 0.000000] IOAPIC[0]: apic_id 4, version 0, address 0xfec00000, GSI 0-23 [ 0.000000] ACPI: IOAPIC (id[0x05] address[0xfeafd000] gsi_base[48]) [ 0.000000] IOAPIC[1]: apic_id 5, version 0, address 0xfeafd000, GSI 48-54 [ 0.000000] ACPI: IOAPIC (id[0x06] address[0xfeafc000] gsi_base[56]) [ 0.000000] IOAPIC[2]: apic_id 6, version 0, address 0xfeafc000, GSI 56-62 ... [ 0.000000] nr_irqs_gsi: 38 So nr_irqs_gsi is not right. some irq for MSI will overwrite with io_apic. need to get that with acpi_probe_gsi when acpi io_apic is used Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: check_timer cleanupYinghai Lu2009-02-091-8/+22
| | | | | | | | | | | | | | | Impact: make check-timer more robust potentially solve boot fragility For edge trigger io-apic routing, we already unmasked the pin via setup_IO_APIC_irq(), so don't unmask it again. Also call local_irq_disable() between timer_irq_works(), because it calls local_irq_enable() inside. Also remove not needed apic version reading for 64-bit Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use NR_IRQS_LEGACY to replace 16Yinghai Lu2009-02-091-4/+4
| | | | | | | | | Impact: cleanup also could kill platform_legacy_irq Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86/irq: optimize nr_irqsYinghai Lu2009-02-091-5/+11
| | | | | | | | | | | | Impact: make nr_irqs depend more on cards used in a system depend on nr_irq_gsi more, and have a ratio for MSI. v2: make nr_irqs less than NR_VECTORS * nr_cpu_ids aka if only one cpu, we only can support nr_irqs = NR_VECTORS Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* Merge branch 'x86/urgent' into x86/apicIngo Molnar2009-02-051-2/+3
|\ | | | | | | | | | | | | | | | | | | Conflicts: arch/x86/mach-default/setup.c Semantic merge: arch/x86/kernel/irqinit_32.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * irq, x86: fix lock status with numa_migrate_irq_descYinghai Lu2009-02-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eric Paris reported: > I have an hp dl785g5 which is unable to successfully run > 2.6.29-0.66.rc3.fc11.x86_64 or 2.6.29-rc2-next-20090126. During bootup > (early in userspace daemons starting) I get the below BUG, which quickly > renders the machine dead. I assume it is because sparse_irq_lock never > gets released when the BUG kills that task. Adjust lock sequence when migrating a descriptor with CONFIG_NUMA_MIGRATE_IRQ_DESC enabled. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | smp, generic: introduce arch_disable_smp_support() instead of ↵Ingo Molnar2009-02-051-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: remove subarchitecture supportIngo Molnar2009-01-291-17/+0Star
| | | | | | | | | | | | | | | | | | Remove the 32-bit subarchitecture support code. All subarchitectures but Voyager have been converted. Voyager will be done later or will be removed. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, smp: remove mach_ipi.hIngo Molnar2009-01-291-1/+0Star
| | | | | | | | | | | | Move mach_ipi.h definitions into genapic.h. 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: remove mach_apicdef.hIngo Molnar2009-01-281-1/+0Star
| | | | | | | | | | | | Move its definitions into apic.h. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, apic: untangle the send_IPI_*() jungleIngo Molnar2009-01-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-9/+12
| | | | | | | | | | | | | | | | | | | | - 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: clean up ->apicid_to_cpu_present()Ingo Molnar2009-01-281-2/+2
| | | | | | | | | | | | | | | | - separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, apic: streamline the ->multi_timer_check() quirkIngo Molnar2009-01-281-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | x86, apic: clean up ->ioapic_phys_id_map()Ingo Molnar2009-01-281-2/+2
| | | | | | | | | | | | | | | | - separate the namespace - remove macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, apic: clean up ->vector_allocation_domain()Ingo Molnar2009-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - 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>
* | x86, apic: clean up check_apicid*() callbacksIngo Molnar2009-01-281-3/+3
| | | | | | | | | | | | | | Clean up these methods - to make it clearer which function is used in which case. 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, apic: clean up / remove TARGET_CPUSIngo Molnar2009-01-281-11/+11
| | | | | | | | | | | | | | | | Impact: cleanup use apic->target_cpus() directly instead of the TARGET_CPUS wrapper. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, apic: remove IRQ_DEST_MODE / IRQ_DELIVERY_MODEIngo Molnar2009-01-281-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | x86, genapic: rename int_delivery_mode, et. al.Ingo Molnar2009-01-281-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: rename 'genapic' to 'apic'Ingo Molnar2009-01-281-40/+40
| | | | | | | | | | | | | | | | 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>
| |
| \
*-. \ Merge branches 'x86/asm', 'x86/cleanups', 'x86/cpudetect', 'x86/debug', ↵Ingo Molnar2009-01-281-34/+0Star
|\ \ \ | | |/ | |/| | | | 'x86/doc', 'x86/header-fixes', 'x86/mm', 'x86/paravirt', 'x86/pat', 'x86/setup-v2', 'x86/subarch', 'x86/uaccess' and 'x86/urgent' into x86/core
| | * x86: Remove never-called arch_setup_msi_irq()Michael Ellerman2009-01-191-34/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 75c46fa, "x64, x2apic/intr-remap: MSI and MSI-X support for interrupt remapping infrastructure", x86 has had an implementation of arch_setup_msi_irqs(). That implementation does not call arch_setup_msi_irq(), instead it calls setup_irq(). No other x86 code calls arch_setup_msi_irq(). That leaves only arch_setup_msi_irqs() in drivers/pci/msi.c, but that routine is overridden by the x86 version of arch_setup_msi_irqs(). So arch_setup_msi_irq() is dead code, remove it. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | x86: make UV support configurableNick Piggin2009-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make X86 SGI Ultraviolet support configurable. Saves about 13K of text size on my modest config. text data bss dec hex filename 6770537 1158680 694356 8623573 8395d5 vmlinux 6757492 1157664 694228 8609384 835e68 vmlinux.nouv Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| | |
| \ \
| \ \
| \ \
*---. \ \ Merge branches 'cpus4096', 'x86/cleanups' and 'x86/urgent' into x86/percpuIngo Molnar2009-01-151-71/+92
|\ \ \ \ \ | |_|_|/ / |/| | | / | | | |/ | | |/|
| | | * x86: fully honor "nolapic"Jan Beulich2009-01-151-0/+6
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: replacing mp_config_intsrc with mpc_intsrcJaswinder Singh Rajput2009-01-141-32/+32
| | | | | | | | | | | | | | | | | | | | | Impact: cleanup, solve 80 columns wrap problems Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| | * x86: replacing mp_config_ioapic with mpc_ioapicJaswinder Singh Rajput2009-01-141-31/+29Star
| | | | | | | | | | | | | | | | | | | | | Impact: cleanup, solve 80 columns wrap problems Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| | * x86: smp.h move boot_cpu_id declartion to cpu.hJaswinder Singh Rajput2009-01-071-0/+1
| |/ |/| | | | | | | | | | | Impact: cleanup Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * x86: arch_probe_nr_irqsYinghai Lu2009-01-131-0/+16
| | | | | | | | | | | | | | Impact: save RAM with large NR_CPUS, get smaller nr_irqs Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Mike Travis <travis@sgi.com>
| * irq: change references from NR_IRQS to nr_irqsMike Travis2009-01-111-1/+1
| | | | | | | | | | | | | | | | | | Impact: preparation, cleanup, add KERN_INFO printk Modify references from NR_IRQS to nr_irqs as the later will become variable-sized based on nr_cpu_ids when CONFIG_SPARSE_IRQS=y. Signed-off-by: Mike Travis <travis@sgi.com>
| * cpumask: update irq_desc to use cpumask_var_tMike Travis2009-01-111-10/+10
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Impact: reduce memory usage, use new cpumask API. Replace the affinity and pending_masks with cpumask_var_t's. This adds to the significant size reduction done with the SPARSE_IRQS changes. The added functions (init_alloc_desc_masks & init_copy_desc_masks) are in the include file so they can be inlined (and optimized out for the !CONFIG_CPUMASKS_OFFSTACK case.) [Naming chosen to be consistent with the other init*irq functions, as well as the backwards arg declaration of "from, to" instead of the more common "to, from" standard.] Includes a slight change to the declaration of struct irq_desc to embed the pending_mask within ifdef(CONFIG_SMP) to be consistent with other references, and some small changes to Xen. Tested: sparse/non-sparse/cpumask_offstack/non-cpumask_offstack/nonuma/nosmp on x86_64 Signed-off-by: Mike Travis <travis@sgi.com> Cc: Chris Wright <chrisw@sous-sol.org> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: virtualization@lists.osdl.org Cc: xen-devel@lists.xensource.com Cc: Yinghai Lu <yhlu.kernel@gmail.com>
*-. Merge branches 'x86/cleanups', 'x86/mpparse', 'x86/numa' and 'x86/uv' into ↵Ingo Molnar2009-01-061-3/+3
|\ \ | | | | | | | | | x86/urgent
| | * Merge branch 'cpus4096-for-linus-3' of ↵Linus Torvalds2009-01-031-3/+3
| |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (77 commits) x86: setup_per_cpu_areas() cleanup cpumask: fix compile error when CONFIG_NR_CPUS is not defined cpumask: use alloc_cpumask_var_node where appropriate cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t x86: use cpumask_var_t in acpi/boot.c x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids sched: put back some stack hog changes that were undone in kernel/sched.c x86: enable cpus display of kernel_max and offlined cpus ia64: cpumask fix for is_affinity_mask_valid() cpumask: convert RCU implementations, fix xtensa: define __fls mn10300: define __fls m32r: define __fls h8300: define __fls frv: define __fls cris: define __fls cpumask: CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS cpumask: zero extra bits in alloc_cpumask_var_node cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/ cpumask: convert mm/ ...
| | * cpumask: use alloc_cpumask_var_node where appropriateMike Travis2009-01-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Impact: Reduce inter-node memory traffic. Reduces inter-node memory traffic (offloading the global system bus) by allocating referenced struct cpumasks on the same node as the referring struct. Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| | * Merge branch 'master' of ↵Mike Travis2009-01-031-3/+2Star
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask into merge-rr-cpumask Conflicts: arch/x86/kernel/io_apic.c kernel/rcuclassic.c kernel/sched.c kernel/time/tick-sched.c Signed-off-by: Mike Travis <travis@sgi.com> [ mingo@elte.hu: backmerged typo fix for io_apic.c ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
| | | * Merge branch 'master' of ↵Rusty Russell2008-12-311-250/+524
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: arch/x86/kernel/io_apic.c
| | | * \ Merge branch 'master' of ↵Rusty Russell2008-12-291-2/+1Star
| | | |\ \ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
* | | | | | x86: remove debug printks (io_apic.c)Markus Trippelsdorf2009-01-021-2/+0Star
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Impact: reduce printk noise The message "alloc irq_2_pin on cpu 0 node 0" is printed way too often. % dmesg|grep irq_2_pin|wc -l 20 Get rid of the debug printks. Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | | | | Merge branch 'linus' into x86/cleanupsIngo Molnar2009-01-021-384/+637
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/x86/kernel/reboot.c
| * | | | | Merge branch 'cpus4096-for-linus-2' of ↵Linus Torvalds2009-01-021-192/+178Star
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (66 commits) x86: export vector_used_by_percpu_irq x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and() sched: nominate preferred wakeup cpu, fix x86: fix lguest used_vectors breakage, -v2 x86: fix warning in arch/x86/kernel/io_apic.c sched: fix warning in kernel/sched.c sched: move test_sd_parent() to an SMP section of sched.h sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0 sched: activate active load balancing in new idle cpus sched: bias task wakeups to preferred semi-idle packages sched: nominate preferred wakeup cpu sched: favour lower logical cpu number for sched_mc balance sched: framework for sched_mc/smt_power_savings=N sched: convert BALANCE_FOR_xx_POWER to inline functions x86: use possible_cpus=NUM to extend the possible cpus allowed x86: fix cpu_mask_to_apicid_and to include cpu_online_mask x86: update io_apic.c to the new cpumask code x86: Introduce topology_core_cpumask()/topology_thread_cpumask() x86: xen: use smp_call_function_many() x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c ... Fixed up trivial conflict in kernel/time/tick-sched.c manually