summaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/physaddr.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-09-14 20:26:05 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2009-09-14 20:26:05 +0200
commitac8d513a6801c8636922ccf4f30211810c9a56ce (patch)
tree83ba584487a6a612c8fcf2563c28c0263df35ba2 /arch/x86/mm/physaddr.h
parentbf992fa2bc1ad1bb2aeb0bdfadb43f236b9297fd (diff)
parent99bc47067910f7070e65ee318a6dd79a2371f1e5 (diff)
downloadop-kernel-dev-ac8d513a6801c8636922ccf4f30211810c9a56ce.zip
op-kernel-dev-ac8d513a6801c8636922ccf4f30211810c9a56ce.tar.gz
Merge branch 'master' into for-linus
Diffstat (limited to 'arch/x86/mm/physaddr.h')
-rw-r--r--arch/x86/mm/physaddr.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/mm/physaddr.h b/arch/x86/mm/physaddr.h
new file mode 100644
index 0000000..a3cd5a0
--- /dev/null
+++ b/arch/x86/mm/physaddr.h
@@ -0,0 +1,10 @@
+#include <asm/processor.h>
+
+static inline int phys_addr_valid(resource_size_t addr)
+{
+#ifdef CONFIG_PHYS_ADDR_T_64BIT
+ return !(addr >> boot_cpu_data.x86_phys_bits);
+#else
+ return 1;
+#endif
+}
OpenPOWER on IntegriCloud