aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/domain.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-arm/domain.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-arm/domain.h')
-rw-r--r--include/asm-arm/domain.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/include/asm-arm/domain.h b/include/asm-arm/domain.h
new file mode 100644
index 000000000000..da1d960387d9
--- /dev/null
+++ b/include/asm-arm/domain.h
@@ -0,0 +1,52 @@
1/*
2 * linux/include/asm-arm/domain.h
3 *
4 * Copyright (C) 1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_PROC_DOMAIN_H
11#define __ASM_PROC_DOMAIN_H
12
13/*
14 * Domain numbers
15 *
16 * DOMAIN_IO - domain 2 includes all IO only
17 * DOMAIN_USER - domain 1 includes all user memory only
18 * DOMAIN_KERNEL - domain 0 includes all kernel memory only
19 */
20#define DOMAIN_KERNEL 0
21#define DOMAIN_TABLE 0
22#define DOMAIN_USER 1
23#define DOMAIN_IO 2
24
25/*
26 * Domain types
27 */
28#define DOMAIN_NOACCESS 0
29#define DOMAIN_CLIENT 1
30#define DOMAIN_MANAGER 3
31
32#define domain_val(dom,type) ((type) << (2*(dom)))
33
34#ifndef __ASSEMBLY__
35#define set_domain(x) \
36 do { \
37 __asm__ __volatile__( \
38 "mcr p15, 0, %0, c3, c0 @ set domain" \
39 : : "r" (x)); \
40 } while (0)
41
42#define modify_domain(dom,type) \
43 do { \
44 struct thread_info *thread = current_thread_info(); \
45 unsigned int domain = thread->cpu_domain; \
46 domain &= ~domain_val(dom, DOMAIN_MANAGER); \
47 thread->cpu_domain = domain | domain_val(dom, type); \
48 set_domain(thread->cpu_domain); \
49 } while (0)
50
51#endif
52#endif /* !__ASSEMBLY__ */