aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/Makefile1
-rw-r--r--arch/powerpc/kernel/setup_64.c4
-rw-r--r--arch/powerpc/kernel/suspend.c24
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S6
4 files changed, 28 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index e0fa80eca366..aa693d0f151a 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -37,6 +37,7 @@ obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
37obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o 37obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o
38obj-$(CONFIG_TAU) += tau_6xx.o 38obj-$(CONFIG_TAU) += tau_6xx.o
39obj32-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_32.o 39obj32-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_32.o
40obj-$(CONFIG_SOFTWARE_SUSPEND) += suspend.o
40obj32-$(CONFIG_MODULES) += module_32.o 41obj32-$(CONFIG_MODULES) += module_32.o
41 42
42ifeq ($(CONFIG_PPC_MERGE),y) 43ifeq ($(CONFIG_PPC_MERGE),y)
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 22083ce3cc30..6018178708a5 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -582,14 +582,14 @@ void __init setup_per_cpu_areas(void)
582 char *ptr; 582 char *ptr;
583 583
584 /* Copy section for each CPU (we discard the original) */ 584 /* Copy section for each CPU (we discard the original) */
585 size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES); 585 size = ALIGN(__per_cpu_end - __per_cpu_start, PAGE_SIZE);
586#ifdef CONFIG_MODULES 586#ifdef CONFIG_MODULES
587 if (size < PERCPU_ENOUGH_ROOM) 587 if (size < PERCPU_ENOUGH_ROOM)
588 size = PERCPU_ENOUGH_ROOM; 588 size = PERCPU_ENOUGH_ROOM;
589#endif 589#endif
590 590
591 for_each_possible_cpu(i) { 591 for_each_possible_cpu(i) {
592 ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size); 592 ptr = alloc_bootmem_pages_node(NODE_DATA(cpu_to_node(i)), size);
593 if (!ptr) 593 if (!ptr)
594 panic("Cannot allocate cpu data for CPU %d\n", i); 594 panic("Cannot allocate cpu data for CPU %d\n", i);
595 595
diff --git a/arch/powerpc/kernel/suspend.c b/arch/powerpc/kernel/suspend.c
new file mode 100644
index 000000000000..8cee57107541
--- /dev/null
+++ b/arch/powerpc/kernel/suspend.c
@@ -0,0 +1,24 @@
1/*
2 * Suspend support specific for power.
3 *
4 * Distribute under GPLv2
5 *
6 * Copyright (c) 2002 Pavel Machek <pavel@suse.cz>
7 * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org>
8 */
9
10#include <asm/page.h>
11
12/* References to section boundaries */
13extern const void __nosave_begin, __nosave_end;
14
15/*
16 * pfn_is_nosave - check if given pfn is in the 'nosave' section
17 */
18
19int pfn_is_nosave(unsigned long pfn)
20{
21 unsigned long nosave_begin_pfn = __pa(&__nosave_begin) >> PAGE_SHIFT;
22 unsigned long nosave_end_pfn = PAGE_ALIGN(__pa(&__nosave_end)) >> PAGE_SHIFT;
23 return (pfn >= nosave_begin_pfn) && (pfn < nosave_end_pfn);
24}
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 7eefeb4a30e7..132067313147 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -139,11 +139,7 @@ SECTIONS
139 __initramfs_end = .; 139 __initramfs_end = .;
140 } 140 }
141#endif 141#endif
142#ifdef CONFIG_PPC32 142 . = ALIGN(PAGE_SIZE);
143 . = ALIGN(32);
144#else
145 . = ALIGN(128);
146#endif
147 .data.percpu : { 143 .data.percpu : {
148 __per_cpu_start = .; 144 __per_cpu_start = .;
149 *(.data.percpu) 145 *(.data.percpu)