header cleaning: don't include smp_lock.h when not used
[safe/jmp/linux-2.6] / arch / x86_64 / kernel / ioport.c
index b816149..653efa3 100644 (file)
 #include <linux/types.h>
 #include <linux/ioport.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/stddef.h>
 #include <linux/slab.h>
 #include <linux/thread_info.h>
+#include <linux/syscalls.h>
 
 /* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */
 static void set_bitmap(unsigned long *bitmap, unsigned int base, unsigned int extent, int new_value)
@@ -56,6 +56,7 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
 
                memset(bitmap, 0xff, IO_BITMAP_BYTES);
                t->io_bitmap_ptr = bitmap;
+               set_thread_flag(TIF_IO_BITMAP);
        }
 
        /*
@@ -113,6 +114,6 @@ asmlinkage long sys_iopl(unsigned int level, struct pt_regs *regs)
                if (!capable(CAP_SYS_RAWIO))
                        return -EPERM;
        }
-       regs->eflags = (regs->eflags &~ 0x3000UL) | (level << 12);
+       regs->eflags = (regs->eflags &~ X86_EFLAGS_IOPL) | (level << 12);
        return 0;
 }