Linux PARISC architecture development
 help / color / mirror / Atom feed
* [PATCH] fix compile failure with non-modular builds
@ 2008-09-11 15:56 James Bottomley
  2008-09-11 16:01 ` Kyle McMartin
  0 siblings, 1 reply; 4+ messages in thread
From: James Bottomley @ 2008-09-11 15:56 UTC (permalink / raw)
  To: Parisc List

commit deac93df26b20cf8438339b5935b5f5643bc30c9
Author: James Bottomley <James.Bottomley@HansenPartnership.com>
Date:   Wed Sep 3 20:43:36 2008 -0500

    lib: Correct printk %pF to work on all architectures

Broke the non modular builds by moving an essential function into
modules.c.  Fix this by moving it out again and into asm/sections.h as
an inline.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
---
 arch/parisc/kernel/module.c   |   14 --------------
 include/asm-parisc/sections.h |   13 +++++++++++--
 2 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index 44138c3..fdacdd4 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -47,9 +47,7 @@
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/bug.h>
-#include <linux/uaccess.h>
 
-#include <asm/sections.h>
 #include <asm/unwind.h>
 
 #if 0
@@ -862,15 +860,3 @@ void module_arch_cleanup(struct module *mod)
 	deregister_unwind_table(mod);
 	module_bug_cleanup(mod);
 }
-
-#ifdef CONFIG_64BIT
-void *dereference_function_descriptor(void *ptr)
-{
-	Elf64_Fdesc *desc = ptr;
-	void *p;
-
-	if (!probe_kernel_address(&desc->addr, p))
-		ptr = p;
-	return ptr;
-}
-#endif
diff --git a/include/asm-parisc/sections.h b/include/asm-parisc/sections.h
index 9d13c35..b08f9f8 100644
--- a/include/asm-parisc/sections.h
+++ b/include/asm-parisc/sections.h
@@ -1,12 +1,21 @@
 #ifndef _PARISC_SECTIONS_H
 #define _PARISC_SECTIONS_H
 
-/* nothing to see, move along */
+#include <linux/elf.h>
+#include <linux/uaccess.h>
 #include <asm-generic/sections.h>
 
 #ifdef CONFIG_64BIT
 #undef dereference_function_descriptor
-void *dereference_function_descriptor(void *);
+static inline void *dereference_function_descriptor(void *ptr)
+{
+	Elf64_Fdesc *desc = ptr;
+	void *p;
+
+	if (!probe_kernel_address(&desc->addr, p))
+		ptr = p;
+	return ptr;
+}
 #endif
 
 #endif
-- 
1.5.6.5




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

end of thread, other threads:[~2008-09-11 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-11 15:56 [PATCH] fix compile failure with non-modular builds James Bottomley
2008-09-11 16:01 ` Kyle McMartin
2008-09-11 16:02   ` James Bottomley
2008-09-11 16:06     ` Kyle McMartin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox