diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/x86/kernel/ioport.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/x86/kernel/ioport.c')
-rw-r--r-- | arch/x86/kernel/ioport.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c index 8eec0ec59af2..8c968974253d 100644 --- a/arch/x86/kernel/ioport.c +++ b/arch/x86/kernel/ioport.c | |||
@@ -14,22 +14,9 @@ | |||
14 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
15 | #include <linux/thread_info.h> | 15 | #include <linux/thread_info.h> |
16 | #include <linux/syscalls.h> | 16 | #include <linux/syscalls.h> |
17 | #include <linux/bitmap.h> | ||
17 | #include <asm/syscalls.h> | 18 | #include <asm/syscalls.h> |
18 | 19 | ||
19 | /* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */ | ||
20 | static void set_bitmap(unsigned long *bitmap, unsigned int base, | ||
21 | unsigned int extent, int new_value) | ||
22 | { | ||
23 | unsigned int i; | ||
24 | |||
25 | for (i = base; i < base + extent; i++) { | ||
26 | if (new_value) | ||
27 | __set_bit(i, bitmap); | ||
28 | else | ||
29 | __clear_bit(i, bitmap); | ||
30 | } | ||
31 | } | ||
32 | |||
33 | /* | 20 | /* |
34 | * this changes the io permissions bitmap in the current task. | 21 | * this changes the io permissions bitmap in the current task. |
35 | */ | 22 | */ |
@@ -69,7 +56,10 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on) | |||
69 | */ | 56 | */ |
70 | tss = &per_cpu(init_tss, get_cpu()); | 57 | tss = &per_cpu(init_tss, get_cpu()); |
71 | 58 | ||
72 | set_bitmap(t->io_bitmap_ptr, from, num, !turn_on); | 59 | if (turn_on) |
60 | bitmap_clear(t->io_bitmap_ptr, from, num); | ||
61 | else | ||
62 | bitmap_set(t->io_bitmap_ptr, from, num); | ||
73 | 63 | ||
74 | /* | 64 | /* |
75 | * Search for a (possibly new) maximum. This is simple and stupid, | 65 | * Search for a (possibly new) maximum. This is simple and stupid, |