| * linux/include/asm-arm/proc-armv/domain.h |
| * Copyright (C) 1999 Russell King. |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 as |
| * published by the Free Software Foundation. |
| #ifndef __ASM_PROC_DOMAIN_H |
| #define __ASM_PROC_DOMAIN_H |
| * DOMAIN_IO - domain 2 includes all IO only |
| * DOMAIN_KERNEL - domain 1 includes all kernel memory only |
| * DOMAIN_USER - domain 0 includes all user memory only |
| #define DOMAIN_NOACCESS 0 |
| #define domain_val(dom,type) ((type) << 2*(dom)) |
| "mcr p15, 0, %0, c3, c0 @ set domain" \ |
| #define modify_domain(dom,type) \ |
| unsigned int domain = current->thread.domain; \ |
| domain &= ~domain_val(dom, DOMAIN_MANAGER); \ |
| domain |= domain_val(dom, type); \ |
| current->thread.domain = domain; \ |
| set_domain(current->thread.domain); \ |