diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/cpu_setup_fsl_booke.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/crash_dump.c | 17 | ||||
-rw-r--r-- | arch/powerpc/kernel/irq.c | 81 | ||||
-rw-r--r-- | arch/powerpc/kernel/machine_kexec.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_dn.c | 7 | ||||
-rw-r--r-- | arch/powerpc/kernel/process.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 15 | ||||
-rw-r--r-- | arch/powerpc/kernel/vdso.c | 6 |
9 files changed, 39 insertions, 101 deletions
diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S b/arch/powerpc/kernel/cpu_setup_fsl_booke.S index 5c518ad3445c..913611105c1f 100644 --- a/arch/powerpc/kernel/cpu_setup_fsl_booke.S +++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S | |||
@@ -64,7 +64,7 @@ _GLOBAL(__setup_cpu_e500v2) | |||
64 | bl __e500_icache_setup | 64 | bl __e500_icache_setup |
65 | bl __e500_dcache_setup | 65 | bl __e500_dcache_setup |
66 | bl __setup_e500_ivors | 66 | bl __setup_e500_ivors |
67 | #ifdef CONFIG_RAPIDIO | 67 | #ifdef CONFIG_FSL_RIO |
68 | /* Ensure that RFXE is set */ | 68 | /* Ensure that RFXE is set */ |
69 | mfspr r3,SPRN_HID1 | 69 | mfspr r3,SPRN_HID1 |
70 | oris r3,r3,HID1_RFXE@h | 70 | oris r3,r3,HID1_RFXE@h |
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index 0a2af50243cb..424afb6b8fba 100644 --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c | |||
@@ -28,9 +28,6 @@ | |||
28 | #define DBG(fmt...) | 28 | #define DBG(fmt...) |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | /* Stores the physical address of elf header of crash image. */ | ||
32 | unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; | ||
33 | |||
34 | #ifndef CONFIG_RELOCATABLE | 31 | #ifndef CONFIG_RELOCATABLE |
35 | void __init reserve_kdump_trampoline(void) | 32 | void __init reserve_kdump_trampoline(void) |
36 | { | 33 | { |
@@ -72,20 +69,6 @@ void __init setup_kdump_trampoline(void) | |||
72 | } | 69 | } |
73 | #endif /* CONFIG_RELOCATABLE */ | 70 | #endif /* CONFIG_RELOCATABLE */ |
74 | 71 | ||
75 | /* | ||
76 | * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by | ||
77 | * is_kdump_kernel() to determine if we are booting after a panic. Hence | ||
78 | * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE. | ||
79 | */ | ||
80 | static int __init parse_elfcorehdr(char *p) | ||
81 | { | ||
82 | if (p) | ||
83 | elfcorehdr_addr = memparse(p, &p); | ||
84 | |||
85 | return 1; | ||
86 | } | ||
87 | __setup("elfcorehdr=", parse_elfcorehdr); | ||
88 | |||
89 | static int __init parse_savemaxmem(char *p) | 72 | static int __init parse_savemaxmem(char *p) |
90 | { | 73 | { |
91 | if (p) | 74 | if (p) |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 0a5570338b96..63625e0650b5 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -195,7 +195,7 @@ notrace void arch_local_irq_restore(unsigned long en) | |||
195 | EXPORT_SYMBOL(arch_local_irq_restore); | 195 | EXPORT_SYMBOL(arch_local_irq_restore); |
196 | #endif /* CONFIG_PPC64 */ | 196 | #endif /* CONFIG_PPC64 */ |
197 | 197 | ||
198 | static int show_other_interrupts(struct seq_file *p, int prec) | 198 | int arch_show_interrupts(struct seq_file *p, int prec) |
199 | { | 199 | { |
200 | int j; | 200 | int j; |
201 | 201 | ||
@@ -231,65 +231,6 @@ static int show_other_interrupts(struct seq_file *p, int prec) | |||
231 | return 0; | 231 | return 0; |
232 | } | 232 | } |
233 | 233 | ||
234 | int show_interrupts(struct seq_file *p, void *v) | ||
235 | { | ||
236 | unsigned long flags, any_count = 0; | ||
237 | int i = *(loff_t *) v, j, prec; | ||
238 | struct irqaction *action; | ||
239 | struct irq_desc *desc; | ||
240 | struct irq_chip *chip; | ||
241 | |||
242 | if (i > nr_irqs) | ||
243 | return 0; | ||
244 | |||
245 | for (prec = 3, j = 1000; prec < 10 && j <= nr_irqs; ++prec) | ||
246 | j *= 10; | ||
247 | |||
248 | if (i == nr_irqs) | ||
249 | return show_other_interrupts(p, prec); | ||
250 | |||
251 | /* print header */ | ||
252 | if (i == 0) { | ||
253 | seq_printf(p, "%*s", prec + 8, ""); | ||
254 | for_each_online_cpu(j) | ||
255 | seq_printf(p, "CPU%-8d", j); | ||
256 | seq_putc(p, '\n'); | ||
257 | } | ||
258 | |||
259 | desc = irq_to_desc(i); | ||
260 | if (!desc) | ||
261 | return 0; | ||
262 | |||
263 | raw_spin_lock_irqsave(&desc->lock, flags); | ||
264 | for_each_online_cpu(j) | ||
265 | any_count |= kstat_irqs_cpu(i, j); | ||
266 | action = desc->action; | ||
267 | if (!action && !any_count) | ||
268 | goto out; | ||
269 | |||
270 | seq_printf(p, "%*d: ", prec, i); | ||
271 | for_each_online_cpu(j) | ||
272 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); | ||
273 | |||
274 | chip = get_irq_desc_chip(desc); | ||
275 | if (chip) | ||
276 | seq_printf(p, " %-16s", chip->name); | ||
277 | else | ||
278 | seq_printf(p, " %-16s", "None"); | ||
279 | seq_printf(p, " %-8s", (desc->status & IRQ_LEVEL) ? "Level" : "Edge"); | ||
280 | |||
281 | if (action) { | ||
282 | seq_printf(p, " %s", action->name); | ||
283 | while ((action = action->next) != NULL) | ||
284 | seq_printf(p, ", %s", action->name); | ||
285 | } | ||
286 | |||
287 | seq_putc(p, '\n'); | ||
288 | out: | ||
289 | raw_spin_unlock_irqrestore(&desc->lock, flags); | ||
290 | return 0; | ||
291 | } | ||
292 | |||
293 | /* | 234 | /* |
294 | * /proc/stat helpers | 235 | * /proc/stat helpers |
295 | */ | 236 | */ |
@@ -315,24 +256,26 @@ void fixup_irqs(const struct cpumask *map) | |||
315 | alloc_cpumask_var(&mask, GFP_KERNEL); | 256 | alloc_cpumask_var(&mask, GFP_KERNEL); |
316 | 257 | ||
317 | for_each_irq(irq) { | 258 | for_each_irq(irq) { |
259 | struct irq_data *data; | ||
318 | struct irq_chip *chip; | 260 | struct irq_chip *chip; |
319 | 261 | ||
320 | desc = irq_to_desc(irq); | 262 | desc = irq_to_desc(irq); |
321 | if (!desc) | 263 | if (!desc) |
322 | continue; | 264 | continue; |
323 | 265 | ||
324 | if (desc->status & IRQ_PER_CPU) | 266 | data = irq_desc_get_irq_data(desc); |
267 | if (irqd_is_per_cpu(data)) | ||
325 | continue; | 268 | continue; |
326 | 269 | ||
327 | chip = get_irq_desc_chip(desc); | 270 | chip = irq_data_get_irq_chip(data); |
328 | 271 | ||
329 | cpumask_and(mask, desc->irq_data.affinity, map); | 272 | cpumask_and(mask, data->affinity, map); |
330 | if (cpumask_any(mask) >= nr_cpu_ids) { | 273 | if (cpumask_any(mask) >= nr_cpu_ids) { |
331 | printk("Breaking affinity for irq %i\n", irq); | 274 | printk("Breaking affinity for irq %i\n", irq); |
332 | cpumask_copy(mask, map); | 275 | cpumask_copy(mask, map); |
333 | } | 276 | } |
334 | if (chip->irq_set_affinity) | 277 | if (chip->irq_set_affinity) |
335 | chip->irq_set_affinity(&desc->irq_data, mask, true); | 278 | chip->irq_set_affinity(data, mask, true); |
336 | else if (desc->action && !(warned++)) | 279 | else if (desc->action && !(warned++)) |
337 | printk("Cannot set affinity for irq %i\n", irq); | 280 | printk("Cannot set affinity for irq %i\n", irq); |
338 | } | 281 | } |
@@ -618,7 +561,7 @@ struct irq_host *irq_alloc_host(struct device_node *of_node, | |||
618 | smp_wmb(); | 561 | smp_wmb(); |
619 | 562 | ||
620 | /* Clear norequest flags */ | 563 | /* Clear norequest flags */ |
621 | irq_to_desc(i)->status &= ~IRQ_NOREQUEST; | 564 | irq_clear_status_flags(i, IRQ_NOREQUEST); |
622 | 565 | ||
623 | /* Legacy flags are left to default at this point, | 566 | /* Legacy flags are left to default at this point, |
624 | * one can then use irq_create_mapping() to | 567 | * one can then use irq_create_mapping() to |
@@ -827,8 +770,8 @@ unsigned int irq_create_of_mapping(struct device_node *controller, | |||
827 | 770 | ||
828 | /* Set type if specified and different than the current one */ | 771 | /* Set type if specified and different than the current one */ |
829 | if (type != IRQ_TYPE_NONE && | 772 | if (type != IRQ_TYPE_NONE && |
830 | type != (irq_to_desc(virq)->status & IRQF_TRIGGER_MASK)) | 773 | type != (irqd_get_trigger_type(irq_get_irq_data(virq)))) |
831 | set_irq_type(virq, type); | 774 | irq_set_irq_type(virq, type); |
832 | return virq; | 775 | return virq; |
833 | } | 776 | } |
834 | EXPORT_SYMBOL_GPL(irq_create_of_mapping); | 777 | EXPORT_SYMBOL_GPL(irq_create_of_mapping); |
@@ -851,7 +794,7 @@ void irq_dispose_mapping(unsigned int virq) | |||
851 | return; | 794 | return; |
852 | 795 | ||
853 | /* remove chip and handler */ | 796 | /* remove chip and handler */ |
854 | set_irq_chip_and_handler(virq, NULL, NULL); | 797 | irq_set_chip_and_handler(virq, NULL, NULL); |
855 | 798 | ||
856 | /* Make sure it's completed */ | 799 | /* Make sure it's completed */ |
857 | synchronize_irq(virq); | 800 | synchronize_irq(virq); |
@@ -1156,7 +1099,7 @@ static int virq_debug_show(struct seq_file *m, void *private) | |||
1156 | seq_printf(m, "%5d ", i); | 1099 | seq_printf(m, "%5d ", i); |
1157 | seq_printf(m, "0x%05lx ", virq_to_hw(i)); | 1100 | seq_printf(m, "0x%05lx ", virq_to_hw(i)); |
1158 | 1101 | ||
1159 | chip = get_irq_desc_chip(desc); | 1102 | chip = irq_desc_get_chip(desc); |
1160 | if (chip && chip->name) | 1103 | if (chip && chip->name) |
1161 | p = chip->name; | 1104 | p = chip->name; |
1162 | else | 1105 | else |
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index bd1e1ff17b2d..7ee50f0547cb 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
@@ -31,17 +31,17 @@ void machine_kexec_mask_interrupts(void) { | |||
31 | if (!desc) | 31 | if (!desc) |
32 | continue; | 32 | continue; |
33 | 33 | ||
34 | chip = get_irq_desc_chip(desc); | 34 | chip = irq_desc_get_chip(desc); |
35 | if (!chip) | 35 | if (!chip) |
36 | continue; | 36 | continue; |
37 | 37 | ||
38 | if (chip->irq_eoi && desc->status & IRQ_INPROGRESS) | 38 | if (chip->irq_eoi && irqd_irq_inprogress(&desc->irq_data)) |
39 | chip->irq_eoi(&desc->irq_data); | 39 | chip->irq_eoi(&desc->irq_data); |
40 | 40 | ||
41 | if (chip->irq_mask) | 41 | if (chip->irq_mask) |
42 | chip->irq_mask(&desc->irq_data); | 42 | chip->irq_mask(&desc->irq_data); |
43 | 43 | ||
44 | if (chip->irq_disable && !(desc->status & IRQ_DISABLED)) | 44 | if (chip->irq_disable && !irqd_irq_disabled(&desc->irq_data)) |
45 | chip->irq_disable(&desc->irq_data); | 45 | chip->irq_disable(&desc->irq_data); |
46 | } | 46 | } |
47 | } | 47 | } |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 3cd85faa8ac6..893af2a9cd03 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -261,7 +261,7 @@ int pci_read_irq_line(struct pci_dev *pci_dev) | |||
261 | 261 | ||
262 | virq = irq_create_mapping(NULL, line); | 262 | virq = irq_create_mapping(NULL, line); |
263 | if (virq != NO_IRQ) | 263 | if (virq != NO_IRQ) |
264 | set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); | 264 | irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW); |
265 | } else { | 265 | } else { |
266 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", | 266 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", |
267 | oirq.size, oirq.specifier[0], oirq.specifier[1], | 267 | oirq.size, oirq.specifier[0], oirq.specifier[1], |
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c index 29852688ceaa..d225d99fe39d 100644 --- a/arch/powerpc/kernel/pci_dn.c +++ b/arch/powerpc/kernel/pci_dn.c | |||
@@ -176,11 +176,14 @@ static void *is_devfn_node(struct device_node *dn, void *data) | |||
176 | */ | 176 | */ |
177 | struct device_node *fetch_dev_dn(struct pci_dev *dev) | 177 | struct device_node *fetch_dev_dn(struct pci_dev *dev) |
178 | { | 178 | { |
179 | struct device_node *orig_dn = dev->dev.of_node; | 179 | struct pci_controller *phb = dev->sysdata; |
180 | struct device_node *dn; | 180 | struct device_node *dn; |
181 | unsigned long searchval = (dev->bus->number << 8) | dev->devfn; | 181 | unsigned long searchval = (dev->bus->number << 8) | dev->devfn; |
182 | 182 | ||
183 | dn = traverse_pci_devices(orig_dn, is_devfn_node, (void *)searchval); | 183 | if (WARN_ON(!phb)) |
184 | return NULL; | ||
185 | |||
186 | dn = traverse_pci_devices(phb->dn, is_devfn_node, (void *)searchval); | ||
184 | if (dn) | 187 | if (dn) |
185 | dev->dev.of_node = dn; | 188 | dev->dev.of_node = dn; |
186 | return dn; | 189 | return dn; |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 8303a6c65ef7..f74f355a9617 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -1218,11 +1218,11 @@ void __ppc64_runlatch_off(void) | |||
1218 | 1218 | ||
1219 | static struct kmem_cache *thread_info_cache; | 1219 | static struct kmem_cache *thread_info_cache; |
1220 | 1220 | ||
1221 | struct thread_info *alloc_thread_info(struct task_struct *tsk) | 1221 | struct thread_info *alloc_thread_info_node(struct task_struct *tsk, int node) |
1222 | { | 1222 | { |
1223 | struct thread_info *ti; | 1223 | struct thread_info *ti; |
1224 | 1224 | ||
1225 | ti = kmem_cache_alloc(thread_info_cache, GFP_KERNEL); | 1225 | ti = kmem_cache_alloc_node(thread_info_cache, GFP_KERNEL, node); |
1226 | if (unlikely(ti == NULL)) | 1226 | if (unlikely(ti == NULL)) |
1227 | return NULL; | 1227 | return NULL; |
1228 | #ifdef CONFIG_DEBUG_STACK_USAGE | 1228 | #ifdef CONFIG_DEBUG_STACK_USAGE |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 906536998291..895b082f1e48 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -229,12 +229,16 @@ static int gpr_get(struct task_struct *target, const struct user_regset *regset, | |||
229 | unsigned int pos, unsigned int count, | 229 | unsigned int pos, unsigned int count, |
230 | void *kbuf, void __user *ubuf) | 230 | void *kbuf, void __user *ubuf) |
231 | { | 231 | { |
232 | int ret; | 232 | int i, ret; |
233 | 233 | ||
234 | if (target->thread.regs == NULL) | 234 | if (target->thread.regs == NULL) |
235 | return -EIO; | 235 | return -EIO; |
236 | 236 | ||
237 | CHECK_FULL_REGS(target->thread.regs); | 237 | if (!FULL_REGS(target->thread.regs)) { |
238 | /* We have a partial register set. Fill 14-31 with bogus values */ | ||
239 | for (i = 14; i < 32; i++) | ||
240 | target->thread.regs->gpr[i] = NV_REG_POISON; | ||
241 | } | ||
238 | 242 | ||
239 | ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, | 243 | ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf, |
240 | target->thread.regs, | 244 | target->thread.regs, |
@@ -641,11 +645,16 @@ static int gpr32_get(struct task_struct *target, | |||
641 | compat_ulong_t *k = kbuf; | 645 | compat_ulong_t *k = kbuf; |
642 | compat_ulong_t __user *u = ubuf; | 646 | compat_ulong_t __user *u = ubuf; |
643 | compat_ulong_t reg; | 647 | compat_ulong_t reg; |
648 | int i; | ||
644 | 649 | ||
645 | if (target->thread.regs == NULL) | 650 | if (target->thread.regs == NULL) |
646 | return -EIO; | 651 | return -EIO; |
647 | 652 | ||
648 | CHECK_FULL_REGS(target->thread.regs); | 653 | if (!FULL_REGS(target->thread.regs)) { |
654 | /* We have a partial register set. Fill 14-31 with bogus values */ | ||
655 | for (i = 14; i < 32; i++) | ||
656 | target->thread.regs->gpr[i] = NV_REG_POISON; | ||
657 | } | ||
649 | 658 | ||
650 | pos /= sizeof(reg); | 659 | pos /= sizeof(reg); |
651 | count /= sizeof(reg); | 660 | count /= sizeof(reg); |
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index fd8728729abc..142ab1008c3b 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -820,17 +820,17 @@ static int __init vdso_init(void) | |||
820 | } | 820 | } |
821 | arch_initcall(vdso_init); | 821 | arch_initcall(vdso_init); |
822 | 822 | ||
823 | int in_gate_area_no_task(unsigned long addr) | 823 | int in_gate_area_no_mm(unsigned long addr) |
824 | { | 824 | { |
825 | return 0; | 825 | return 0; |
826 | } | 826 | } |
827 | 827 | ||
828 | int in_gate_area(struct task_struct *task, unsigned long addr) | 828 | int in_gate_area(struct mm_struct *mm, unsigned long addr) |
829 | { | 829 | { |
830 | return 0; | 830 | return 0; |
831 | } | 831 | } |
832 | 832 | ||
833 | struct vm_area_struct *get_gate_vma(struct task_struct *tsk) | 833 | struct vm_area_struct *get_gate_vma(struct mm_struct *mm) |
834 | { | 834 | { |
835 | return NULL; | 835 | return NULL; |
836 | } | 836 | } |