aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-11-10x86 - 32-bit ptrace emulation mishandles 6th argChuck Ebbert1-13/+6
[ jdike - Pushing Chuck's patch - see http://lkml.org/lkml/2005/9/16/261 for some history and a test program. UML is also broken without this patch - its processes get SIGBUS from the corrupt 6th argument to mmap being interpretted as a file offset ] When the 32-bit vDSO is used to make a system call, the %ebp register for the 6th syscall arg has to be loaded from the user stack (where it's pushed by the vDSO user code). The native i386 kernel always does this before stopping for syscall tracing, so %ebp can be seen and modified via ptrace to access the 6th syscall argument. The x86-64 kernel fails to do this, presenting the stack address to ptrace instead. This makes the %rbp value seen by 64-bit ptrace of a 32-bit process, and the %ebp value seen by a 32-bit caller of ptrace, both differ from the native i386 behavior. This patch fixes the problem by putting the word loaded from the user stack into %rbp before calling syscall_trace_enter, and reloading the 6th syscall argument from there afterwards (so ptrace can change it). This makes the behavior match that of i386 kernels. Original-Patch-By: Roland McGrath <roland@redhat.com> Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-10x86_64: ia32 ptrace THREAD_AREA fixRoland McGrath1-8/+2
The addr argument to PTRACE_GET_THREAD_AREA and PTRACE_SET_THREAD_AREA is not a magic constant. It's derived from the segment register values being used, which are computed originally from the index used with set_thread_area. The value does not need to match what a native i386 kernel would accept. It needs to match the segment selectors that can actually be in use in this 32-bit process. The 64-bit ptrace support for PTRACE_GET_THREAD_AREA (normally used only on 32-bit processes) is correct, but the 32-bit emulation of ptrace is broken. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-09x86: make nmi_cpu_busy() always definedIngo Molnar1-2/+2
nmi_cpu_busy() must be available on !SMP too. this is in preparation to a smp_call_function_mask() fix. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-09x86: make ipi_handler() always definedIngo Molnar1-4/+2
prepare for up_smp_call_function() to ensure that the 'func' pointer is unused. (which is related to a KVM build fix) Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-05Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguestLinus Torvalds1-35/+34
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-lguest: lguest: tidy up documentation kernel/futex.c: make 3 functions static unexport access_process_vm lguest: make async_hcall() static
2007-11-05lguest: tidy up documentationRusty Russell1-22/+21
After Adrian Bunk's "make async_hcall static" moved things around, update comments to match (aka "make Guest"). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-11-05lguest: make async_hcall() staticAdrian Bunk1-13/+13
async_hcall() can become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-11-04x86 setup: set %ebx == %ebp == %edi == 0 on protected mode entryH. Peter Anvin1-1/+3
In accordance with the newly formalized 32-bit boot protocol, set %ebx == %ebp == %edi == 0 in order to support future extensions to the protocol. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-11-04x86 setup: add a near jump to serialize %cr0 on 386/486H. Peter Anvin1-2/+2
The 386 and 486 needs a jump immediately after setting %cr0 in order to serialize the pipeline. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-11-03Merge branch 'v2.6.24-rc1-lockdep' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdepLinus Torvalds6-12/+16
* 'v2.6.24-rc1-lockdep' of git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep: lockdep: fix a typo in the __lock_acquire comment sched: fix unconditional irq lock lockdep: fixup irq tracing
2007-10-30Remove bogus default y for DMAR and NET_DMAAndi Kleen1-1/+0
No reason I can think of of making them default y Most people don't have the hardware and with default y they just pollute lots of configs during make oldconfig. Signed-off-by: Andi Kleen <ak@suse.de> Acked-by: Jeff Garzik <jeff@garzik.org> Acked-by: "Nelson, Shannon" <shannon.nelson@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-30remove the dead X86_REMOTE_DEBUG optionAdrian Bunk1-3/+0
This patch removes the dead X86_REMOTE_DEBUG option. Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-30x86: merge EARLY_PRINTK optionsAdrian Bunk2-6/+1
This patch merges the x86_64 EARLY_PRINTK option into the i386 one. Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-30x86: mm/discontig_32.c: make code staticAdrian Bunk1-2/+2
node0_bdata and paddr_to_nid() can become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30x86: kernel/setup_32.c: unexport machine_idAdrian Bunk1-3/+0
This patch removes the unused EXPORT_SYMBOL(machine_id). Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30x86 gart: rename symbols only used for the GART implementationJoerg Roedel4-13/+14
This patch renames the 4 symbols iommu_hole_init(), iommu_aperture, iommu_aperture_allowed, iommu_aperture_disabled. All these symbols are only used for the GART implementation of IOMMUs. It adds and additional gart_ prefix to them. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30x86 gart: make some variables and functions staticJoerg Roedel1-4/+4
This patch makes some functions and variables static in pci-gart_64.c which are not used somewhere else. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Acked-by: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30x86 gart: rename CONFIG_IOMMU to CONFIG_GART_IOMMUJoerg Roedel6-10/+10
This patch renames the IOMMU config option to GART_IOMMU because in fact it means the GART and not general support for an IOMMU on x86. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Acked-by: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30x86 gart: rename iommu.h to gart.hJoerg Roedel9-9/+9
This patch renames the include file asm-x86/iommu.h to asm-x86/gart.h to make clear to which IOMMU implementation it belongs. The patch also adds "GART" to the Kconfig line. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Acked-by: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-30x86: additional CPUID strings; fix strings for AMD-ecxH. Peter Anvin2-10/+10
Additional CPUID strings (sse4_1, sse4_2, sse5, skinit, wdt); fix the positioning of the AMD ecx strings (cr8_legacy was duplicated under two different names, so the alignment of all the other strings were off by one.) Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-29Revert "x86_64: allocate sparsemem memmap above 4G"Linus Torvalds1-6/+0
This reverts commit 2e1c49db4c640b35df13889b86b9d62215ade4b6. First off, testing in Fedora has shown it to cause boot failures, bisected down by Martin Ebourne, and reported by Dave Jobes. So the commit will likely be reverted in the 2.6.23 stable kernels. Secondly, in the 2.6.24 model, x86-64 has now grown support for SPARSEMEM_VMEMMAP, which disables the relevant code anyway, so while the bug is not visible any more, it's become invisible due to the code just being irrelevant and no longer enabled on the only architecture that this ever affected. Reported-by: Dave Jones <davej@redhat.com> Tested-by: Martin Ebourne <fedora@ebourne.me.uk> Cc: Zou Nan hai <nanhai.zou@intel.com> Cc: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Acked-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-29x86: fix pci-gart failure handlingFUJITA Tomonori1-1/+1
blk_rq_map_sg doesn't initialize sg->dma_address/length to zero anymore. Some low level drivers reuse sg lists without initializing so IOMMUs might get non-zero dma_address/length. If map_sg fails, we need pass the number of the mapped entries to gart_unmap_sg. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-27x86: Dump filtering supports x86_64 sparsememKen'ichi Ohmichi1-0/+2
This patch adds the symbol "init_level4_pgt" to the vmcoreinfo data so that makedumpfile (dump filtering command) supports x86_64 sparsemem kernel of linux-2.6.24. makedumpfile creates a small dumpfile by excluding unnecessary pages for the analysis. It checks attributes in page structures and distinguishes necessary pages and unnecessary ones. To check them, makedumpfile gets the vmcoreinfo data which has the minimum debugging information only for dump filtering. For older x86_64 kernel (linux-2.6.23 or before), makedumpfile translates the virtual address of page structure into physical address by subtracting PAGE_OFFSET from virtual address, but this translation isn't effective for linux-2.6.24 sparsemem kernel, because its page structures are in virtual memmap area. makedumpfile should translate their virtual address by 4-levels paging and it needs the symbol "init_level4_pgt". Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27x86: fix compiler warnings in arch/x86/kernel/early-quirks.cJeff Garzik1-1/+3
fix this warning: arch/x86/kernel/early-quirks.c:40: warning: nvidia_hpet_check defined but not used Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27x86: fix !SMP compiler warning in arch/x86/kernel/acpi/processor.cJeff Garzik1-2/+1
Fix !CONFIG_SMP warning: arch/x86/kernel/acpi/processor.c: In function arch_acpi_processor_init_pdc: arch/x86/kernel/acpi/processor.c:65: warning: unused variable cpu Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27x86: Fix boot protocol KEEP_SEGMENTS check.Eric W. Biederman3-8/+21
The kernel only ever supports 1 version of the boot protocol so there is no need to check the boot protocol revision to see if a feature is supported. Both x86 and x86_64 support the same boot protocol so we need to implement the KEEP_SEGMENTS on x86_64 as well. It isn't just paravirt bootloaders that could use this functionality. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Vivek Goyal <vgoyal@in.ibm.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Zachary Amsden <zach@vmware.com> Cc: Andi Kleen <ak@suse.de> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27x86: voyager: fix bogus conversion to per_cpu for boot_cpu_infoJames Bottomley1-2/+2
There were two problems. Firstly, someone forgot the struct keyword in front of cpuinfo_x86, so I take it this wasn't even compile checked. Secondly, the actual definition has this as a SHARED_ALIGNED, so the definitions mismatch. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-27x86: export smp_ops to allow modular build of KVMThomas Gleixner1-0/+1
KVM uses smp_call_function_mask and therefor need smp_ops to be exported. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-27Revert "i386: export i386 smp_call_function_mask() to modules"Thomas Gleixner1-7/+0
This reverts commit 6442eea937ef797d4b66733f49c82e2fdc2aca6f. The patch breaks smp_ops and needs to be reverted. The solution to allow modular build of KVM is to export smp_ops instead. Pointed-out-by: James Bottomley <jejb> tglx, so write out 100 times "voyager is a useful architecture" ... <tglx> yes, Sir Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-26Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setupLinus Torvalds5-25/+51
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup: x86 setup: sizeof() is unsigned, unbreak comparisons x86 setup: handle boot loaders which set up the stack incorrectly
2007-10-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86Linus Torvalds10-0/+5892
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/x86: x86: kill the old i386 and x86_64 directories x86: move i386 and x86_64 Kconfig files to x86 directory kconfig: small code refactoring in kconfig Makefile x86: unification of i386 and x86_64 Kconfig.debug x86: move defconfig files for i386 and x86_64 to x86 x86: move i386 and x86_64 Makefiles to arch/x86
2007-10-25x86 setup: sizeof() is unsigned, unbreak comparisonsH. Peter Anvin4-5/+5
We use signed values for limit checking since the values can go negative under certain circumstances. However, sizeof() is unsigned and forces the comparison to be unsigned, so move the comparison into the heap_free() macros so we can ensure it is a signed comparison. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-10-25x86 setup: handle boot loaders which set up the stack incorrectlyH. Peter Anvin2-20/+46
Apparently some specific versions of LILO enter the kernel with a stack pointer that doesn't match the rest of the segments. Make our best attempt at untangling the resulting mess. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-10-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86Linus Torvalds2-4/+4
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: x86: fix bogus KERN_ALERT on oops x86: lguest build fix x86: fix CONFIG_KEXEC build breakage
2007-10-25Merge branch 'sg' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds1-2/+1
* 'sg' of git://git.kernel.dk/linux-2.6-block: fix sg_phys to use dma_addr_t ub: add sg_init_table for sense and read capacity commands x86: pci-gart fix blackfin: fix sg fallout xtensa: dma-mapping.h is using linux/scatterlist.h functions, so include it SG: audit of drivers that use blk_rq_map_sg() arch/um/drivers/ubd_kern.c: fix a building error SG: Change sg_set_page() to take length and offset argument AVR32: Fix sg_page breakage mmc: sg fallout m68k: sg fallout More SG build fixes sg: add missing sg_init_table calls to zfcp SG build fix
2007-10-25x86: move i386 and x86_64 Kconfig files to x86 directorySam Ravnborg3-0/+2537
After a small change in kconfig Makefile we could move all x86 Kconfig files to x86 directory. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25x86: unification of i386 and x86_64 Kconfig.debugRandy Dunlap1-0/+119
Adding proper dependencies so the two Kconfig.debug files are now identical and move the result file to x86. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25x86: move defconfig files for i386 and x86_64 to x86Sam Ravnborg3-1/+2858
With some small changes to kconfig makefile we can now locate the defconfig files for i386 and x86_64 in the configs/ subdirectory under x86. make ARCH=i386 defconfig and make defconfig works as expected also after this change. But arch maintainers shall now update a defconfig file in the configs/ directory. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25x86: move i386 and x86_64 Makefiles to arch/x86Sam Ravnborg4-0/+379
Moving the ARCH specific Makefiles for i386 and x86_64 required a litle bit tweaking in the top-lvel Makefile. SRCARCH is now set in the top-level Makefile because we need this info to include the correct arch Makefile. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-10-25lockdep: fixup irq tracingPeter Zijlstra6-12/+16
Ensure we fixup the IRQ state before we hit any locking code. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-10-25x86: pci-gart fixFUJITA Tomonori1-2/+1
map_sg could copy the last sg element to another position (if merging some elements). It breaks sg chaining. This copies only dma_address/length instead of the whole sg element. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-25lguest: documentation updateRusty Russell2-26/+30
Went through the documentation doing typo and content fixes. This patch contains only comment and whitespace changes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-25lguest: build fixJeff Garzik1-0/+1
Fix this error (i386 !SMP build) arch/x86/lguest/boot.c: In function ‘lguest_init’: arch/x86/lguest/boot.c:1059: error: ‘pm_power_off’ undeclared (first use in this function) by including linux/pm.h. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-25lguest: use defines from x86 headers instead of magic numbersRusty Russell1-3/+2
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2007-10-24x86: fix bogus KERN_ALERT on oopsAlexey Dobriyan1-1/+1
fix this: printing eip: f881b9f3 *pdpt = 0000000000003001 <1>*pde = 000000000480a067 *pte = 0000000000000000 ^^^ [ mingo: added KERN_CONT as suggested by Pekka Enberg ] Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-24x86: lguest build fixJeff Garzik1-0/+1
Fix this error (i386 !SMP build): arch/x86/lguest/boot.c: In function lguest_init: arch/x86/lguest/boot.c:1059: error: pm_power_off undeclared (first use in this function) by including linux/pm.h. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-24x86: fix CONFIG_KEXEC build breakageMike Galbraith1-3/+3
X86_32 build fix to commit 62a31a03b3d2a9d20e7a073e2cd9b27bfb7d6a3f Signed-off-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-23Merge branch 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6Linus Torvalds1-2/+2
* 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6: [SPARC, XEN, NET/CXGB3] use irq_handler_t where appropriate drivers/char/riscom8: clean up irq handling isdn/sc: irq handler clean isdn/act2000: fix major bug. clean irq handler. char/pcmcia/synclink_cs: trim trailing whitespace drivers/char/ip2: separate polling and irq-driven work entry points drivers/char/ip2: split out irq core logic into separate function [NETDRVR] lib82596, netxen: delete pointless tests from irq handler Eliminate pointless casts from void* in a few driver irq handlers. [PARPORT] Remove unused 'irq' argument from parport irq functions [PARPORT] Kill useful 'irq' arg from parport_{generic_irq,ieee1284_interrupt} [PARPORT] Consolidate code copies into a single generic irq handler
2007-10-23[SPARC, XEN, NET/CXGB3] use irq_handler_t where appropriateJeff Garzik1-2/+2
Rather than hand-rolling our own prototype, make the code more future-proof by using the standard irq_handler_t typedef. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-23x86: Add HPET force support for MCP55 (nForce 5) chipsetsCarlos Corbacho1-0/+18
Add support to force_hpet for all known MCP55 (nForce 5) chipset LPC bridges. These are the untested nForce 5 chips (taken from Mikko's original patch, and checked against pci.ids). Signed-off-by: Carlos Corbacho <cathectic@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> arch/x86/kernel/quirks.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)