summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/cpu-features.h
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2010-02-02 19:52:20 +0300
committerRalf Baechle <ralf@linux-mips.org>2010-02-02 21:56:23 +0300
commit91dfc423cc8cfd399fb308a837102a7ab7fa067e (patch)
tree21c75672185153084a5ac8e38ca3938ca0cf4ac1 /arch/mips/include/asm/cpu-features.h
parentba284b1f199ef7121489010da6614561a679eab6 (diff)
downloadlinux-91dfc423cc8cfd399fb308a837102a7ab7fa067e.tar.xz
MIPS: 64-bit: Detect virtual memory size
Linux kernel 2.6.32 and later allocate address space from the top of the kernel virtual memory address space. This patch implements virtual memory size detection for 64 bit MIPS CPUs to avoid resulting crashes. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/935/ Reviewed-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/cpu-features.h')
-rw-r--r--arch/mips/include/asm/cpu-features.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
index 1f4df647c384..272c5ef35bbb 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -191,6 +191,9 @@
# ifndef cpu_has_64bit_addresses
# define cpu_has_64bit_addresses 0
# endif
+# ifndef cpu_vmbits
+# define cpu_vmbits 31
+# endif
#endif
#ifdef CONFIG_64BIT
@@ -209,6 +212,10 @@
# ifndef cpu_has_64bit_addresses
# define cpu_has_64bit_addresses 1
# endif
+# ifndef cpu_vmbits
+# define cpu_vmbits cpu_data[0].vmbits
+# define __NEED_VMBITS_PROBE
+# endif
#endif
#if defined(CONFIG_CPU_MIPSR2_IRQ_VI) && !defined(cpu_has_vint)