blob: bae897747b2200701d47da237cce0da8ad79272c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;
}
|