Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9718769d298f8642d5ef41eb5f55669d7c5b9fd6
Commit:     9718769d298f8642d5ef41eb5f55669d7c5b9fd6
Parent:     ccafa59a0061d7c44d15d02403120fd02b52c667
Author:     Chris Wright <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:33:10 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:33:10 2008 +0100

    x86: fix ioport unification on 32-bit
    
    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: [EMAIL PROTECTED]
    Cc: Kevin Winchester <[EMAIL PROTECTED]>
    Cc: Zach Brown <[EMAIL PROTECTED]>
    Cc: "H. Peter Anvin" <[EMAIL PROTECTED]>
    Signed-off-by: Chris Wright <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/kernel/ioport.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c
index e723ff3..be72d80 100644
--- a/arch/x86/kernel/ioport.c
+++ b/arch/x86/kernel/ioport.c
@@ -116,9 +116,10 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned 
long num, int turn_on)
 #ifdef CONFIG_X86_32
 asmlinkage long sys_iopl(unsigned long regsp)
 {
-       volatile struct pt_regs *regs = (struct pt_regs *)&regsp;
+       struct pt_regs *regs = (struct pt_regs *)&regsp;
        unsigned int level = regs->bx;
        unsigned int old = (regs->flags >> 12) & 3;
+       struct thread_struct *t = &current->thread;
 
        if (level > 3)
                return -EINVAL;
@@ -127,8 +128,9 @@ asmlinkage long sys_iopl(unsigned long regsp)
                if (!capable(CAP_SYS_RAWIO))
                        return -EPERM;
        }
+       t->iopl = level << 12;
        regs->flags = (regs->flags & ~X86_EFLAGS_IOPL) | (level << 12);
-
+       set_iopl_mask(t->iopl);
        return 0;
 }
 #else
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to