patch-2.3.16 linux/include/asm-sh/cache.h
Next file: linux/include/asm-sh/checksum.h
Previous file: linux/include/asm-sh/byteorder.h
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Mon Aug 30 18:12:59 1999
- Orig file:
v2.3.15/linux/include/asm-sh/cache.h
- Orig date:
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.3.15/linux/include/asm-sh/cache.h linux/include/asm-sh/cache.h
@@ -0,0 +1,23 @@
+/*
+ * include/asm-sh/cache.h
+ * Copyright 1999 (C) Niibe Yutaka
+ */
+#ifndef __ASM_SH_CACHE_H
+#define __ASM_SH_CACHE_H
+
+/* bytes per L1 cache line */
+#define L1_CACHE_BYTES 16
+
+#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
+
+#define SMP_CACHE_BYTES L1_CACHE_BYTES
+
+#ifdef MODULE
+#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES)))
+#else
+#define __cacheline_aligned \
+ __attribute__((__aligned__(L1_CACHE_BYTES), \
+ __section__(".data.cacheline_aligned")))
+#endif
+
+#endif /* __ASM_SH_CACHE_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)