aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/module.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2008-09-03 21:43:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-09-09 14:51:15 -0400
commitdeac93df26b20cf8438339b5935b5f5643bc30c9 (patch)
tree8e67edd505e4a8bde380c724b67ce9ca98b8ee91 /arch/ia64/kernel/module.c
parent7ae115b4f50d3c5824f1a15e572b5de9d1b06d35 (diff)
lib: Correct printk %pF to work on all architectures
It was introduced by "vsprintf: add support for '%pS' and '%pF' pointer formats" in commit 0fe1ef24f7bd0020f29ffe287dfdb9ead33ca0b2. However, the current way its coded doesn't work on parisc64. For two reasons: 1) parisc isn't in the #ifdef and 2) parisc has a different format for function descriptors Make dereference_function_descriptor() more accommodating by allowing architecture overrides. I put the three overrides (for parisc64, ppc64 and ia64) in arch/kernel/module.c because that's where the kernel internal linker which knows how to deal with function descriptors sits. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Tony Luck <tony.luck@intel.com> Acked-by: Kyle McMartin <kyle@mcmartin.ca> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64/kernel/module.c')
-rw-r--r--arch/ia64/kernel/module.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
index 29aad349e0c4..545626f66a4c 100644
--- a/arch/ia64/kernel/module.c
+++ b/arch/ia64/kernel/module.c
@@ -31,9 +31,11 @@
31#include <linux/elf.h> 31#include <linux/elf.h>
32#include <linux/moduleloader.h> 32#include <linux/moduleloader.h>
33#include <linux/string.h> 33#include <linux/string.h>
34#include <linux/uaccess.h>
34#include <linux/vmalloc.h> 35#include <linux/vmalloc.h>
35 36
36#include <asm/patch.h> 37#include <asm/patch.h>
38#include <asm/sections.h>
37#include <asm/unaligned.h> 39#include <asm/unaligned.h>
38 40
39#define ARCH_MODULE_DEBUG 0 41#define ARCH_MODULE_DEBUG 0
@@ -941,3 +943,13 @@ module_arch_cleanup (struct module *mod)
941 if (mod->arch.core_unw_table) 943 if (mod->arch.core_unw_table)
942 unw_remove_unwind_table(mod->arch.core_unw_table); 944 unw_remove_unwind_table(mod->arch.core_unw_table);
943} 945}
946
947void *dereference_function_descriptor(void *ptr)
948{
949 struct fdesc *desc = ptr;
950 void *p;
951
952 if (!probe_kernel_address(&desc->ip, p))
953 ptr = p;
954 return ptr;
955}