aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/ioport.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-02-17x86: Use bitmap library functionsAkinobu Mita1-15/+5
Use bitmap_set()/bitmap_clear() to fill/zero a region of a bitmap instead of doing set_bit()/clear_bit() each bit. This change has been tested with ioperm() and there's no change in behavior. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> LKML-Reference: <1297867715-20394-1-git-send-email-akinobu.mita@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-09x86-64, paravirt: Call set_iopl_mask() on 64 bitsH. Peter Anvin1-2/+0
set_iopl_mask() is a no-op on 64 bits, but it is also a paravirt hook, so call it even on 64 bits. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Brian Gerst <brgerst@gmail.com> LKML-Reference: <1260403316-5679-3-git-send-email-brgerst@gmail.com>
2009-12-09x86: Merge sys_ioplBrian Gerst1-23/+5
Change 32-bit sys_iopl to PTREGSCALL1, and merge with 64-bit. Signed-off-by: Brian Gerst <brgerst@gmail.com> LKML-Reference: <1260403316-5679-3-git-send-email-brgerst@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-03-02x86-32: use non-lazy io bitmap context switchingJeremy Fitzhardinge1-11/+0
Impact: remove 32-bit optimization to prepare unification x86-32 and -64 differ in the way they context-switch tasks with io permission bitmaps. x86-64 simply copies the next tasks io bitmap into place (if any) on context switch. x86-32 invalidates the bitmap on context switch, so that the next IO instruction will fault; at that point it installs the appropriate IO bitmap. This makes context switching IO-bitmap-using tasks a bit more less expensive, at the cost of making the next IO instruction slower due to the extra fault. This tradeoff only makes sense if IO-bitmap-using processes are relatively common, but they don't actually use IO instructions very often. However, in a typical desktop system, the only process likely to be using IO bitmaps is the X server, and nothing at all on a server. Therefore the lazy context switch doesn't really win all that much, and its just a gratuitious difference from 64-bit code. This patch removes the lazy context switch, with a view to unifying this code in a later change. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-02-11x86: use regparm(3) for passed-in pt_regs pointerBrian Gerst1-1/+2
Some syscalls need to access the pt_regs structure, either to copy user register state or to modifiy it. This patch adds stubs to load the address of the pt_regs struct into the %eax register, and changes the syscalls to take the pointer as an argument instead of relying on the assumption that the pt_regs structure overlaps the function arguments. Drop the use of regparm(1) due to concern about gcc bugs, and to move in the direction of the eventual removal of regparm(0) for asmlinkage. Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2009-02-11x86: pass in pt_regs pointer for syscalls that need itBrian Gerst1-3/+1
Some syscalls need to access the pt_regs structure, either to copy user register state or to modifiy it. This patch adds stubs to load the address of the pt_regs struct into the %eax register, and changes the syscalls to regparm(1) to receive the pt_regs pointer as the first argument. Signed-off-by: Brian Gerst <brgerst@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-04x86: ioport.c fix style problemsJaswinder Singh Rajput1-2/+2
Impact: cleanup Fix: ERROR: "foo * bar" should be "foo *bar" total: 2 errors, 0 warnings Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-22x86: Introducing asm/syscalls.hJaswinder Singh1-0/+1
Declaring arch-dependent syscalls for x86 architecture Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
2008-01-30x86: refactor ioport unificationChris Wright1-19/+21
Refactor ioport unification to pull out common code. Cc: mboton@gmail.com Cc: Kevin Winchester <kjwinchester@gmail.com> Cc: Zach Brown <zach.brown@oracle.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30x86: fix ioport unification on 32-bitChris Wright1-2/+4
ioport unification was broken for 32-bit; it was missing the acutal pushf/popf EFLAGS manipulation (set_iopl_mask()). Also, use of volatile looks like leftover cruft. Cc: mboton@gmail.com Cc: Kevin Winchester <kjwinchester@gmail.com> Cc: Zach Brown <zach.brown@oracle.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30x86: ioport_{32|64}.c unificationmboton@gmail.com1-0/+150
ioport_{32|64}.c unification. This patch unifies the code from the ioport_32.c and ioport_64.c files. Tested and working fine with i386 and x86_64 kernels. Signed-off-by: Miguel Botón <mboton@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>