]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/include/asm/page.h
Merge branch 'intel_idle+snb' into idle-release
[karo-tx-linux.git] / arch / x86 / include / asm / page.h
index 625c3f0e741aab7bd75d839cadf7084c303baa61..8ca82839288a35e326f43fbac24a8384eb497652 100644 (file)
@@ -37,6 +37,13 @@ static inline void copy_user_page(void *to, void *from, unsigned long vaddr,
 #define __pa_nodebug(x)        __phys_addr_nodebug((unsigned long)(x))
 /* __pa_symbol should be used for C visible symbols.
    This seems to be the official gcc blessed way to do such arithmetic. */
+/*
+ * We need __phys_reloc_hide() here because gcc may assume that there is no
+ * overflow during __pa() calculation and can optimize it unexpectedly.
+ * Newer versions of gcc provide -fno-strict-overflow switch to handle this
+ * case properly. Once all supported versions of gcc understand it, we can
+ * remove this Voodoo magic stuff. (i.e. once gcc3.x is deprecated)
+ */
 #define __pa_symbol(x) __pa(__phys_reloc_hide((unsigned long)(x)))
 
 #define __va(x)                        ((void *)((unsigned long)(x)+PAGE_OFFSET))