diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/crash.c | 59 | ||||
-rw-r--r-- | arch/powerpc/kernel/kprobes.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/rtas_flash.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/signal_32.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/vdso.c | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 7 | ||||
-rw-r--r-- | arch/powerpc/mm/init_64.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/embedded6xx/ls_uart.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/backlight.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh_event.c | 6 |
11 files changed, 30 insertions, 80 deletions
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index 89b03c8da9d2..d3f2080d2eee 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c | |||
@@ -46,61 +46,6 @@ int crashing_cpu = -1; | |||
46 | static cpumask_t cpus_in_crash = CPU_MASK_NONE; | 46 | static cpumask_t cpus_in_crash = CPU_MASK_NONE; |
47 | cpumask_t cpus_in_sr = CPU_MASK_NONE; | 47 | cpumask_t cpus_in_sr = CPU_MASK_NONE; |
48 | 48 | ||
49 | static u32 *append_elf_note(u32 *buf, char *name, unsigned type, void *data, | ||
50 | size_t data_len) | ||
51 | { | ||
52 | struct elf_note note; | ||
53 | |||
54 | note.n_namesz = strlen(name) + 1; | ||
55 | note.n_descsz = data_len; | ||
56 | note.n_type = type; | ||
57 | memcpy(buf, ¬e, sizeof(note)); | ||
58 | buf += (sizeof(note) +3)/4; | ||
59 | memcpy(buf, name, note.n_namesz); | ||
60 | buf += (note.n_namesz + 3)/4; | ||
61 | memcpy(buf, data, note.n_descsz); | ||
62 | buf += (note.n_descsz + 3)/4; | ||
63 | |||
64 | return buf; | ||
65 | } | ||
66 | |||
67 | static void final_note(u32 *buf) | ||
68 | { | ||
69 | struct elf_note note; | ||
70 | |||
71 | note.n_namesz = 0; | ||
72 | note.n_descsz = 0; | ||
73 | note.n_type = 0; | ||
74 | memcpy(buf, ¬e, sizeof(note)); | ||
75 | } | ||
76 | |||
77 | static void crash_save_this_cpu(struct pt_regs *regs, int cpu) | ||
78 | { | ||
79 | struct elf_prstatus prstatus; | ||
80 | u32 *buf; | ||
81 | |||
82 | if ((cpu < 0) || (cpu >= NR_CPUS)) | ||
83 | return; | ||
84 | |||
85 | /* Using ELF notes here is opportunistic. | ||
86 | * I need a well defined structure format | ||
87 | * for the data I pass, and I need tags | ||
88 | * on the data to indicate what information I have | ||
89 | * squirrelled away. ELF notes happen to provide | ||
90 | * all of that that no need to invent something new. | ||
91 | */ | ||
92 | buf = (u32*)per_cpu_ptr(crash_notes, cpu); | ||
93 | if (!buf) | ||
94 | return; | ||
95 | |||
96 | memset(&prstatus, 0, sizeof(prstatus)); | ||
97 | prstatus.pr_pid = current->pid; | ||
98 | elf_core_copy_regs(&prstatus.pr_reg, regs); | ||
99 | buf = append_elf_note(buf, "CORE", NT_PRSTATUS, &prstatus, | ||
100 | sizeof(prstatus)); | ||
101 | final_note(buf); | ||
102 | } | ||
103 | |||
104 | #ifdef CONFIG_SMP | 49 | #ifdef CONFIG_SMP |
105 | static atomic_t enter_on_soft_reset = ATOMIC_INIT(0); | 50 | static atomic_t enter_on_soft_reset = ATOMIC_INIT(0); |
106 | 51 | ||
@@ -113,7 +58,7 @@ void crash_ipi_callback(struct pt_regs *regs) | |||
113 | 58 | ||
114 | hard_irq_disable(); | 59 | hard_irq_disable(); |
115 | if (!cpu_isset(cpu, cpus_in_crash)) | 60 | if (!cpu_isset(cpu, cpus_in_crash)) |
116 | crash_save_this_cpu(regs, cpu); | 61 | crash_save_cpu(regs, cpu); |
117 | cpu_set(cpu, cpus_in_crash); | 62 | cpu_set(cpu, cpus_in_crash); |
118 | 63 | ||
119 | /* | 64 | /* |
@@ -306,7 +251,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs) | |||
306 | * such that another IPI will not be sent. | 251 | * such that another IPI will not be sent. |
307 | */ | 252 | */ |
308 | crashing_cpu = smp_processor_id(); | 253 | crashing_cpu = smp_processor_id(); |
309 | crash_save_this_cpu(regs, crashing_cpu); | 254 | crash_save_cpu(regs, crashing_cpu); |
310 | crash_kexec_prepare_cpus(crashing_cpu); | 255 | crash_kexec_prepare_cpus(crashing_cpu); |
311 | cpu_set(crashing_cpu, cpus_in_crash); | 256 | cpu_set(crashing_cpu, cpus_in_crash); |
312 | if (ppc_md.kexec_cpu_down) | 257 | if (ppc_md.kexec_cpu_down) |
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 7b8d12b9026c..4657563f8813 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
@@ -85,7 +85,7 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
85 | void __kprobes arch_remove_kprobe(struct kprobe *p) | 85 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
86 | { | 86 | { |
87 | mutex_lock(&kprobe_mutex); | 87 | mutex_lock(&kprobe_mutex); |
88 | free_insn_slot(p->ainsn.insn); | 88 | free_insn_slot(p->ainsn.insn, 0); |
89 | mutex_unlock(&kprobe_mutex); | 89 | mutex_unlock(&kprobe_mutex); |
90 | } | 90 | } |
91 | 91 | ||
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index b9561d300516..7d0f13fecc0e 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -101,7 +101,7 @@ struct flash_block_list_header { /* just the header of flash_block_list */ | |||
101 | static struct flash_block_list_header rtas_firmware_flash_list = {0, NULL}; | 101 | static struct flash_block_list_header rtas_firmware_flash_list = {0, NULL}; |
102 | 102 | ||
103 | /* Use slab cache to guarantee 4k alignment */ | 103 | /* Use slab cache to guarantee 4k alignment */ |
104 | static kmem_cache_t *flash_block_cache = NULL; | 104 | static struct kmem_cache *flash_block_cache = NULL; |
105 | 105 | ||
106 | #define FLASH_BLOCK_LIST_VERSION (1UL) | 106 | #define FLASH_BLOCK_LIST_VERSION (1UL) |
107 | 107 | ||
@@ -286,7 +286,7 @@ static ssize_t rtas_flash_read(struct file *file, char __user *buf, | |||
286 | } | 286 | } |
287 | 287 | ||
288 | /* constructor for flash_block_cache */ | 288 | /* constructor for flash_block_cache */ |
289 | void rtas_block_ctor(void *ptr, kmem_cache_t *cache, unsigned long flags) | 289 | void rtas_block_ctor(void *ptr, struct kmem_cache *cache, unsigned long flags) |
290 | { | 290 | { |
291 | memset(ptr, 0, RTAS_BLK_SIZE); | 291 | memset(ptr, 0, RTAS_BLK_SIZE); |
292 | } | 292 | } |
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index 320353f0926f..e4ebe1a6228e 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <linux/stddef.h> | 36 | #include <linux/stddef.h> |
37 | #include <linux/tty.h> | 37 | #include <linux/tty.h> |
38 | #include <linux/binfmts.h> | 38 | #include <linux/binfmts.h> |
39 | #include <linux/suspend.h> | 39 | #include <linux/freezer.h> |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index c913ad5cad29..a4b28c73bba0 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -264,7 +264,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, | |||
264 | 264 | ||
265 | 265 | ||
266 | /* Allocate a VMA structure and fill it up */ | 266 | /* Allocate a VMA structure and fill it up */ |
267 | vma = kmem_cache_zalloc(vm_area_cachep, SLAB_KERNEL); | 267 | vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
268 | if (vma == NULL) { | 268 | if (vma == NULL) { |
269 | rc = -ENOMEM; | 269 | rc = -ENOMEM; |
270 | goto fail_mmapsem; | 270 | goto fail_mmapsem; |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 506d89768d45..89c836d54809 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -146,6 +146,11 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | |||
146 | return hugepte_offset(hpdp, addr); | 146 | return hugepte_offset(hpdp, addr); |
147 | } | 147 | } |
148 | 148 | ||
149 | int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | ||
150 | { | ||
151 | return 0; | ||
152 | } | ||
153 | |||
149 | static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp) | 154 | static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp) |
150 | { | 155 | { |
151 | pte_t *hugepte = hugepd_page(*hpdp); | 156 | pte_t *hugepte = hugepd_page(*hpdp); |
@@ -1042,7 +1047,7 @@ repeat: | |||
1042 | return err; | 1047 | return err; |
1043 | } | 1048 | } |
1044 | 1049 | ||
1045 | static void zero_ctor(void *addr, kmem_cache_t *cache, unsigned long flags) | 1050 | static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags) |
1046 | { | 1051 | { |
1047 | memset(addr, 0, kmem_cache_size(cache)); | 1052 | memset(addr, 0, kmem_cache_size(cache)); |
1048 | } | 1053 | } |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 9a178549cbcf..d12a87ec5ae9 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -141,7 +141,7 @@ static int __init setup_kcore(void) | |||
141 | } | 141 | } |
142 | module_init(setup_kcore); | 142 | module_init(setup_kcore); |
143 | 143 | ||
144 | static void zero_ctor(void *addr, kmem_cache_t *cache, unsigned long flags) | 144 | static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags) |
145 | { | 145 | { |
146 | memset(addr, 0, kmem_cache_size(cache)); | 146 | memset(addr, 0, kmem_cache_size(cache)); |
147 | } | 147 | } |
@@ -166,9 +166,9 @@ static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = { | |||
166 | /* Hugepages need one extra cache, initialized in hugetlbpage.c. We | 166 | /* Hugepages need one extra cache, initialized in hugetlbpage.c. We |
167 | * can't put into the tables above, because HPAGE_SHIFT is not compile | 167 | * can't put into the tables above, because HPAGE_SHIFT is not compile |
168 | * time constant. */ | 168 | * time constant. */ |
169 | kmem_cache_t *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)+1]; | 169 | struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)+1]; |
170 | #else | 170 | #else |
171 | kmem_cache_t *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)]; | 171 | struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)]; |
172 | #endif | 172 | #endif |
173 | 173 | ||
174 | void pgtable_cache_init(void) | 174 | void pgtable_cache_init(void) |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index c7d010749a18..e3af9112c026 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -40,7 +40,7 @@ | |||
40 | 40 | ||
41 | #include "spufs.h" | 41 | #include "spufs.h" |
42 | 42 | ||
43 | static kmem_cache_t *spufs_inode_cache; | 43 | static struct kmem_cache *spufs_inode_cache; |
44 | char *isolated_loader; | 44 | char *isolated_loader; |
45 | 45 | ||
46 | static struct inode * | 46 | static struct inode * |
@@ -48,7 +48,7 @@ spufs_alloc_inode(struct super_block *sb) | |||
48 | { | 48 | { |
49 | struct spufs_inode_info *ei; | 49 | struct spufs_inode_info *ei; |
50 | 50 | ||
51 | ei = kmem_cache_alloc(spufs_inode_cache, SLAB_KERNEL); | 51 | ei = kmem_cache_alloc(spufs_inode_cache, GFP_KERNEL); |
52 | if (!ei) | 52 | if (!ei) |
53 | return NULL; | 53 | return NULL; |
54 | 54 | ||
@@ -65,7 +65,7 @@ spufs_destroy_inode(struct inode *inode) | |||
65 | } | 65 | } |
66 | 66 | ||
67 | static void | 67 | static void |
68 | spufs_init_once(void *p, kmem_cache_t * cachep, unsigned long flags) | 68 | spufs_init_once(void *p, struct kmem_cache * cachep, unsigned long flags) |
69 | { | 69 | { |
70 | struct spufs_inode_info *ei = p; | 70 | struct spufs_inode_info *ei = p; |
71 | 71 | ||
diff --git a/arch/powerpc/platforms/embedded6xx/ls_uart.c b/arch/powerpc/platforms/embedded6xx/ls_uart.c index 31bcdae84823..0e837762cc5b 100644 --- a/arch/powerpc/platforms/embedded6xx/ls_uart.c +++ b/arch/powerpc/platforms/embedded6xx/ls_uart.c | |||
@@ -14,7 +14,7 @@ static unsigned long avr_clock; | |||
14 | 14 | ||
15 | static struct work_struct wd_work; | 15 | static struct work_struct wd_work; |
16 | 16 | ||
17 | static void wd_stop(void *unused) | 17 | static void wd_stop(struct work_struct *unused) |
18 | { | 18 | { |
19 | const char string[] = "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK"; | 19 | const char string[] = "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK"; |
20 | int i = 0, rescue = 8; | 20 | int i = 0, rescue = 8; |
@@ -122,7 +122,7 @@ static int __init ls_uarts_init(void) | |||
122 | 122 | ||
123 | ls_uart_init(); | 123 | ls_uart_init(); |
124 | 124 | ||
125 | INIT_WORK(&wd_work, wd_stop, NULL); | 125 | INIT_WORK(&wd_work, wd_stop); |
126 | schedule_work(&wd_work); | 126 | schedule_work(&wd_work); |
127 | 127 | ||
128 | return 0; | 128 | return 0; |
diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/platforms/powermac/backlight.c index afa593a8544a..c3a89414ddc0 100644 --- a/arch/powerpc/platforms/powermac/backlight.c +++ b/arch/powerpc/platforms/powermac/backlight.c | |||
@@ -18,11 +18,11 @@ | |||
18 | 18 | ||
19 | #define OLD_BACKLIGHT_MAX 15 | 19 | #define OLD_BACKLIGHT_MAX 15 |
20 | 20 | ||
21 | static void pmac_backlight_key_worker(void *data); | 21 | static void pmac_backlight_key_worker(struct work_struct *work); |
22 | static void pmac_backlight_set_legacy_worker(void *data); | 22 | static void pmac_backlight_set_legacy_worker(struct work_struct *work); |
23 | 23 | ||
24 | static DECLARE_WORK(pmac_backlight_key_work, pmac_backlight_key_worker, NULL); | 24 | static DECLARE_WORK(pmac_backlight_key_work, pmac_backlight_key_worker); |
25 | static DECLARE_WORK(pmac_backlight_set_legacy_work, pmac_backlight_set_legacy_worker, NULL); | 25 | static DECLARE_WORK(pmac_backlight_set_legacy_work, pmac_backlight_set_legacy_worker); |
26 | 26 | ||
27 | /* Although these variables are used in interrupt context, it makes no sense to | 27 | /* Although these variables are used in interrupt context, it makes no sense to |
28 | * protect them. No user is able to produce enough key events per second and | 28 | * protect them. No user is able to produce enough key events per second and |
@@ -94,7 +94,7 @@ int pmac_backlight_curve_lookup(struct fb_info *info, int value) | |||
94 | return level; | 94 | return level; |
95 | } | 95 | } |
96 | 96 | ||
97 | static void pmac_backlight_key_worker(void *data) | 97 | static void pmac_backlight_key_worker(struct work_struct *work) |
98 | { | 98 | { |
99 | if (atomic_read(&kernel_backlight_disabled)) | 99 | if (atomic_read(&kernel_backlight_disabled)) |
100 | return; | 100 | return; |
@@ -166,7 +166,7 @@ static int __pmac_backlight_set_legacy_brightness(int brightness) | |||
166 | return error; | 166 | return error; |
167 | } | 167 | } |
168 | 168 | ||
169 | static void pmac_backlight_set_legacy_worker(void *data) | 169 | static void pmac_backlight_set_legacy_worker(struct work_struct *work) |
170 | { | 170 | { |
171 | if (atomic_read(&kernel_backlight_disabled)) | 171 | if (atomic_read(&kernel_backlight_disabled)) |
172 | return; | 172 | return; |
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c index 137077451316..49037edf7d39 100644 --- a/arch/powerpc/platforms/pseries/eeh_event.c +++ b/arch/powerpc/platforms/pseries/eeh_event.c | |||
@@ -37,8 +37,8 @@ | |||
37 | /* EEH event workqueue setup. */ | 37 | /* EEH event workqueue setup. */ |
38 | static DEFINE_SPINLOCK(eeh_eventlist_lock); | 38 | static DEFINE_SPINLOCK(eeh_eventlist_lock); |
39 | LIST_HEAD(eeh_eventlist); | 39 | LIST_HEAD(eeh_eventlist); |
40 | static void eeh_thread_launcher(void *); | 40 | static void eeh_thread_launcher(struct work_struct *); |
41 | DECLARE_WORK(eeh_event_wq, eeh_thread_launcher, NULL); | 41 | DECLARE_WORK(eeh_event_wq, eeh_thread_launcher); |
42 | 42 | ||
43 | /* Serialize reset sequences for a given pci device */ | 43 | /* Serialize reset sequences for a given pci device */ |
44 | DEFINE_MUTEX(eeh_event_mutex); | 44 | DEFINE_MUTEX(eeh_event_mutex); |
@@ -103,7 +103,7 @@ static int eeh_event_handler(void * dummy) | |||
103 | * eeh_thread_launcher | 103 | * eeh_thread_launcher |
104 | * @dummy - unused | 104 | * @dummy - unused |
105 | */ | 105 | */ |
106 | static void eeh_thread_launcher(void *dummy) | 106 | static void eeh_thread_launcher(struct work_struct *dummy) |
107 | { | 107 | { |
108 | if (kernel_thread(eeh_event_handler, NULL, CLONE_KERNEL) < 0) | 108 | if (kernel_thread(eeh_event_handler, NULL, CLONE_KERNEL) < 0) |
109 | printk(KERN_ERR "Failed to start EEH daemon\n"); | 109 | printk(KERN_ERR "Failed to start EEH daemon\n"); |