Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull third set of powerpc updates from Benjamin Herrenschmidt:
"This is a small collection of random bug fixes and a few improvements
of Oops output which I deemed valuable enough to include as well.

The fixes are essentially recent build breakage and regressions, and a
couple of older bugs such as the DTL log duplication, the EEH issue
with PCI_COMMAND_MASTER and the problem with small contexts passed to
get/set_context with VSX enabled"

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/signals: Mark VSX not saved with small contexts
powerpc/pseries: Fix SMP=n build of rng.c
powerpc: Make cpu_to_chip_id() available when SMP=n
powerpc/vio: Fix a dma_mask issue of vio
powerpc: booke: Fix build failures
powerpc: ppc64 address space capped at 32TB, mmap randomisation disabled
powerpc: Only print PACATMSCRATCH in oops when TM is active
powerpc/pseries: Duplicate dtl entries sometimes sent to userspace
powerpc: Remove a few lines of oops output
powerpc: Print DAR and DSISR on machine check oopses
powerpc: Fix __get_user_pages_fast() irq handling
powerpc/eeh: More accurate log
powerpc/eeh: Enable PCI_COMMAND_MASTER for PCI bridges

+75 -36
+1 -1
arch/powerpc/include/asm/smp.h
··· 33 33 extern int spinning_secondaries; 34 34 35 35 extern void cpu_die(void); 36 + extern int cpu_to_chip_id(int cpu); 36 37 37 38 #ifdef CONFIG_SMP 38 39 ··· 113 112 } 114 113 115 114 extern int cpu_to_core_id(int cpu); 116 - extern int cpu_to_chip_id(int cpu); 117 115 118 116 /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers. 119 117 *
+9
arch/powerpc/kernel/eeh.c
··· 686 686 687 687 for (i = 0; i < 16; i++) 688 688 eeh_ops->read_config(dn, i * 4, 4, &edev->config_space[i]); 689 + 690 + /* 691 + * For PCI bridges including root port, we need enable bus 692 + * master explicitly. Otherwise, it can't fetch IODA table 693 + * entries correctly. So we cache the bit in advance so that 694 + * we can restore it after reset, either PHB range or PE range. 695 + */ 696 + if (edev->mode & EEH_DEV_BRIDGE) 697 + edev->config_space[1] |= PCI_COMMAND_MASTER; 689 698 } 690 699 691 700 /**
+7 -2
arch/powerpc/kernel/eeh_event.c
··· 74 74 pe = event->pe; 75 75 if (pe) { 76 76 eeh_pe_state_mark(pe, EEH_PE_RECOVERING); 77 - pr_info("EEH: Detected PCI bus error on PHB#%d-PE#%x\n", 78 - pe->phb->global_number, pe->addr); 77 + if (pe->type & EEH_PE_PHB) 78 + pr_info("EEH: Detected error on PHB#%d\n", 79 + pe->phb->global_number); 80 + else 81 + pr_info("EEH: Detected PCI bus error on " 82 + "PHB#%d-PE#%x\n", 83 + pe->phb->global_number, pe->addr); 79 84 eeh_handle_event(pe); 80 85 eeh_pe_state_clear(pe, EEH_PE_RECOVERING); 81 86 } else {
+11 -10
arch/powerpc/kernel/process.c
··· 858 858 printk("MSR: "REG" ", regs->msr); 859 859 printbits(regs->msr, msr_bits); 860 860 printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer); 861 - #ifdef CONFIG_PPC64 862 - printk("SOFTE: %ld\n", regs->softe); 863 - #endif 864 861 trap = TRAP(regs); 865 862 if ((regs->trap != 0xc00) && cpu_has_feature(CPU_FTR_CFAR)) 866 - printk("CFAR: "REG"\n", regs->orig_gpr3); 867 - if (trap == 0x300 || trap == 0x600) 863 + printk("CFAR: "REG" ", regs->orig_gpr3); 864 + if (trap == 0x200 || trap == 0x300 || trap == 0x600) 868 865 #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) 869 - printk("DEAR: "REG", ESR: "REG"\n", regs->dar, regs->dsisr); 866 + printk("DEAR: "REG" ESR: "REG" ", regs->dar, regs->dsisr); 870 867 #else 871 - printk("DAR: "REG", DSISR: %08lx\n", regs->dar, regs->dsisr); 868 + printk("DAR: "REG" DSISR: %08lx ", regs->dar, regs->dsisr); 869 + #endif 870 + #ifdef CONFIG_PPC64 871 + printk("SOFTE: %ld ", regs->softe); 872 + #endif 873 + #ifdef CONFIG_PPC_TRANSACTIONAL_MEM 874 + if (MSR_TM_ACTIVE(regs->msr)) 875 + printk("\nPACATMSCRATCH: %016llx ", get_paca()->tm_scratch); 872 876 #endif 873 877 874 878 for (i = 0; i < 32; i++) { ··· 890 886 */ 891 887 printk("NIP ["REG"] %pS\n", regs->nip, (void *)regs->nip); 892 888 printk("LR ["REG"] %pS\n", regs->link, (void *)regs->link); 893 - #endif 894 - #ifdef CONFIG_PPC_TRANSACTIONAL_MEM 895 - printk("PACATMSCRATCH [%llx]\n", get_paca()->tm_scratch); 896 889 #endif 897 890 show_stack(current, (unsigned long *) regs->gpr[1]); 898 891 if (!user_mode(regs))
+20
arch/powerpc/kernel/prom.c
··· 777 777 return -1; 778 778 } 779 779 780 + /** 781 + * cpu_to_chip_id - Return the cpus chip-id 782 + * @cpu: The logical cpu number. 783 + * 784 + * Return the value of the ibm,chip-id property corresponding to the given 785 + * logical cpu number. If the chip-id can not be found, returns -1. 786 + */ 787 + int cpu_to_chip_id(int cpu) 788 + { 789 + struct device_node *np; 790 + 791 + np = of_get_cpu_node(cpu, NULL); 792 + if (!np) 793 + return -1; 794 + 795 + of_node_put(np); 796 + return of_get_ibm_chip_id(np); 797 + } 798 + EXPORT_SYMBOL(cpu_to_chip_id); 799 + 780 800 #ifdef CONFIG_PPC_PSERIES 781 801 /* 782 802 * Fix up the uninitialized fields in a new device node:
+9 -1
arch/powerpc/kernel/signal_32.c
··· 457 457 if (copy_vsx_to_user(&frame->mc_vsregs, current)) 458 458 return 1; 459 459 msr |= MSR_VSX; 460 - } 460 + } else if (!ctx_has_vsx_region) 461 + /* 462 + * With a small context structure we can't hold the VSX 463 + * registers, hence clear the MSR value to indicate the state 464 + * was not saved. 465 + */ 466 + msr &= ~MSR_VSX; 467 + 468 + 461 469 #endif /* CONFIG_VSX */ 462 470 #ifdef CONFIG_SPE 463 471 /* save spe registers */
-16
arch/powerpc/kernel/smp.c
··· 597 597 return id; 598 598 } 599 599 600 - /* Return the value of the chip-id property corresponding 601 - * to the given logical cpu. 602 - */ 603 - int cpu_to_chip_id(int cpu) 604 - { 605 - struct device_node *np; 606 - 607 - np = of_get_cpu_node(cpu, NULL); 608 - if (!np) 609 - return -1; 610 - 611 - of_node_put(np); 612 - return of_get_ibm_chip_id(np); 613 - } 614 - EXPORT_SYMBOL(cpu_to_chip_id); 615 - 616 600 /* Helper routines for cpu to core mapping */ 617 601 int cpu_core_index_of_thread(int cpu) 618 602 {
+2 -2
arch/powerpc/kernel/time.c
··· 213 213 if (i == be64_to_cpu(vpa->dtl_idx)) 214 214 return 0; 215 215 while (i < be64_to_cpu(vpa->dtl_idx)) { 216 - if (dtl_consumer) 217 - dtl_consumer(dtl, i); 218 216 dtb = be64_to_cpu(dtl->timebase); 219 217 tb_delta = be32_to_cpu(dtl->enqueue_to_dispatch_time) + 220 218 be32_to_cpu(dtl->ready_to_enqueue_time); ··· 225 227 } 226 228 if (dtb > stop_tb) 227 229 break; 230 + if (dtl_consumer) 231 + dtl_consumer(dtl, i); 228 232 stolen += tb_delta; 229 233 ++i; 230 234 ++dtl;
+1 -1
arch/powerpc/kernel/vio.c
··· 1419 1419 1420 1420 /* needed to ensure proper operation of coherent allocations 1421 1421 * later, in case driver doesn't set it explicitly */ 1422 - dma_set_mask_and_coherent(&viodev->dev, DMA_BIT_MASK(64)); 1422 + dma_coerce_mask_and_coherent(&viodev->dev, DMA_BIT_MASK(64)); 1423 1423 } 1424 1424 1425 1425 /* register with generic device framework */
+3 -2
arch/powerpc/mm/gup.c
··· 123 123 struct mm_struct *mm = current->mm; 124 124 unsigned long addr, len, end; 125 125 unsigned long next; 126 + unsigned long flags; 126 127 pgd_t *pgdp; 127 128 int nr = 0; 128 129 ··· 157 156 * So long as we atomically load page table pointers versus teardown, 158 157 * we can follow the address down to the the page and take a ref on it. 159 158 */ 160 - local_irq_disable(); 159 + local_irq_save(flags); 161 160 162 161 pgdp = pgd_offset(mm, addr); 163 162 do { ··· 180 179 break; 181 180 } while (pgdp++, addr = next, addr != end); 182 181 183 - local_irq_enable(); 182 + local_irq_restore(flags); 184 183 185 184 return nr; 186 185 }
+1 -1
arch/powerpc/mm/slice.c
··· 258 258 slice = GET_HIGH_SLICE_INDEX(addr); 259 259 *boundary_addr = (slice + end) ? 260 260 ((slice + end) << SLICE_HIGH_SHIFT) : SLICE_LOW_TOP; 261 - return !!(available.high_slices & (1u << slice)); 261 + return !!(available.high_slices & (1ul << slice)); 262 262 } 263 263 } 264 264
+1
arch/powerpc/platforms/powernv/rng.c
··· 19 19 #include <asm/io.h> 20 20 #include <asm/prom.h> 21 21 #include <asm/machdep.h> 22 + #include <asm/smp.h> 22 23 23 24 24 25 struct powernv_rng {
+1
arch/powerpc/platforms/pseries/rng.c
··· 13 13 #include <linux/of.h> 14 14 #include <asm/archrandom.h> 15 15 #include <asm/machdep.h> 16 + #include <asm/plpar_wrappers.h> 16 17 17 18 18 19 static int pseries_get_random_long(unsigned long *v)
+1
arch/powerpc/platforms/wsp/chroma.c
··· 15 15 #include <linux/of.h> 16 16 #include <linux/smp.h> 17 17 #include <linux/time.h> 18 + #include <linux/of_fdt.h> 18 19 19 20 #include <asm/machdep.h> 20 21 #include <asm/udbg.h>
+1
arch/powerpc/platforms/wsp/h8.c
··· 10 10 #include <linux/kernel.h> 11 11 #include <linux/of.h> 12 12 #include <linux/io.h> 13 + #include <linux/of_address.h> 13 14 14 15 #include "wsp.h" 15 16
+2
arch/powerpc/platforms/wsp/ics.c
··· 18 18 #include <linux/smp.h> 19 19 #include <linux/spinlock.h> 20 20 #include <linux/types.h> 21 + #include <linux/of_address.h> 22 + #include <linux/of_irq.h> 21 23 22 24 #include <asm/io.h> 23 25 #include <asm/irq.h>
+2
arch/powerpc/platforms/wsp/opb_pic.c
··· 15 15 #include <linux/of.h> 16 16 #include <linux/slab.h> 17 17 #include <linux/time.h> 18 + #include <linux/of_address.h> 19 + #include <linux/of_irq.h> 18 20 19 21 #include <asm/reg_a2.h> 20 22 #include <asm/irq.h>
+1
arch/powerpc/platforms/wsp/psr2.c
··· 15 15 #include <linux/of.h> 16 16 #include <linux/smp.h> 17 17 #include <linux/time.h> 18 + #include <linux/of_fdt.h> 18 19 19 20 #include <asm/machdep.h> 20 21 #include <asm/udbg.h>
+1
arch/powerpc/platforms/wsp/scom_wsp.c
··· 14 14 #include <linux/of.h> 15 15 #include <linux/spinlock.h> 16 16 #include <linux/types.h> 17 + #include <linux/of_address.h> 17 18 18 19 #include <asm/cputhreads.h> 19 20 #include <asm/reg_a2.h>
+1
arch/powerpc/platforms/wsp/wsp.c
··· 13 13 #include <linux/smp.h> 14 14 #include <linux/delay.h> 15 15 #include <linux/time.h> 16 + #include <linux/of_address.h> 16 17 17 18 #include <asm/scom.h> 18 19