aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorKyle McMartin <kyle@mcmartin.ca>2009-03-15 16:49:55 -0400
committerKyle McMartin <kyle@mcmartin.ca>2009-04-02 00:16:27 -0400
commitb609308e1415efebdf79ebd553f4dd47b0ff2722 (patch)
tree49755dcda956ee0ce75d6f3d3e38e4d54245f799 /arch/parisc
parentbf589a349b9a41ea202ddb8115b18f543b944bfd (diff)
parisc: move dereference_function_descriptor to process.c
Commit deac93df26b20cf8438339b5935b5f5643bc30c9 fixed up printing of %pF on parisc, but added the dereference_function_descriptor prototype to module.c... this isn't a particularly wise idea as module.c might not always be compiled. Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/module.c14
-rw-r--r--arch/parisc/kernel/process.c15
2 files changed, 14 insertions, 15 deletions
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index 3439cbd896b..ecd1c502444 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -61,9 +61,7 @@
61#include <linux/string.h> 61#include <linux/string.h>
62#include <linux/kernel.h> 62#include <linux/kernel.h>
63#include <linux/bug.h> 63#include <linux/bug.h>
64#include <linux/uaccess.h>
65 64
66#include <asm/sections.h>
67#include <asm/unwind.h> 65#include <asm/unwind.h>
68 66
69#if 0 67#if 0
@@ -912,15 +910,3 @@ void module_arch_cleanup(struct module *mod)
912 deregister_unwind_table(mod); 910 deregister_unwind_table(mod);
913 module_bug_cleanup(mod); 911 module_bug_cleanup(mod);
914} 912}
915
916#ifdef CONFIG_64BIT
917void *dereference_function_descriptor(void *ptr)
918{
919 Elf64_Fdesc *desc = ptr;
920 void *p;
921
922 if (!probe_kernel_address(&desc->addr, p))
923 ptr = p;
924 return ptr;
925}
926#endif
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index ad585fd7748..029831dfce3 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -46,14 +46,15 @@
46#include <linux/stddef.h> 46#include <linux/stddef.h>
47#include <linux/unistd.h> 47#include <linux/unistd.h>
48#include <linux/kallsyms.h> 48#include <linux/kallsyms.h>
49#include <linux/uaccess.h>
49 50
50#include <asm/io.h> 51#include <asm/io.h>
51#include <asm/asm-offsets.h> 52#include <asm/asm-offsets.h>
52#include <asm/pdc.h> 53#include <asm/pdc.h>
53#include <asm/pdc_chassis.h> 54#include <asm/pdc_chassis.h>
54#include <asm/pgalloc.h> 55#include <asm/pgalloc.h>
55#include <asm/uaccess.h>
56#include <asm/unwind.h> 56#include <asm/unwind.h>
57#include <asm/sections.h>
57 58
58/* 59/*
59 * The idle thread. There's no useful work to be 60 * The idle thread. There's no useful work to be
@@ -390,3 +391,15 @@ get_wchan(struct task_struct *p)
390 } while (count++ < 16); 391 } while (count++ < 16);
391 return 0; 392 return 0;
392} 393}
394
395#ifdef CONFIG_64BIT
396void *dereference_function_descriptor(void *ptr)
397{
398 Elf64_Fdesc *desc = ptr;
399 void *p;
400
401 if (!probe_kernel_address(&desc->addr, p))
402 ptr = p;
403 return ptr;
404}
405#endif