summaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* x2apic: fix reserved APIC register accesses in print_local_APIC()Yinghai Lu2008-10-161-9/+18
| | | | | | | | | | | | | | | APIC_ARBPRI is a reserved register for XAPIC and beyond. APIC_RRR is a reserved register except for 82489DX, APIC for Pentium processors. APIC_EOI is a write only register. APIC_DFR is reserved in x2apic mode. Access to these registers in x2apic will result in #GP fault. Fix these apic register accesses. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sparseirq: export nr_irqs on m68k/sparc/s390Ingo Molnar2008-10-163-0/+3
| | | | | | | | | | | | Stephen Rothwell reported such build failures on m68k/sparc/s390: > ERROR: "nr_irqs" [drivers/net/hamradio/baycom_ser_fdx.ko] undefined! > ERROR: "nr_irqs" [drivers/net/3c59x.ko] undefined! export nr_irqs on these architectures too. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic - unify smp_spurious/error_interrupt declarationCyrill Gorcunov2008-10-161-8/+0
| | | | | | | | | According to entry_64.S we do pass pt_regs pointer into interrupt handlers but don't use them. So we safely may merge the declarations. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: let 64 bit to use 32 bit calibrate_apic_clockYinghai Lu2008-10-161-86/+2
| | | | | | | Use the 32-bit APIC calibration code - it's more mature. Signed-of-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: rename apic_32.c and apic_64.c to apic.cYinghai Lu2008-10-163-2313/+1
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic copy apic_64.c to apic_32.cYinghai Lu2008-10-161-0/+188
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic copy calibrate_APIC_clock to each other in apic_32/64.cYinghai Lu2008-10-162-0/+301
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic unify smp_spurious/error_interruptYinghai Lu2008-10-162-5/+43
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: merge header files in apic_xx.cYinghai Lu2008-10-162-1/+14
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: copy detect_init_APIC to the otherYinghai Lu2008-10-162-1/+101
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@mgail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: merge APIC_init_uniprocessorYinghai Lu2008-10-162-9/+90
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make apic_32/64.c more likeYinghai Lu2008-10-162-13/+122
| | | | | | | except x2apic, detec_init_APIC, and calibrating_APIC_clock Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: add hard_smp_prossor_id with MACRO in io_apic_xx.cYinghai Lu2008-10-162-0/+9
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use HAVE_X2APIC in apic_64.cYinghai Lu2008-10-161-12/+23
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic_xx.c order variablesYinghai Lu2008-10-162-38/+56
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic - unify smp_apic_timer_interruptCyrill Gorcunov2008-10-162-0/+5
| | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic_32.c should use __cpuinit sectionCyrill Gorcunov2008-10-161-3/+3
| | | | | | | | | All callers are __init or __cpuinit so there is no need to hold this code without CPU_HOTPLUG being set. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic - unify setup_local_APICCyrill Gorcunov2008-10-162-10/+62
| | | | | | | | | | | | | | - remove useless read of APIC_LVR - wrap with preempt_disable/enable - check for integrated APIC just in place v2: fix by Yinghai Lu. fix lapic_is_integrated using let 64-bit too have pic_mode Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic_64.c - add sanity check for spurious vector definitionCyrill Gorcunov2008-10-161-2/+7
| | | | | | | | | Do not check for SPUTIOUS_APIC_VECTOR definition twice. Check it once - is what we need. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic - unify setup_apicpmtimerCyrill Gorcunov2008-10-162-0/+12
| | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic - introduce get_physical_broadcast for 64bitCyrill Gorcunov2008-10-161-0/+10
| | | | | | | | | We don't really use it now on 64bit mode but could reserve it for future. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: apic_64.c - setup_APIC_timer has to be __cpuinit functionCyrill Gorcunov2008-10-161-1/+1
| | | | | | | | | There is no need to hold this code if CPU_HOTPLUG is not defined. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: VMI, initialize IRQ vectorAlok Kataria2008-10-161-0/+3
| | | | | | | Initialize vector_irq for the vmi used vector, to point to correct irq. Signed-off-by: Alok N Kataria <akataria@vmware.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: fix probe_nr_irqs for xenYinghai Lu2008-10-161-3/+8
| | | | | | | | | | | | | | otherwise Xen is _completely_ unusable with 5 or more VCPUs. (when !CONFIG_HAVE_SPARSE_IRQ). based on Alex Nixon's patch. also add +1 offset after redir_entries Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Acked-by: Alex Nixon <alex.nixon@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: fix 32-bit ioapic lockup with sparseirqsYinghai Lu2008-10-161-0/+2
| | | | | | | | | | Missed two lines when copying. Fix panic on one of Ingo's machines that need to adjust ioapic id when acpi off/ 32bit. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: sparse_irq needs spin_lock in allocationsYinghai Lu2008-10-161-1/+12
| | | | | | | Suresh Siddha noticed that we should have a spinlock around it. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* warning: fix arch x86 kernel io_apic cIngo Molnar2008-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | | fix warning: arch/x86/kernel/io_apic.c: In function ‘print_local_APIC’: arch/x86/kernel/io_apic.c:1786: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘u64’ arch/x86/kernel/io_apic.c:1787: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘u64’ By creating uniform behavior on 32-bit and 64-bit and printing out the ICR value in two 32-bit words. Code has changed: text data bss dec hex filename 22901 19650 17040 59591 e8c7 io_apic.o.before 22899 19650 17040 59589 e8c5 io_apic.o.after Due to the 32-bit cast narrowing the printed out value on 64-bit. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* xen: Fix bug `do_IRQ: cannot handle IRQ -1 vector 0x6 cpu 1'Alex Nixon2008-10-161-2/+0
| | | | | | | | | | | Following commit 9c3f2468d8339866d9ef6a25aae31a8909c6be0d, do_IRQ() looks up the IRQ number in the per-cpu variable vector_irq. This commit makes Xen initialise an identity vector_irq map for both X86_32 and X86_64. Signed-off-by: Alex Nixon <alex.nixon@citrix.com> Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: probe nr_irqs even only mptable is usedYinghai Lu2008-10-163-41/+33
| | | | | | | | | | | | | | | | | for !CONFIG_HAVE_SPARSE_IRQ fix: In file included from arch/x86/kernel/early-quirks.c:18: include/asm/io_apic.h: In function 'probe_nr_irqs': include/asm/io_apic.h:209: error: 'NR_IRQS' undeclared (first use in this function) include/asm/io_apic.h:209: error: (Each undeclared identifier is reported only once include/asm/io_apic.h:209: error: for each function it appears in.) v2: fix by Ingo Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make HAVE_SPARSE_IRQ support selectableYinghai Lu2008-10-165-28/+62
| | | | | | | | | | | Ingo said sparse_irq is some intrusive. need to make it selectable to make it simple, remove irq_desc as parameter in some functions. (ack, eoi, set_affinity). may need to make member if irq_chip to take irq_desc, or struct irq later. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: print local APIC of APs one by oneYinghai Lu2008-10-161-1/+6
| | | | | | | instead of print that of all APs at the time Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: remove first_free_entry/pin_map_sizeYinghai Lu2008-10-162-11/+0
| | | | | | | no user now Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: unify ack_apic_edgeYinghai Lu2008-10-161-38/+35
| | | | | | | | | use code in 64 to replace move_native_irq(irq, desc); in 32 bit Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: unify mask_IO_APIC_irqYinghai Lu2008-10-161-59/+21
| | | | | | | use MACRO for 32 bit too Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* io_apic: make 32 bit have io_apic resource in /proc/iomemYinghai Lu2008-10-161-8/+0
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* rename io_apic_64.c and io_apic_32.c to io_apic.cYinghai Lu2008-10-163-3914/+1
| | | | | | | The two files are now line by line equal. (sans a printk) Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make io_apic_32.c the same as io_apic_64.cIngo Molnar2008-10-161-377/+1064
| | | | Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make io_apic_64.c and io_apic_32.c the sameYinghai Lu2008-10-162-47/+829
| | | | | | | all the same except INTR_REMAPPING related and ioapic io resource. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: remove ioapic_forceYinghai Lu2008-10-162-3/+0
| | | | | | | no user left. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make 64 handle sis_apic_bug like the 32 bitYinghai Lu2008-10-161-4/+24
| | | | | | | | | | do we have 64bit system with sis chipset? [ mingo@elte.hu: nope, the problem chipset was 32-bit only. The code symmetry is good nevertheless. ] Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make headers files the same in io_apic_xx.cYinghai Lu2008-10-162-6/+21
| | | | | | | also make no_timer_check to be global on 64 bit, because vmi_32 is using that. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: order variables in io_apic_xx.cYinghai Lu2008-10-163-117/+127
| | | | | | | | | | move first_system_vector to apic_64.c. also add #ifdef CONFIG_INTR_REMAP to prepare 32 bit to use same file. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: ordering functions in io_apic_64.cYinghai Lu2008-10-161-34/+33
| | | | | | | try to make functions have the same order between 32-bit and 64-bit. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: ordering functions in io_apic_32.cYinghai Lu2008-10-161-84/+94
| | | | | | | | | | | prepare for unification: try to make functions be of the same order to io_apic_64.c. v2: add calling setup_msi_irq back to arch_setup_msi_irq Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, io-apic: remove union about dest for log/phyYinghai Lu2008-10-161-11/+7
| | | | | | | | | let user decide the meaning of the bits. This unifies the 32-bit and 64-bit io-apic code a bit. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: add debug info for 32bit sparse_irqYinghai Lu2008-10-163-4/+10
| | | | | | | | so could figure out bugs where we get an interrupt, but vector_irq is not initialized yet. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make 32bit support per_cpu vectorYinghai Lu2008-10-169-281/+547
| | | | | | | | | | | | | | | | | | so we can merge io_apic_32.c and io_apic_64.c v2: Use cpu_online_map as target cpus for bigsmp, just like 64-bit is doing. Also remove some unused TARGET_CPUS macro. v3: need to check if desc is null in smp_irq_move_cleanup also migration needs to reset vector too, so copy __target_IO_APIC_irq from 64bit. (the duplication will go away once the two files are unified.) Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make 32 bit to use sparse_irqYinghai Lu2008-10-164-30/+79
| | | | | | | | | | but actually irq still needs to be less than NR_IRQS, because interrupt[NR_IRQS] in entry.S. need to enable per_cpu vector... Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make 32bit to use irq_2_pin in irq_cfgYinghai Lu2008-10-161-35/+117
| | | | | | | so it is more like 64 bit. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make 32bit use irq_cfg_alloc, etcYinghai Lu2008-10-161-20/+160
| | | | | Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
OpenPOWER on IntegriCloud