summaryrefslogtreecommitdiff
path: root/src/sna/compiler.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-04-10 12:16:34 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-04-10 13:46:45 +0100
commitcaf3118f90bad7f88f5f08e49177a1696bf97ccb (patch)
treeace6e0afbd74dcaa158718a27051abd79c2da17d /src/sna/compiler.h
parent092e30de8a3476ab99446264edaf9b250a41736b (diff)
sna: Align uploads to start on page boundaries
This reduces the number of loops and restarts required in the kernel. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/compiler.h')
-rw-r--r--src/sna/compiler.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sna/compiler.h b/src/sna/compiler.h
index 62f51f0e..75e691ad 100644
--- a/src/sna/compiler.h
+++ b/src/sna/compiler.h
@@ -39,6 +39,7 @@
#define pure __attribute__((pure))
#define __packed__ __attribute__((__packed__))
#define flatten __attribute__((flatten))
+#define page_aligned __attribute__((aligned(4096)))
#else
#define likely(expr) (expr)
#define unlikely(expr) (expr)
@@ -50,6 +51,7 @@
#define pure
#define __packed__
#define flatten
+#define page_aligned
#endif
#define HAS_GCC(major, minor) defined(__GNUC__) && (__GNUC__ > (major) || __GNUC__ == (major) && __GNUC_MINOR__ >= (minor))