aboutsummaryrefslogtreecommitdiffstats
path: root/arch/h8300/include/asm/shm.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-13 14:26:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-13 14:26:32 -0700
commit758db3f2118703a1e36374dae5d58bed963e7e0d (patch)
tree12546f52718d903a8cc8fd70abdcd4b2e6826e94 /arch/h8300/include/asm/shm.h
parentLinux 2.6.27-rc3 (diff)
downloadlinux-dev-758db3f2118703a1e36374dae5d58bed963e7e0d.tar.xz
linux-dev-758db3f2118703a1e36374dae5d58bed963e7e0d.zip
[h8300] move include/asm-h8300 to arch/h8300/include/asm
Done as a script (well, a single "git mv" actually) on request from Yoshinori Sato as a way to avoid a huge diff. Requested-by: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/h8300/include/asm/shm.h')
-rw-r--r--arch/h8300/include/asm/shm.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/h8300/include/asm/shm.h b/arch/h8300/include/asm/shm.h
new file mode 100644
index 000000000000..ed6623c0545d
--- /dev/null
+++ b/arch/h8300/include/asm/shm.h
@@ -0,0 +1,31 @@
+#ifndef _H8300_SHM_H
+#define _H8300_SHM_H
+
+
+/* format of page table entries that correspond to shared memory pages
+ currently out in swap space (see also mm/swap.c):
+ bits 0-1 (PAGE_PRESENT) is = 0
+ bits 8..2 (SWP_TYPE) are = SHM_SWP_TYPE
+ bits 31..9 are used like this:
+ bits 15..9 (SHM_ID) the id of the shared memory segment
+ bits 30..16 (SHM_IDX) the index of the page within the shared memory segment
+ (actually only bits 25..16 get used since SHMMAX is so low)
+ bit 31 (SHM_READ_ONLY) flag whether the page belongs to a read-only attach
+*/
+/* on the m68k both bits 0 and 1 must be zero */
+/* format on the sun3 is similar, but bits 30, 31 are set to zero and all
+ others are reduced by 2. --m */
+
+#ifndef CONFIG_SUN3
+#define SHM_ID_SHIFT 9
+#else
+#define SHM_ID_SHIFT 7
+#endif
+#define _SHM_ID_BITS 7
+#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
+
+#define SHM_IDX_SHIFT (SHM_ID_SHIFT+_SHM_ID_BITS)
+#define _SHM_IDX_BITS 15
+#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
+
+#endif /* _H8300_SHM_H */