aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* traps: x86_64: add TRACE_IRQS_OFF in error_entryAlexander van Heukelum2008-10-13
| | | | | | | | | | | Add TRACE_IRQS_OFF just before entering the C code. All exceptions are taken via interrupt gates. If irq tracing is enabled, it should be notified as soon as possible. Interrupts are only (conditionally) re-enabled in C code. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86, uv: add early detection of UV system typesJack Steiner2008-10-13
| | | | | | | | | | | | | Portions of the ACPI code needs to know if a system is a UV system prior to genapic initialization. This patch adds a call early_acpi_boot_init() so that the apic type is discovered earlier. V2 of the patch adding fixes from Yinghai Lu. Much cleaner and smaller. Signed-off-by: Jack Steiner <steiner@sgi.com> Acked-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: move vgetcpu mode probing to cpu detectionGlauber Costa2008-10-13
| | | | | | | | Take it out of time initialization and move it to cpu detection time. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: wrap MCA_bus test around an ifdefGlauber Costa2008-10-13
| | | | | | | | | | Only test for MCA_bus if support for MCA is compiled in. Also, for x86_64, write the code inside the conditional for consistency with i386. It won't bite us, since it'll probably never select CONFIG_MCA anyway. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: replace hardcoded numberGlauber Costa2008-10-13
| | | | | | | | Replace "4" in time_32.c code by sizeof(long). This way, it can work on x86_64 too. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: rename timer_event_interrupt to timer_interruptGlauber Costa2008-10-13
| | | | | Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make init_ISA_irqs nonstaticGlauber Costa2008-10-13
| | | | | Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: factor out irq initialization for x86_64Glauber Costa2008-10-13
| | | | | | | Provide apic_intr_init and smp_intr_init functions. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: bind irq0 irq data to cpu0Glauber Costa2008-10-13
| | | | | Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use user_mode_vm instead of user_modeGlauber Costa2008-10-13
| | | | | | | | For x86_64, it does not really matter. But makes the code equal to i386. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: remove SEGMENT_IS_FLAT_CODEGlauber Costa2008-10-13
| | | | | | | There are no users in the kernel. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use frame pointer information on x86_64 profile_pcGlauber Costa2008-10-13
| | | | | Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: set bp field in pt_regs properlyGlauber Costa2008-10-13
| | | | | | | | | | | Save rbp twice: One is for marking the stack frame, as usual (already there), and the other, to fill pt_regs properly. This is because bx comes right before the last saved register in that structure, and not bp. If the base pointer were in the place bx is today, this would not be needed. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: coalesce testsGlauber Costa2008-10-13
| | | | | | | | Coalesce v8086_mode and user_mode into a single user_mode_vm() test. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use user_mode macroGlauber Costa2008-10-13
| | | | | | | | | Instead of using SEGMENT_IS_KERNEL_CODE, use the "user_mode" macro, which can play the same role. Delete the former, since it now lacks any user. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: cpu don't print duplicated vendor stringYinghai Lu2008-10-13
| | | | | | | Some CPUs have vendor string in the middle of model_id instead of beginning Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: make mm/gup.c more virtualization friendlyJan Beulich2008-10-13
| | | | | | | | | Since pte_flags() is much cheaper than pte_val() in some virtualized environments (namely, Xen), use the former whereever possible. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: "Nick Piggin" <npiggin@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86-64: fix combining of regions in init_memory_mapping()Jan Beulich2008-10-13
| | | | | | | | | | | | | When nr_range gets decremented, the same slot must be considered for coalescing with its new successor again. The issue is apparently pretty benign to native code, but surfaces as a boot time crash in our forward ported Xen tree (where the page table setup overall works differently than in native). Signed-off-by: Jan Beulich <jbeulich@novell.com> Acked-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: smpboot - check if we have ESR register in wakeup_secondary_cpuCyrill Gorcunov2008-10-13
| | | | | | | | | We should check if we have ESR register before reading from it. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Cc: "Maciej W. Rozycki" <macro@linux-mips.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: add memory clobber in switch_to()Vegard Nossum2008-10-13
| | | | | | | | | | | Segment registers are reloaded, so we should add a memory clobber. The generated assembly code is identical in my tests, but this doesn't mean it is necessarily true for all configurations/compilers. x86_64 already has the memory clobber. Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: print out EBDA/lowmem addressIngo Molnar2008-10-13
| | | | | | it's useful for debugging purposes to know the location of the EBDA. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: check dsdt before find oem table for es7000, v2Yinghai Lu2008-10-13
| | | | | | | v2: use __acpi_unmap_table() Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86-64: don't check for map replacementJeremy Fitzhardinge2008-10-13
| | | | | | | | | The check prevents flags on mappings from being changed, which is not desireable. There's no need to check for replacing a mapping, and x86-32 does not do this check. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: use early_memremap() in setup.cJeremy Fitzhardinge2008-10-13
| | | | | | | | The remappings in setup.c are all just ordinary memory, so use early_memremap() rather than early_ioremap(). Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: add early_memremap()Jeremy Fitzhardinge2008-10-13
| | | | | | | | | | | | early_ioremap() is also used to map normal memory when constructing the linear memory mapping. However, since we sometimes need to be able to distinguish between actual IO mappings and normal memory mappings, add a early_memremap() call, which maps with PAGE_KERNEL (as opposed to PAGE_KERNEL_IO for early_ioremap()), and use it when constructing pagetables. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: remove duplicate early_ioremap declarationsJeremy Fitzhardinge2008-10-13
| | | | | | | early_ioremap() is redeclared in several places; remove them. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: add _PAGE_IOMAP pte flag for IO mappingsJeremy Fitzhardinge2008-10-13
| | | | | | | | | | | | | | | Use one of the software-defined PTE bits to indicate that a mapping is intended for an IO address. On native hardware this is irrelevent, since a physical address is a physical address. But in a virtual environment, physical addresses are also virtualized, so there needs to be some way to distinguish between pseudo-physical addresses and actual hardware addresses; _PAGE_IOMAP indicates this intent. By default, __supported_pte_mask masks out _PAGE_IOMAP, so it doesn't even appear in the final pagetable. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: trace_hardirqs_fixup should now not be necessary: irqs are off.Alexander van Heukelum2008-10-13
| | | | | | | | | The exception handlers in entry_32.S should now all call TRACE_IRQS_OFF before calling the C code. The calls to trace_hardirqs_fixup should now be unnecessary. Remove them. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: add TRACE_IRQS_OFF for the exception 3 (int3)Alexander van Heukelum2008-10-13
| | | | | | | | At this point interrupts are off, so let's inform the tracing code of that fact before calling into C. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: add TRACE_IRQS_OFF for the nmiAlexander van Heukelum2008-10-13
| | | | | | | | At this point interrupts are off, so let's inform the tracing code of that fact before calling into C. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: add TRACE_IRQS_OFF for exception 1 (debug)Alexander van Heukelum2008-10-13
| | | | | | | | At this point interrupts are off, so let's inform the tracing code of that fact before calling into C. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: add TRACE_IRQS_OFF to entry_32.S in 'error_code'Alexander van Heukelum2008-10-13
| | | | | | | | | Many exceptions use the same code path via the label 'error_code' in entry_32.S. At this point interrupts are off, so let's inform the tracing code of that fact before calling into C. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: remove temporary DO_TRAP macros, expanding the last one usedAlexander van Heukelum2008-10-13
| | | | | | | | Only one use of the DO_TRAP macros remains. Expand that one and remove the macros now. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 19 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle SIMD coprocessor exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 18 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle machine check exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 17 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle alignment check exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 16 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle coprocessor error exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 15 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle exception 15 with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 13 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle general protection exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 12 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle stack segment exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 11 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle segment not present exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 10 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle invalid TSS exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 9 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle coprocessor segment overrun exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 7 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | | | | | Handle no coprocessor exception with interrupt initially off. device_not_available in entry_32.S calls either math_state_restore or math_emulate. This patch adds an extra indirection to be able to re-enable interrupts explicitly in traps_32.c Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 6 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle invalid opcode exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 5 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle bounds exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 4 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle overflow exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: expand exception 3 DO_TRAP macroAlexander van Heukelum2008-10-13
| | | | | | | | | | | | The int3 exception was already takes as an interrupt and do_int3 does not fit in the new DO_ERROR macro. This patch just expands the DO_TRAP macro and rearranges the code a bit. No functional changes intended. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: convert hardware exception 0 to an interrupt gateAlexander van Heukelum2008-10-13
| | | | | | | Handle divide error exception with interrupt initially off. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* i386: prepare to convert exceptions to interruptsAlexander van Heukelum2008-10-13
| | | | | | | | | | | | There is some macro magic in traps_32.c to construct standard exception dispatch functions. This patch renames the DO_ERROR- like macros to DO_TRAP, and introduces new DO_ERROR ones that conditionally reenable interrupts explicitly, like x86_64. No code changes. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>