diff options
author | Paul Mackerras <paulus@samba.org> | 2007-05-07 23:37:51 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-07 23:37:51 -0400 |
commit | 02bbc0f09c90cefdb2837605c96a66c5ce4ba2e1 (patch) | |
tree | 04ef573cd4de095c500c9fc3477f4278c0b36300 /arch/powerpc | |
parent | 7487a2245b8841c77ba9db406cf99a483b9334e9 (diff) | |
parent | 5b94f675f57e4ff16c8fda09088d7480a84dcd91 (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/Kconfig | 13 | ||||
-rw-r--r-- | arch/powerpc/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/legacy_serial.c | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/suspend.c | 24 | ||||
-rw-r--r-- | arch/powerpc/kernel/vio.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/vmlinux.lds.S | 6 | ||||
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 24 | ||||
-rw-r--r-- | arch/powerpc/mm/init_64.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/cpufreq_32.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/power.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/ras.c | 1 |
14 files changed, 74 insertions, 24 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 5ada5b45cbb1..67668fdb0292 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -120,6 +120,19 @@ config GENERIC_BUG | |||
120 | config SYS_SUPPORTS_APM_EMULATION | 120 | config SYS_SUPPORTS_APM_EMULATION |
121 | bool | 121 | bool |
122 | 122 | ||
123 | # | ||
124 | # Powerpc uses the slab allocator to manage its ptes and the | ||
125 | # page structs of ptes are used for splitting the page table | ||
126 | # lock for configurations supporting more than SPLIT_PTLOCK_CPUS. | ||
127 | # | ||
128 | # In that special configuration the page structs of slabs are modified. | ||
129 | # This setting disables the selection of SLUB as a slab allocator. | ||
130 | # | ||
131 | config ARCH_USES_SLAB_PAGE_STRUCT | ||
132 | bool | ||
133 | default y | ||
134 | depends on SPLIT_PTLOCK_CPUS <= NR_CPUS | ||
135 | |||
123 | config DEFAULT_UIMAGE | 136 | config DEFAULT_UIMAGE |
124 | bool | 137 | bool |
125 | help | 138 | help |
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 | |||
36 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o | 36 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
37 | obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o | 37 | obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o |
38 | obj-$(CONFIG_TAU) += tau_6xx.o | 38 | obj-$(CONFIG_TAU) += tau_6xx.o |
39 | obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o | 39 | obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o suspend.o |
40 | obj32-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_32.o | 40 | obj32-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_32.o |
41 | obj64-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_64.o swsusp_asm64.o | 41 | obj64-$(CONFIG_SOFTWARE_SUSPEND) += swsusp_64.o swsusp_asm64.o |
42 | obj32-$(CONFIG_MODULES) += module_32.o | 42 | obj32-$(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 */ | ||
13 | extern const void __nosave_begin, __nosave_end; | ||
14 | |||
15 | /* | ||
16 | * pfn_is_nosave - check if given pfn is in the 'nosave' section | ||
17 | */ | ||
18 | |||
19 | int 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 | ||
40 | extern struct subsystem devices_subsys; /* needed for vio_find_name() */ | 40 | extern struct kset devices_subsys; /* needed for vio_find_name() */ |
41 | 41 | ||
42 | static struct vio_dev vio_bus_device = { /* fake "parent" device */ | 42 | static 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) |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 8508f973d9cc..1f07f70ac89f 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -566,6 +566,13 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, | |||
566 | if (len > TASK_SIZE) | 566 | if (len > TASK_SIZE) |
567 | return -ENOMEM; | 567 | return -ENOMEM; |
568 | 568 | ||
569 | /* handle fixed mapping: prevent overlap with huge pages */ | ||
570 | if (flags & MAP_FIXED) { | ||
571 | if (is_hugepage_only_range(mm, addr, len)) | ||
572 | return -EINVAL; | ||
573 | return addr; | ||
574 | } | ||
575 | |||
569 | if (addr) { | 576 | if (addr) { |
570 | addr = PAGE_ALIGN(addr); | 577 | addr = PAGE_ALIGN(addr); |
571 | vma = find_vma(mm, addr); | 578 | vma = find_vma(mm, addr); |
@@ -641,6 +648,13 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, | |||
641 | if (len > TASK_SIZE) | 648 | if (len > TASK_SIZE) |
642 | return -ENOMEM; | 649 | return -ENOMEM; |
643 | 650 | ||
651 | /* handle fixed mapping: prevent overlap with huge pages */ | ||
652 | if (flags & MAP_FIXED) { | ||
653 | if (is_hugepage_only_range(mm, addr, len)) | ||
654 | return -EINVAL; | ||
655 | return addr; | ||
656 | } | ||
657 | |||
644 | /* dont allow allocations above current base */ | 658 | /* dont allow allocations above current base */ |
645 | if (mm->free_area_cache > base) | 659 | if (mm->free_area_cache > base) |
646 | mm->free_area_cache = base; | 660 | mm->free_area_cache = base; |
@@ -823,6 +837,13 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
823 | /* Paranoia, caller should have dealt with this */ | 837 | /* Paranoia, caller should have dealt with this */ |
824 | BUG_ON((addr + len) < addr); | 838 | BUG_ON((addr + len) < addr); |
825 | 839 | ||
840 | /* Handle MAP_FIXED */ | ||
841 | if (flags & MAP_FIXED) { | ||
842 | if (prepare_hugepage_range(addr, len, pgoff)) | ||
843 | return -EINVAL; | ||
844 | return addr; | ||
845 | } | ||
846 | |||
826 | if (test_thread_flag(TIF_32BIT)) { | 847 | if (test_thread_flag(TIF_32BIT)) { |
827 | curareas = current->mm->context.low_htlb_areas; | 848 | curareas = current->mm->context.low_htlb_areas; |
828 | 849 | ||
@@ -1057,8 +1078,7 @@ static int __init hugetlbpage_init(void) | |||
1057 | huge_pgtable_cache = kmem_cache_create("hugepte_cache", | 1078 | huge_pgtable_cache = kmem_cache_create("hugepte_cache", |
1058 | HUGEPTE_TABLE_SIZE, | 1079 | HUGEPTE_TABLE_SIZE, |
1059 | HUGEPTE_TABLE_SIZE, | 1080 | HUGEPTE_TABLE_SIZE, |
1060 | SLAB_HWCACHE_ALIGN | | 1081 | 0, |
1061 | SLAB_MUST_HWCACHE_ALIGN, | ||
1062 | zero_ctor, NULL); | 1082 | zero_ctor, NULL); |
1063 | if (! huge_pgtable_cache) | 1083 | if (! huge_pgtable_cache) |
1064 | panic("hugetlbpage_init(): could not create hugepte cache\n"); | 1084 | panic("hugetlbpage_init(): could not create hugepte cache\n"); |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index d12a87ec5ae9..4416d5140c53 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -183,8 +183,7 @@ void pgtable_cache_init(void) | |||
183 | "for size: %08x...\n", name, i, size); | 183 | "for size: %08x...\n", name, i, size); |
184 | pgtable_cache[i] = kmem_cache_create(name, | 184 | pgtable_cache[i] = kmem_cache_create(name, |
185 | size, size, | 185 | size, size, |
186 | SLAB_HWCACHE_ALIGN | | 186 | 0, |
187 | SLAB_MUST_HWCACHE_ALIGN, | ||
188 | zero_ctor, | 187 | zero_ctor, |
189 | NULL); | 188 | NULL); |
190 | if (! pgtable_cache[i]) | 189 | if (! pgtable_cache[i]) |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 13e4f70ec8c0..a93f328a7317 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -71,8 +71,7 @@ spufs_init_once(void *p, struct kmem_cache * cachep, unsigned long flags) | |||
71 | { | 71 | { |
72 | struct spufs_inode_info *ei = p; | 72 | struct spufs_inode_info *ei = p; |
73 | 73 | ||
74 | if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == | 74 | if (flags & SLAB_CTOR_CONSTRUCTOR) { |
75 | SLAB_CTOR_CONSTRUCTOR) { | ||
76 | inode_init_once(&ei->vfs_inode); | 75 | inode_init_once(&ei->vfs_inode); |
77 | } | 76 | } |
78 | } | 77 | } |
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c index 8943a9456bb7..1fe35dab0e9e 100644 --- a/arch/powerpc/platforms/powermac/cpufreq_32.c +++ b/arch/powerpc/platforms/powermac/cpufreq_32.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/cpufreq.h> | 25 | #include <linux/cpufreq.h> |
26 | #include <linux/init.h> | 26 | #include <linux/init.h> |
27 | #include <linux/sysdev.h> | 27 | #include <linux/sysdev.h> |
28 | #include <linux/i2c.h> | ||
29 | #include <linux/hardirq.h> | 28 | #include <linux/hardirq.h> |
30 | #include <asm/prom.h> | 29 | #include <asm/prom.h> |
31 | #include <asm/machdep.h> | 30 | #include <asm/machdep.h> |
diff --git a/arch/powerpc/platforms/pseries/power.c b/arch/powerpc/platforms/pseries/power.c index 2624b71df73d..73e69023d90a 100644 --- a/arch/powerpc/platforms/pseries/power.c +++ b/arch/powerpc/platforms/pseries/power.c | |||
@@ -28,13 +28,13 @@ | |||
28 | 28 | ||
29 | unsigned long rtas_poweron_auto; /* default and normal state is 0 */ | 29 | unsigned long rtas_poweron_auto; /* default and normal state is 0 */ |
30 | 30 | ||
31 | static ssize_t auto_poweron_show(struct subsystem *subsys, char *buf) | 31 | static ssize_t auto_poweron_show(struct kset *kset, char *buf) |
32 | { | 32 | { |
33 | return sprintf(buf, "%lu\n", rtas_poweron_auto); | 33 | return sprintf(buf, "%lu\n", rtas_poweron_auto); |
34 | } | 34 | } |
35 | 35 | ||
36 | static ssize_t | 36 | static ssize_t |
37 | auto_poweron_store(struct subsystem *subsys, const char *buf, size_t n) | 37 | auto_poweron_store(struct kset *kset, const char *buf, size_t n) |
38 | { | 38 | { |
39 | int ret; | 39 | int ret; |
40 | unsigned long ups_restart; | 40 | unsigned long ups_restart; |
@@ -72,12 +72,12 @@ static int __init pm_init(void) | |||
72 | { | 72 | { |
73 | int error = subsystem_register(&power_subsys); | 73 | int error = subsystem_register(&power_subsys); |
74 | if (!error) | 74 | if (!error) |
75 | error = sysfs_create_group(&power_subsys.kset.kobj,&attr_group); | 75 | error = sysfs_create_group(&power_subsys.kobj, &attr_group); |
76 | return error; | 76 | return error; |
77 | } | 77 | } |
78 | core_initcall(pm_init); | 78 | core_initcall(pm_init); |
79 | #else | 79 | #else |
80 | extern struct subsystem power_subsys; | 80 | extern struct kset power_subsys; |
81 | 81 | ||
82 | static int __init apo_pm_init(void) | 82 | static int __init apo_pm_init(void) |
83 | { | 83 | { |
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c index 53aa04101ced..3a393c7f390e 100644 --- a/arch/powerpc/platforms/pseries/ras.c +++ b/arch/powerpc/platforms/pseries/ras.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/timex.h> | 31 | #include <linux/timex.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/pci.h> | ||
35 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
36 | #include <linux/irq.h> | 35 | #include <linux/irq.h> |
37 | #include <linux/random.h> | 36 | #include <linux/random.h> |