Import 2.3.32
[davej-history.git] / arch / arm / kernel / ioport.c
blob07a52ba8e4c5ef833302a5477232cf685daaaecf
1 /*
2 * linux/arch/arm/kernel/ioport.c
4 * IO permission support for ARM.
5 */
7 #include <linux/config.h>
8 #include <linux/sched.h>
9 #include <linux/kernel.h>
10 #include <linux/errno.h>
11 #include <linux/types.h>
12 #include <linux/ioport.h>
13 #include <linux/mm.h>
15 #include <asm/pgtable.h>
16 #include <asm/uaccess.h>
18 #ifdef CONFIG_CPU_32
19 asmlinkage int sys_iopl(unsigned long turn_on)
21 if (turn_on && !capable(CAP_SYS_RAWIO))
22 return -EPERM;
25 * We only support an on_off approach
27 modify_domain(DOMAIN_IO, turn_on ? DOMAIN_MANAGER : DOMAIN_CLIENT);
29 return 0;
31 #else
32 asmlinkage int sys_iopl(unsigned long turn_on)
34 return -ENOSYS;
36 #endif