| * linux/include/asm-arm/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_USER - domain 1 includes all user memory only |
| * DOMAIN_KERNEL - domain 0 includes all kernel 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) \ |
| struct thread_info *thread = current_thread_info(); \ |
| unsigned int domain = thread->cpu_domain; \ |
| domain &= ~domain_val(dom, DOMAIN_MANAGER); \ |
| thread->cpu_domain = domain | domain_val(dom, type); \ |
| set_domain(thread->cpu_domain); \ |
| #endif /* !__ASSEMBLY__ */ |