1. 20 8月, 2018 3 次提交
  2. 14 8月, 2018 1 次提交
  3. 13 8月, 2018 4 次提交
  4. 10 8月, 2018 23 次提交
    • M
      powerpc/uaccess: Enable get_user(u64, *p) on 32-bit · f7a6947c
      Michael Ellerman 提交于
      Currently if you build a 32-bit powerpc kernel and use get_user() to
      load a u64 value it will fail to build with eg:
      
        kernel/rseq.o: In function `rseq_get_rseq_cs':
        kernel/rseq.c:123: undefined reference to `__get_user_bad'
      
      This is hitting the check in __get_user_size() that makes sure the
      size we're copying doesn't exceed the size of the destination:
      
        #define __get_user_size(x, ptr, size, retval)
        do {
        	retval = 0;
        	__chk_user_ptr(ptr);
        	if (size > sizeof(x))
        		(x) = __get_user_bad();
      
      Which doesn't immediately make sense because the size of the
      destination is u64, but it's not really, because __get_user_check()
      etc. internally create an unsigned long and copy into that:
      
        #define __get_user_check(x, ptr, size)
        ({
        	long __gu_err = -EFAULT;
        	unsigned long  __gu_val = 0;
      
      The problem being that on 32-bit unsigned long is not big enough to
      hold a u64. We can fix this with a trick from hpa in the x86 code, we
      statically check the type of x and set the type of __gu_val to either
      unsigned long or unsigned long long.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f7a6947c
    • A
      powerpc/mm/hash: Remove unnecessary do { } while(0) loop · f405b510
      Aneesh Kumar K.V 提交于
      Avoid coverity false warnings like:
      
        *** CID 187347:  Control flow issues  (UNREACHABLE)
        /arch/powerpc/mm/hash_native_64.c: 819 in native_flush_hash_range()
        813        slot += hidx & _PTEIDX_GROUP_IX;
        814        hptep = htab_address + slot;
        815        want_v = hpte_encode_avpn(vpn, psize, ssize);
        816        hpte_v = hpte_get_old_v(hptep);
        817
        818        if (!HPTE_V_COMPARE(hpte_v, want_v) || !(hpte_v & HPTE_V_VALID))
        >>>     CID 187347:  Control flow issues  (UNREACHABLE)
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f405b510
    • N
      powerpc/64s: move machine check SLB flushing to mm/slb.c · e7e81847
      Nicholas Piggin 提交于
      The machine check code that flushes and restores bolted segments in
      real mode belongs in mm/slb.c. This will also be used by pseries
      machine check and idle code in future changes.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      e7e81847
    • A
      powerpc/powernv/idle: Fix build error · ae24ce5e
      Aneesh Kumar K.V 提交于
      Fix the below build error using strlcpy instead of strncpy
      
      In function 'pnv_parse_cpuidle_dt',
          inlined from 'pnv_init_idle_states' at arch/powerpc/platforms/powernv/idle.c:840:7,
          inlined from '__machine_initcall_powernv_pnv_init_idle_states' at arch/powerpc/platforms/powernv/idle.c:870:1:
      arch/powerpc/platforms/powernv/idle.c:820:3: error: 'strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation]
         strncpy(pnv_idle_states[i].name, temp_string[i],
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          PNV_IDLE_NAME_LEN);
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      ae24ce5e
    • A
      powerpc/mm/tlbflush: update the mmu_gather page size while iterating address range · 0b6aa1a2
      Aneesh Kumar K.V 提交于
      This patch makes sure we update the mmu_gather page size even if we are
      requesting for a fullmm flush. This avoids triggering VM_WARN_ON in code
      paths like __tlb_remove_page_size that explicitly check for removing range page
      size to be same as mmu gather page size.
      
      Fixes: 5a609934 ("powerpc/64s/radix: tlb do not flush on page size when fullmm")
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
      Acked-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      0b6aa1a2
    • M
      powerpc/mm: remove warning about ‘type’ being set · fce278af
      Mathieu Malaterre 提交于
      ‘type’ is only used when CONFIG_DEBUG_HIGHMEM is set. So add a possibly
      unused tag to variable. Remove warning treated as error with W=1:
      
        arch/powerpc/mm/highmem.c:59:6: error: variable ‘type’ set but not used [-Werror=unused-but-set-variable]
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      fce278af
    • M
      powerpc/32: Include setup.h header file to fix warnings · f2c6d0d1
      Mathieu Malaterre 提交于
      Make sure to include setup.h to provide the following prototypes:
      
        - irqstack_early_init
        - setup_power_save
        - initialize_cache_info
      
      Fix the following warnings (treated as error in W=1):
      
        arch/powerpc/kernel/setup_32.c:198:13: error: no previous prototype for ‘irqstack_early_init’
        arch/powerpc/kernel/setup_32.c:238:13: error: no previous prototype for ‘setup_power_save’
        arch/powerpc/kernel/setup_32.c:253:13: error: no previous prototype for ‘initialize_cache_info’
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f2c6d0d1
    • M
      powerpc: Move `path` variable inside DEBUG_PROM · eab00a20
      Mathieu Malaterre 提交于
      Add gcc attribute unused for two variables. Fix warnings treated as errors
      with W=1:
      
        arch/powerpc/kernel/prom_init.c:1388:8: error: variable ‘path’ set but not used [-Werror=unused-but-set-variable]
      Suggested-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      eab00a20
    • M
      powerpc/powermac: Make some functions static · 618a89d7
      Mathieu Malaterre 提交于
      These functions can all be static, make it so. Fix warnings treated as
      errors with W=1:
      
        arch/powerpc/platforms/powermac/pci.c:1022:6: error: no previous prototype for ‘pmac_pci_fixup_ohci’
        arch/powerpc/platforms/powermac/pci.c:1057:6: error: no previous prototype for ‘pmac_pci_fixup_cardbus’
        arch/powerpc/platforms/powermac/pci.c:1094:6: error: no previous prototype for ‘pmac_pci_fixup_pciata’
      
      Remove has_address declaration and assignment since it's not used.
      Also add gcc attribute unused to fix a warning treated as error with
      W=1:
      
        arch/powerpc/platforms/powermac/pci.c:784:19: error: variable ‘has_address’ set but not used
        arch/powerpc/platforms/powermac/pci.c:907:22: error: variable ‘ht’ set but not used
      Suggested-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      618a89d7
    • M
      powerpc/powermac: Remove variable x that's never read · 8921305c
      Mathieu Malaterre 提交于
      Since the value of x is never intended to be read, remove it. Fix
      warning treated as error with W=1:
      
        arch/powerpc/platforms/powermac/udbg_scc.c:76:9: error: variable ‘x’ set but not used
      Suggested-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Reviewed-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      8921305c
    • M
      cxl: remove a dead branch · e4ecafb1
      Mathieu Malaterre 提交于
      In commit 14baf4d9 ("cxl: Add guest-specific code") the following code
      was added:
      
      	if (afu->crs_len < 0) {
      		dev_err(&afu->dev, "Unexpected configuration record size value\n");
      		return -EINVAL;
      	}
      
      However the variable `crs_len` is of type u64 and cannot be compared < 0.
      Remove the dead code section. Fix the following warning treated as error
      with W=1:
      
      ../drivers/misc/cxl/guest.c:919:19: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      e4ecafb1
    • M
      powerpc/powermac: Add missing include of header pmac.h · 2fff0f07
      Mathieu Malaterre 提交于
      The header `pmac.h` was not included, leading to the following warnings,
      treated as error with W=1:
      
        arch/powerpc/platforms/powermac/time.c:69:13: error: no previous prototype for ‘pmac_time_init’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/powermac/time.c:207:15: error: no previous prototype for ‘pmac_get_boot_time’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/powermac/time.c:222:6: error: no previous prototype for ‘pmac_get_rtc_time’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/powermac/time.c:240:5: error: no previous prototype for ‘pmac_set_rtc_time’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/powermac/time.c:259:12: error: no previous prototype for ‘via_calibrate_decr’ [-Werror=missing-prototypes]
        arch/powerpc/platforms/powermac/time.c:311:13: error: no previous prototype for ‘pmac_calibrate_decr’ [-Werror=missing-prototypes]
      
      The function `via_calibrate_decr` was made static to silence a warning.
      Signed-off-by: NMathieu Malaterre <malat@debian.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      2fff0f07
    • M
      powerpc/kexec: Use common error handling code in setup_new_fdt() · baedcdf5
      Markus Elfring 提交于
      Add a jump target so that a bit of exception handling can be better
      reused at the end of this function.
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Reviewed-by: NThiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      baedcdf5
    • B
      powerpc/xmon: Add address lookup for percpu symbols · 302c7b0c
      Boqun Feng 提交于
      Currently, in xmon, there is no obvious way to get an address for a
      percpu symbol for a particular cpu. Having such an ability would be
      good for debugging the system when percpu variables got involved.
      
      Therefore, this patch introduces a new xmon command "lp" to lookup the
      address for percpu symbols. Usage of "lp" is similar to "ls", except
      that we could add a cpu number to choose the variable of which cpu we
      want to lookup. If no cpu number is given, lookup for current cpu.
      Signed-off-by: NBoqun Feng <boqun.feng@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      302c7b0c
    • C
      powerpc/mm: remove huge_pte_offset_and_shift() prototype · 646dbe40
      Christophe Leroy 提交于
      huge_pte_offset_and_shift() has never existed
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      646dbe40
    • C
      powerpc/lib: Use patch_site to patch copy_32 functions once cache is enabled · fa54a981
      Christophe Leroy 提交于
      The symbol memcpy_nocache_branch defined in order to allow patching
      of memset function once cache is enabled leads to confusing reports
      by perf tool.
      
      Using the new patch_site functionality solves this issue.
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      fa54a981
    • M
      powerpc/pseries: Fix endianness while restoring of r3 in MCE handler. · cd813e1c
      Mahesh Salgaonkar 提交于
      During Machine Check interrupt on pseries platform, register r3 points
      RTAS extended event log passed by hypervisor. Since hypervisor uses r3
      to pass pointer to rtas log, it stores the original r3 value at the
      start of the memory (first 8 bytes) pointed by r3. Since hypervisor
      stores this info and rtas log is in BE format, linux should make
      sure to restore r3 value in correct endian format.
      
      Without this patch when MCE handler, after recovery, returns to code that
      that caused the MCE may end up with Data SLB access interrupt for invalid
      address followed by kernel panic or hang.
      
        Severe Machine check interrupt [Recovered]
          NIP [d00000000ca301b8]: init_module+0x1b8/0x338 [bork_kernel]
          Initiator: CPU
          Error type: SLB [Multihit]
            Effective address: d00000000ca70000
        cpu 0xa: Vector: 380 (Data SLB Access) at [c0000000fc7775b0]
            pc: c0000000009694c0: vsnprintf+0x80/0x480
            lr: c0000000009698e0: vscnprintf+0x20/0x60
            sp: c0000000fc777830
           msr: 8000000002009033
           dar: a803a30c000000d0
          current = 0xc00000000bc9ef00
          paca    = 0xc00000001eca5c00	 softe: 3	 irq_happened: 0x01
            pid   = 8860, comm = insmod
        vscnprintf+0x20/0x60
        vprintk_emit+0xb4/0x4b0
        vprintk_func+0x5c/0xd0
        printk+0x38/0x4c
        init_module+0x1c0/0x338 [bork_kernel]
        do_one_initcall+0x54/0x230
        do_init_module+0x8c/0x248
        load_module+0x12b8/0x15b0
        sys_finit_module+0xa8/0x110
        system_call+0x58/0x6c
        --- Exception: c00 (System Call) at 00007fff8bda0644
        SP (7fffdfbfe980) is in userspace
      
      This patch fixes this issue.
      
      Fixes: a08a53ea ("powerpc/le: Enable RTAS events support")
      Cc: stable@vger.kernel.org # v3.15+
      Reviewed-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      cd813e1c
    • H
      powerpc/fadump: merge adjacent memory ranges to reduce PT_LOAD segements · ced1bf52
      Hari Bathini 提交于
      With dynamic memory allocation support for crash memory ranges array,
      there is no hard limit on the no. of crash memory ranges kernel could
      export, but program headers count could overflow in the /proc/vmcore
      ELF file while exporting each memory range as PT_LOAD segment. Reduce
      the likelihood of a such scenario, by folding adjacent crash memory
      ranges which minimizes the total number of PT_LOAD segments.
      Signed-off-by: NHari Bathini <hbathini@linux.ibm.com>
      Reviewed-by: NMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      ced1bf52
    • H
      powerpc/fadump: handle crash memory ranges array index overflow · 1bd6a1c4
      Hari Bathini 提交于
      Crash memory ranges is an array of memory ranges of the crashing kernel
      to be exported as a dump via /proc/vmcore file. The size of the array
      is set based on INIT_MEMBLOCK_REGIONS, which works alright in most cases
      where memblock memory regions count is less than INIT_MEMBLOCK_REGIONS
      value. But this count can grow beyond INIT_MEMBLOCK_REGIONS value since
      commit 142b45a7 ("memblock: Add array resizing support").
      
      On large memory systems with a few DLPAR operations, the memblock memory
      regions count could be larger than INIT_MEMBLOCK_REGIONS value. On such
      systems, registering fadump results in crash or other system failures
      like below:
      
        task: c00007f39a290010 ti: c00000000b738000 task.ti: c00000000b738000
        NIP: c000000000047df4 LR: c0000000000f9e58 CTR: c00000000010f180
        REGS: c00000000b73b570 TRAP: 0300   Tainted: G          L   X  (4.4.140+)
        MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE>  CR: 22004484  XER: 20000000
        CFAR: c000000000008500 DAR: 000007a450000000 DSISR: 40000000 SOFTE: 0
        ...
        NIP [c000000000047df4] smp_send_reschedule+0x24/0x80
        LR [c0000000000f9e58] resched_curr+0x138/0x160
        Call Trace:
          resched_curr+0x138/0x160 (unreliable)
          check_preempt_curr+0xc8/0xf0
          ttwu_do_wakeup+0x38/0x150
          try_to_wake_up+0x224/0x4d0
          __wake_up_common+0x94/0x100
          ep_poll_callback+0xac/0x1c0
          __wake_up_common+0x94/0x100
          __wake_up_sync_key+0x70/0xa0
          sock_def_readable+0x58/0xa0
          unix_stream_sendmsg+0x2dc/0x4c0
          sock_sendmsg+0x68/0xa0
          ___sys_sendmsg+0x2cc/0x2e0
          __sys_sendmsg+0x5c/0xc0
          SyS_socketcall+0x36c/0x3f0
          system_call+0x3c/0x100
      
      as array index overflow is not checked for while setting up crash memory
      ranges causing memory corruption. To resolve this issue, dynamically
      allocate memory for crash memory ranges and resize it incrementally,
      in units of pagesize, on hitting array size limit.
      
      Fixes: 2df173d9 ("fadump: Initialize elfcore header and add PT_LOAD program headers.")
      Cc: stable@vger.kernel.org # v3.4+
      Signed-off-by: NHari Bathini <hbathini@linux.ibm.com>
      Reviewed-by: NMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
      [mpe: Just use PAGE_SIZE directly, fixup variable placement]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      1bd6a1c4
    • C
      powerpc/cpm1: fix compilation error with CONFIG_PPC_EARLY_DEBUG_CPM · 6bd6d867
      Christophe Leroy 提交于
      commit e8cb7a55 ("powerpc: remove superflous inclusions of
      asm/fixmap.h") removed inclusion of asm/fixmap.h from files not
      including objects from that file.
      
      However, asm/mmu-8xx.h includes  call to __fix_to_virt(). The proper
      way would be to include asm/fixmap.h in asm/mmu-8xx.h but it creates
      an inclusion loop.
      
      So we have to leave asm/fixmap.h in sysdep/cpm_common.c for
      CONFIG_PPC_EARLY_DEBUG_CPM
      
        CC      arch/powerpc/sysdev/cpm_common.o
      In file included from ./arch/powerpc/include/asm/mmu.h:340:0,
                       from ./arch/powerpc/include/asm/reg_8xx.h:8,
                       from ./arch/powerpc/include/asm/reg.h:29,
                       from ./arch/powerpc/include/asm/processor.h:13,
                       from ./arch/powerpc/include/asm/thread_info.h:28,
                       from ./include/linux/thread_info.h:38,
                       from ./arch/powerpc/include/asm/ptrace.h:159,
                       from ./arch/powerpc/include/asm/hw_irq.h:12,
                       from ./arch/powerpc/include/asm/irqflags.h:12,
                       from ./include/linux/irqflags.h:16,
                       from ./include/asm-generic/cmpxchg-local.h:6,
                       from ./arch/powerpc/include/asm/cmpxchg.h:537,
                       from ./arch/powerpc/include/asm/atomic.h:11,
                       from ./include/linux/atomic.h:5,
                       from ./include/linux/mutex.h:18,
                       from ./include/linux/kernfs.h:13,
                       from ./include/linux/sysfs.h:16,
                       from ./include/linux/kobject.h:20,
                       from ./include/linux/device.h:16,
                       from ./include/linux/node.h:18,
                       from ./include/linux/cpu.h:17,
                       from ./include/linux/of_device.h:5,
                       from arch/powerpc/sysdev/cpm_common.c:21:
      arch/powerpc/sysdev/cpm_common.c: In function ‘udbg_init_cpm’:
      ./arch/powerpc/include/asm/mmu-8xx.h:218:25: error: implicit declaration of function ‘__fix_to_virt’ [-Werror=implicit-function-declaration]
       #define VIRT_IMMR_BASE (__fix_to_virt(FIX_IMMR_BASE))
                               ^
      arch/powerpc/sysdev/cpm_common.c:75:7: note: in expansion of macro ‘VIRT_IMMR_BASE’
             VIRT_IMMR_BASE);
             ^
      ./arch/powerpc/include/asm/mmu-8xx.h:218:39: error: ‘FIX_IMMR_BASE’ undeclared (first use in this function)
       #define VIRT_IMMR_BASE (__fix_to_virt(FIX_IMMR_BASE))
                                             ^
      arch/powerpc/sysdev/cpm_common.c:75:7: note: in expansion of macro ‘VIRT_IMMR_BASE’
             VIRT_IMMR_BASE);
             ^
      ./arch/powerpc/include/asm/mmu-8xx.h:218:39: note: each undeclared identifier is reported only once for each function it appears in
       #define VIRT_IMMR_BASE (__fix_to_virt(FIX_IMMR_BASE))
                                             ^
      arch/powerpc/sysdev/cpm_common.c:75:7: note: in expansion of macro ‘VIRT_IMMR_BASE’
             VIRT_IMMR_BASE);
             ^
      cc1: all warnings being treated as errors
      make[1]: *** [arch/powerpc/sysdev/cpm_common.o] Error 1
      
      Fixes: e8cb7a55 ("powerpc: remove superflous inclusions of asm/fixmap.h")
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      6bd6d867
    • D
      powerpc: Fix size calculation using resource_size() · c42d3be0
      Dan Carpenter 提交于
      The problem is the the calculation should be "end - start + 1" but the
      plus one is missing in this calculation.
      
      Fixes: 8626816e ("powerpc: add support for MPIC message register API")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NTyrel Datwyler <tyreld@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c42d3be0
    • R
      24576a70
    • R
      powerpc/powernv: Allow memory that has been hot-removed to be hot-added · d3da701d
      Rashmica Gupta 提交于
      This patch allows the memory removed by memtrace to be readded to the
      kernel. So now you don't have to reboot your system to add the memory
      back to the kernel or to have a different amount of memory removed.
      Signed-off-by: NRashmica Gupta <rashmica.g@gmail.com>
      Tested-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      d3da701d
  5. 09 8月, 2018 4 次提交
    • C
      powerpc/dts/fsl: t2080rdb: use the Cortina PHY driver compatible · bd964612
      Camelia Groza 提交于
      The Cortina PHY is not compatible with IEEE 802.3 clause 45.
      Signed-off-by: NCamelia Groza <camelia.groza@nxp.com>
      [scottwood: made commit message about compatibility, not driver choice]
      Signed-off-by: NScott Wood <oss@buserror.net>
      bd964612
    • C
      powerpc/dts/fsl: t4240rdb: use the Cortina PHY driver compatible · 39e560a9
      Camelia Groza 提交于
      The Cortina PHY is not compatible with IEEE 802.3 clause 45.
      Signed-off-by: NCamelia Groza <camelia.groza@nxp.com>
      [scottwood: made commit message about compatibility, not driver choice]
      Signed-off-by: NScott Wood <oss@buserror.net>
      39e560a9
    • C
      powerpc/configs/dpaa: enable the Cortina PHY driver · 24f36ce6
      Camelia Groza 提交于
      Cortina PHYs are present on T4240RDB and T2080RDB. Enable the driver
      by default.
      Signed-off-by: NCamelia Groza <camelia.groza@nxp.com>
      Signed-off-by: NScott Wood <oss@buserror.net>
      24f36ce6
    • C
      powerpc/cpm1: fix compilation error with CONFIG_PPC_EARLY_DEBUG_CPM · 2a39926c
      Christophe Leroy 提交于
      commit e8cb7a55 ("powerpc: remove superflous inclusions of
      asm/fixmap.h") removed inclusion of asm/fixmap.h from files not
      including objects from that file.
      
      However, asm/mmu-8xx.h includes  call to __fix_to_virt(). The proper
      way would be to include asm/fixmap.h in asm/mmu-8xx.h but it creates
      an inclusion loop.
      
      So we have to leave asm/fixmap.h in sysdep/cpm_common.c for
      CONFIG_PPC_EARLY_DEBUG_CPM
      
        CC      arch/powerpc/sysdev/cpm_common.o
      In file included from ./arch/powerpc/include/asm/mmu.h:340:0,
                       from ./arch/powerpc/include/asm/reg_8xx.h:8,
                       from ./arch/powerpc/include/asm/reg.h:29,
                       from ./arch/powerpc/include/asm/processor.h:13,
                       from ./arch/powerpc/include/asm/thread_info.h:28,
                       from ./include/linux/thread_info.h:38,
                       from ./arch/powerpc/include/asm/ptrace.h:159,
                       from ./arch/powerpc/include/asm/hw_irq.h:12,
                       from ./arch/powerpc/include/asm/irqflags.h:12,
                       from ./include/linux/irqflags.h:16,
                       from ./include/asm-generic/cmpxchg-local.h:6,
                       from ./arch/powerpc/include/asm/cmpxchg.h:537,
                       from ./arch/powerpc/include/asm/atomic.h:11,
                       from ./include/linux/atomic.h:5,
                       from ./include/linux/mutex.h:18,
                       from ./include/linux/kernfs.h:13,
                       from ./include/linux/sysfs.h:16,
                       from ./include/linux/kobject.h:20,
                       from ./include/linux/device.h:16,
                       from ./include/linux/node.h:18,
                       from ./include/linux/cpu.h:17,
                       from ./include/linux/of_device.h:5,
                       from arch/powerpc/sysdev/cpm_common.c:21:
      arch/powerpc/sysdev/cpm_common.c: In function ‘udbg_init_cpm’:
      ./arch/powerpc/include/asm/mmu-8xx.h:218:25: error: implicit declaration of function ‘__fix_to_virt’ [-Werror=implicit-function-declaration]
       #define VIRT_IMMR_BASE (__fix_to_virt(FIX_IMMR_BASE))
                               ^
      arch/powerpc/sysdev/cpm_common.c:75:7: note: in expansion of macro ‘VIRT_IMMR_BASE’
             VIRT_IMMR_BASE);
             ^
      ./arch/powerpc/include/asm/mmu-8xx.h:218:39: error: ‘FIX_IMMR_BASE’ undeclared (first use in this function)
       #define VIRT_IMMR_BASE (__fix_to_virt(FIX_IMMR_BASE))
                                             ^
      arch/powerpc/sysdev/cpm_common.c:75:7: note: in expansion of macro ‘VIRT_IMMR_BASE’
             VIRT_IMMR_BASE);
             ^
      ./arch/powerpc/include/asm/mmu-8xx.h:218:39: note: each undeclared identifier is reported only once for each function it appears in
       #define VIRT_IMMR_BASE (__fix_to_virt(FIX_IMMR_BASE))
                                             ^
      arch/powerpc/sysdev/cpm_common.c:75:7: note: in expansion of macro ‘VIRT_IMMR_BASE’
             VIRT_IMMR_BASE);
             ^
      cc1: all warnings being treated as errors
      make[1]: *** [arch/powerpc/sysdev/cpm_common.o] Error 1
      
      Fixes: e8cb7a55 ("powerpc: remove superflous inclusions of asm/fixmap.h")
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NScott Wood <oss@buserror.net>
      2a39926c
  6. 08 8月, 2018 1 次提交
    • B
      selftests/powerpc: Kill child processes on SIGINT · 7c27a26e
      Breno Leitao 提交于
      There are some powerpc selftests, as tm/tm-unavailable, that run for a long
      period (>120 seconds), and if it is interrupted, as pressing CRTL-C
      (SIGINT), the foreground process (harness) dies but the child process and
      threads continue to execute (with PPID = 1 now) in background.
      
      In this case, you'd think the whole test exited, but there are remaining
      threads and processes being executed in background. Sometimes these
      zombies processes are doing annoying things, as consuming the whole CPU or
      dumping things to STDOUT.
      
      This patch fixes this problem by attaching an empty signal handler to
      SIGINT in the harness process. This handler will interrupt (EINTR) the
      parent process waitpid() call, letting the code to follow through the
      normal flow, which will kill all the processes in the child process group.
      
      This patch also fixes a typo.
      Signed-off-by: NBreno Leitao <leitao@debian.org>
      Signed-off-by: NGustavo Romero <gromero@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      7c27a26e
  7. 07 8月, 2018 4 次提交