aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/mm/physaddr.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-14 10:23:49 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-14 10:23:49 -0700
commitb8cb48aae1b8c50b37dcb7710363aa69a7a0d9ca (patch)
treec7b04bfc8ece8b0121a9030c7f49e7bf9bf570d1 /arch/x86/mm/physaddr.h
parent0cc6d77e55eca9557bbe41bf2db94b31aa8fcb2a (diff)
parent78c86e5e5691fc84d5fbea0cd4ac7147e87b7490 (diff)
Merge branch 'x86-xen-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-xen-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: split __phys_addr out into separate file xen: use stronger barrier after unlocking lock xen: only enable interrupts while actually blocking for spinlock xen: make -fstack-protector work under Xen
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 00000000000..a3cd5a0c97b
--- /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
+}