aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-05-07 23:37:51 -0400
committerPaul Mackerras <paulus@samba.org>2007-05-07 23:37:51 -0400
commit02bbc0f09c90cefdb2837605c96a66c5ce4ba2e1 (patch)
tree04ef573cd4de095c500c9fc3477f4278c0b36300 /arch/powerpc/kernel
parent7487a2245b8841c77ba9db406cf99a483b9334e9 (diff)
parent5b94f675f57e4ff16c8fda09088d7480a84dcd91 (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/Makefile2
-rw-r--r--arch/powerpc/kernel/legacy_serial.c3
-rw-r--r--arch/powerpc/kernel/pci_64.c2
-rw-r--r--arch/powerpc/kernel/setup_64.c4
-rw-r--r--arch/powerpc/kernel/suspend.c24
-rw-r--r--arch/powerpc/kernel/vio.c4
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S6
7 files changed, 33 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 4dc73b8c25ba..94c703a95013 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -36,7 +36,7 @@ obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o
36obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 36obj-$(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
39obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o 39obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o suspend.o
40obj32-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_32.o 40obj32-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_32.o
41obj64-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_64.o swsusp_asm64.o 41obj64-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_64.o swsusp_asm64.o
42obj32-$(CONFIG_MODULES) += module_32.o 42obj32-$(CONFIG_MODULES) += module_32.o
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 662cd67428de..cea8045ba40b 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -115,7 +115,8 @@ static int __init add_legacy_soc_port(struct device_node *np,
115{ 115{
116 u64 addr; 116 u64 addr;
117 const u32 *addrp; 117 const u32 *addrp;
118 upf_t flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ; 118 upf_t flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ
119 | UPF_FIXED_PORT;
119 struct device_node *tsi = of_get_parent(np); 120 struct device_node *tsi = of_get_parent(np);
120 121
121 /* We only support ports that have a clock frequency properly 122 /* We only support ports that have a clock frequency properly
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 706b7f3da5ff..6d05a1f377b5 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -340,7 +340,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
340 struct pci_dev *dev; 340 struct pci_dev *dev;
341 const char *type; 341 const char *type;
342 342
343 dev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL); 343 dev = alloc_pci_dev();
344 if (!dev) 344 if (!dev)
345 return NULL; 345 return NULL;
346 type = of_get_property(node, "device_type", NULL); 346 type = of_get_property(node, "device_type", NULL);
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/vio.c b/arch/powerpc/kernel/vio.c
index ec871063733a..62c1bc12ea39 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -37,7 +37,7 @@
37#include <asm/iseries/hv_call_xm.h> 37#include <asm/iseries/hv_call_xm.h>
38#include <asm/iseries/iommu.h> 38#include <asm/iseries/iommu.h>
39 39
40extern struct subsystem devices_subsys; /* needed for vio_find_name() */ 40extern struct kset devices_subsys; /* needed for vio_find_name() */
41 41
42static struct vio_dev vio_bus_device = { /* fake "parent" device */ 42static struct vio_dev vio_bus_device = { /* fake "parent" device */
43 .name = vio_bus_device.dev.bus_id, 43 .name = vio_bus_device.dev.bus_id,
@@ -427,7 +427,7 @@ static struct vio_dev *vio_find_name(const char *kobj_name)
427{ 427{
428 struct kobject *found; 428 struct kobject *found;
429 429
430 found = kset_find_obj(&devices_subsys.kset, kobj_name); 430 found = kset_find_obj(&devices_subsys, kobj_name);
431 if (!found) 431 if (!found)
432 return NULL; 432 return NULL;
433 433
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)