Skip to content

Commit b609308

Browse files
committed
parisc: move dereference_function_descriptor to process.c
Commit deac93d 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>
1 parent bf589a3 commit b609308

2 files changed

Lines changed: 14 additions & 15 deletions

File tree

‎arch/parisc/kernel/module.c‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@
6161
#include <linux/string.h>
6262
#include <linux/kernel.h>
6363
#include <linux/bug.h>
64-
#include <linux/uaccess.h>
6564

66-
#include <asm/sections.h>
6765
#include <asm/unwind.h>
6866

6967
#if 0
@@ -912,15 +910,3 @@ void module_arch_cleanup(struct module *mod)
912910
deregister_unwind_table(mod);
913911
module_bug_cleanup(mod);
914912
}
915-
916-
#ifdef CONFIG_64BIT
917-
void *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

‎arch/parisc/kernel/process.c‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,15 @@
4646
#include <linux/stddef.h>
4747
#include <linux/unistd.h>
4848
#include <linux/kallsyms.h>
49+
#include <linux/uaccess.h>
4950

5051
#include <asm/io.h>
5152
#include <asm/asm-offsets.h>
5253
#include <asm/pdc.h>
5354
#include <asm/pdc_chassis.h>
5455
#include <asm/pgalloc.h>
55-
#include <asm/uaccess.h>
5656
#include <asm/unwind.h>
57+
#include <asm/sections.h>
5758

5859
/*
5960
* The idle thread. There's no useful work to be
@@ -390,3 +391,15 @@ get_wchan(struct task_struct *p)
390391
} while (count++ < 16);
391392
return 0;
392393
}
394+
395+
#ifdef CONFIG_64BIT
396+
void *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

0 commit comments

Comments
 (0)