diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-10-09 00:00:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-10-09 00:00:47 +0000 |
commit | d6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch) | |
tree | e2be02f33984c48ec019c654051d27964e42c441 /arch/arm/kernel/ioport.c | |
parent | 609d1e803baf519487233b765eb487f9ec227a18 (diff) |
Merge with 2.3.19.
Diffstat (limited to 'arch/arm/kernel/ioport.c')
-rw-r--r-- | arch/arm/kernel/ioport.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/kernel/ioport.c b/arch/arm/kernel/ioport.c new file mode 100644 index 000000000..bae897747 --- /dev/null +++ b/arch/arm/kernel/ioport.c @@ -0,0 +1,27 @@ +/* + * linux/arch/arm/kernel/ioport.c + * + * IO permission support for ARM. + */ + +#include <linux/sched.h> +#include <linux/kernel.h> +#include <linux/errno.h> +#include <linux/types.h> +#include <linux/ioport.h> + +#include <asm/pgtable.h> +#include <asm/uaccess.h> + +asmlinkage int sys_iopl(unsigned long turn_on) +{ + if (turn_on && !capable(CAP_SYS_RAWIO)) + return -EPERM; + + /* + * We only support an on_off approach + */ + modify_domain(DOMAIN_IO, turn_on ? DOMAIN_MANAGER : DOMAIN_CLIENT); + + return 0; +} |