aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/metag/include/asm/cachepart.h
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2012-10-05 16:56:56 +0100
committerJames Hogan <james.hogan@imgtec.com>2013-03-02 20:09:51 +0000
commit42682c6c42a5765b2c7cccfca170368fef6191ef (patch)
treeadcfa5e96cd98527ee75fc541efc279357bbe6a2 /arch/metag/include/asm/cachepart.h
parentmetag: Basic documentation (diff)
downloadwireguard-linux-42682c6c42a5765b2c7cccfca170368fef6191ef.tar.xz
wireguard-linux-42682c6c42a5765b2c7cccfca170368fef6191ef.zip
metag: SMP support
Add SMP support for metag. This allows Linux to take control of multiple hardware threads on a single Meta core, treating them as separate Linux CPUs. Signed-off-by: James Hogan <james.hogan@imgtec.com>
Diffstat (limited to 'arch/metag/include/asm/cachepart.h')
-rw-r--r--arch/metag/include/asm/cachepart.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/arch/metag/include/asm/cachepart.h b/arch/metag/include/asm/cachepart.h
new file mode 100644
index 000000000000..cf6b44e916b5
--- /dev/null
+++ b/arch/metag/include/asm/cachepart.h
@@ -0,0 +1,42 @@
+/*
+ * Meta cache partition manipulation.
+ *
+ * Copyright 2010 Imagination Technologies Ltd.
+ */
+
+#ifndef _METAG_CACHEPART_H_
+#define _METAG_CACHEPART_H_
+
+/**
+ * get_dcache_size() - Get size of data cache.
+ */
+unsigned int get_dcache_size(void);
+
+/**
+ * get_icache_size() - Get size of code cache.
+ */
+unsigned int get_icache_size(void);
+
+/**
+ * get_global_dcache_size() - Get the thread's global dcache.
+ *
+ * Returns the size of the current thread's global dcache partition.
+ */
+unsigned int get_global_dcache_size(void);
+
+/**
+ * get_global_icache_size() - Get the thread's global icache.
+ *
+ * Returns the size of the current thread's global icache partition.
+ */
+unsigned int get_global_icache_size(void);
+
+/**
+ * check_for_dache_aliasing() - Ensure that the bootloader has configured the
+ * dache and icache properly to avoid aliasing
+ * @thread_id: Hardware thread ID
+ *
+ */
+void check_for_cache_aliasing(int thread_id);
+
+#endif