diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/Makefile | 7 | ||||
-rw-r--r-- | arch/powerpc/kernel/align.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/idle_6xx.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/idle_e500.S | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/module_64.c | 13 | ||||
-rw-r--r-- | arch/powerpc/kernel/vmlinux.lds.S | 7 |
6 files changed, 24 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 64f5948ebc9d..946daea780f1 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -14,12 +14,13 @@ endif | |||
14 | 14 | ||
15 | ifdef CONFIG_FTRACE | 15 | ifdef CONFIG_FTRACE |
16 | # Do not trace early boot code | 16 | # Do not trace early boot code |
17 | CFLAGS_REMOVE_cputable.o = -pg | 17 | CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog |
18 | CFLAGS_REMOVE_prom_init.o = -pg | 18 | CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog |
19 | CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog | ||
19 | 20 | ||
20 | ifdef CONFIG_DYNAMIC_FTRACE | 21 | ifdef CONFIG_DYNAMIC_FTRACE |
21 | # dynamic ftrace setup. | 22 | # dynamic ftrace setup. |
22 | CFLAGS_REMOVE_ftrace.o = -pg | 23 | CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog |
23 | endif | 24 | endif |
24 | 25 | ||
25 | endif | 26 | endif |
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c index 367129789cc0..5af4e9b2dbe2 100644 --- a/arch/powerpc/kernel/align.c +++ b/arch/powerpc/kernel/align.c | |||
@@ -647,7 +647,7 @@ static int emulate_vsx(unsigned char __user *addr, unsigned int reg, | |||
647 | unsigned int flags, unsigned int length) | 647 | unsigned int flags, unsigned int length) |
648 | { | 648 | { |
649 | char *ptr = (char *) ¤t->thread.TS_FPR(reg); | 649 | char *ptr = (char *) ¤t->thread.TS_FPR(reg); |
650 | int ret; | 650 | int ret = 0; |
651 | 651 | ||
652 | flush_vsx_to_thread(current); | 652 | flush_vsx_to_thread(current); |
653 | 653 | ||
diff --git a/arch/powerpc/kernel/idle_6xx.S b/arch/powerpc/kernel/idle_6xx.S index 019b02d8844f..15c611de1ee2 100644 --- a/arch/powerpc/kernel/idle_6xx.S +++ b/arch/powerpc/kernel/idle_6xx.S | |||
@@ -158,7 +158,7 @@ _GLOBAL(power_save_ppc32_restore) | |||
158 | stw r9,_NIP(r11) /* make it do a blr */ | 158 | stw r9,_NIP(r11) /* make it do a blr */ |
159 | 159 | ||
160 | #ifdef CONFIG_SMP | 160 | #ifdef CONFIG_SMP |
161 | mfspr r12,SPRN_SPRG3 | 161 | rlwinm r12,r11,0,0,31-THREAD_SHIFT |
162 | lwz r11,TI_CPU(r12) /* get cpu number * 4 */ | 162 | lwz r11,TI_CPU(r12) /* get cpu number * 4 */ |
163 | slwi r11,r11,2 | 163 | slwi r11,r11,2 |
164 | #else | 164 | #else |
diff --git a/arch/powerpc/kernel/idle_e500.S b/arch/powerpc/kernel/idle_e500.S index 06304034b393..47a1a983ff88 100644 --- a/arch/powerpc/kernel/idle_e500.S +++ b/arch/powerpc/kernel/idle_e500.S | |||
@@ -84,10 +84,11 @@ _GLOBAL(power_save_ppc32_restore) | |||
84 | stw r9,_NIP(r11) /* make it do a blr */ | 84 | stw r9,_NIP(r11) /* make it do a blr */ |
85 | 85 | ||
86 | #ifdef CONFIG_SMP | 86 | #ifdef CONFIG_SMP |
87 | mfspr r12,SPRN_SPRG3 | 87 | rlwinm r12,r1,0,0,31-THREAD_SHIFT |
88 | lwz r11,TI_CPU(r12) /* get cpu number * 4 */ | 88 | lwz r11,TI_CPU(r12) /* get cpu number * 4 */ |
89 | slwi r11,r11,2 | 89 | slwi r11,r11,2 |
90 | #else | 90 | #else |
91 | li r11,0 | 91 | li r11,0 |
92 | #endif | 92 | #endif |
93 | |||
93 | b transfer_to_handler_cont | 94 | b transfer_to_handler_cont |
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c index ee6a2982d567..ad79de272ff3 100644 --- a/arch/powerpc/kernel/module_64.c +++ b/arch/powerpc/kernel/module_64.c | |||
@@ -21,8 +21,9 @@ | |||
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/vmalloc.h> | 22 | #include <linux/vmalloc.h> |
23 | #include <linux/bug.h> | 23 | #include <linux/bug.h> |
24 | #include <linux/uaccess.h> | ||
24 | #include <asm/module.h> | 25 | #include <asm/module.h> |
25 | #include <asm/uaccess.h> | 26 | #include <asm/sections.h> |
26 | #include <asm/firmware.h> | 27 | #include <asm/firmware.h> |
27 | #include <asm/code-patching.h> | 28 | #include <asm/code-patching.h> |
28 | #include <linux/sort.h> | 29 | #include <linux/sort.h> |
@@ -451,3 +452,13 @@ int apply_relocate_add(Elf64_Shdr *sechdrs, | |||
451 | 452 | ||
452 | return 0; | 453 | return 0; |
453 | } | 454 | } |
455 | |||
456 | void *dereference_function_descriptor(void *ptr) | ||
457 | { | ||
458 | struct ppc64_opd_entry *desc = ptr; | ||
459 | void *p; | ||
460 | |||
461 | if (!probe_kernel_address(&desc->funcaddr, p)) | ||
462 | ptr = p; | ||
463 | return ptr; | ||
464 | } | ||
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 4a8ce62fe112..9f6c1ca1739e 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -66,11 +66,12 @@ SECTIONS | |||
66 | __got2_end = .; | 66 | __got2_end = .; |
67 | #endif /* CONFIG_PPC32 */ | 67 | #endif /* CONFIG_PPC32 */ |
68 | 68 | ||
69 | . = ALIGN(PAGE_SIZE); | ||
70 | _etext = .; | ||
71 | PROVIDE32 (etext = .); | ||
72 | } :kernel | 69 | } :kernel |
73 | 70 | ||
71 | . = ALIGN(PAGE_SIZE); | ||
72 | _etext = .; | ||
73 | PROVIDE32 (etext = .); | ||
74 | |||
74 | /* Read-only data */ | 75 | /* Read-only data */ |
75 | RODATA | 76 | RODATA |
76 | 77 | ||