All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: remove __phys_reloc_hide
@ 2010-08-08 21:38 Namhyung Kim
  2010-08-09  6:22 ` Andi Kleen
  2010-08-09  8:07 ` Ingo Molnar
  0 siblings, 2 replies; 17+ messages in thread
From: Namhyung Kim @ 2010-08-08 21:38 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86; +Cc: linux-kernel

remove unnecessary use of RELOC_HIDE(). It only does simple addition of ptr
and offset, and in this case, offset 0, does nothing. It does NOT do anything
with linker relocation things. I could find no reason to use it.

The only user of __phys_reloc_hide() was __pa_symbol() so it can be removed
safely here.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 arch/x86/include/asm/page.h          |    5 ++---
 arch/x86/include/asm/page_32.h       |    1 -
 arch/x86/include/asm/page_64_types.h |    1 -
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/page.h b/arch/x86/include/asm/page.h
index 625c3f0..3da2a8e 100644
--- a/arch/x86/include/asm/page.h
+++ b/arch/x86/include/asm/page.h
@@ -35,9 +35,8 @@ static inline void copy_user_page(void *to, void *from, unsigned long vaddr,
 
 #define __pa(x)		__phys_addr((unsigned long)(x))
 #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. */
-#define __pa_symbol(x)	__pa(__phys_reloc_hide((unsigned long)(x)))
+/* __pa_symbol should be used for C visible symbols. */
+#define __pa_symbol(x)	__pa(x)
 
 #define __va(x)			((void *)((unsigned long)(x)+PAGE_OFFSET))
 
diff --git a/arch/x86/include/asm/page_32.h b/arch/x86/include/asm/page_32.h
index da4e762..e78e52a 100644
--- a/arch/x86/include/asm/page_32.h
+++ b/arch/x86/include/asm/page_32.h
@@ -15,7 +15,6 @@ extern unsigned long __phys_addr(unsigned long);
 #else
 #define __phys_addr(x)		__phys_addr_nodebug(x)
 #endif
-#define __phys_reloc_hide(x)	RELOC_HIDE((x), 0)
 
 #ifdef CONFIG_FLATMEM
 #define pfn_valid(pfn)		((pfn) < max_mapnr)
diff --git a/arch/x86/include/asm/page_64_types.h b/arch/x86/include/asm/page_64_types.h
index 7639dbf..5a63066 100644
--- a/arch/x86/include/asm/page_64_types.h
+++ b/arch/x86/include/asm/page_64_types.h
@@ -59,7 +59,6 @@ extern unsigned long max_pfn;
 extern unsigned long phys_base;
 
 extern unsigned long __phys_addr(unsigned long);
-#define __phys_reloc_hide(x)	(x)
 
 #define vmemmap ((struct page *)VMEMMAP_START)
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-06-19 23:00 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-08 21:38 [PATCH] x86: remove __phys_reloc_hide Namhyung Kim
2010-08-09  6:22 ` Andi Kleen
2010-08-09  6:40   ` Namhyung Kim
2010-08-09  6:44     ` Andi Kleen
2010-08-09  7:04       ` Namhyung Kim
2010-08-09  7:22         ` Andi Kleen
2010-08-09  7:47           ` Namhyung Kim
2010-08-09 18:56           ` H. Peter Anvin
2010-08-10  7:05             ` Ingo Molnar
2010-08-10 10:46               ` Namhyung Kim
2010-08-11  5:44                 ` Namhyung Kim
2010-08-11 19:09                   ` H. Peter Anvin
2010-08-11  6:37               ` [PATCH] x86: add a comment to __pa_symbol Namhyung Kim
2010-08-11  7:44                 ` [tip:x86/urgent] x86: Document __phys_reloc_hide() usage in __pa_symbol() tip-bot for Namhyung Kim
2018-06-19 23:00   ` [PATCH] x86: remove __phys_reloc_hide Thomas Gleixner
2010-08-09  8:07 ` Ingo Molnar
2010-08-09 18:56   ` H. Peter Anvin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.