1. 05 Jun, 2018 6 commits
    • Gautham R. Shenoy's avatar
      cpuidle: powernv: Fix promotion from snooze if next state disabled · 0a4ec6aa
      Gautham R. Shenoy authored
      The commit 78eaa10f ("cpuidle: powernv/pseries: Auto-promotion of
      snooze to deeper idle state") introduced a timeout for the snooze idle
      state so that it could be eventually be promoted to a deeper idle
      state. The snooze timeout value is static and set to the target
      residency of the next idle state, which would train the cpuidle
      governor to pick the next idle state eventually.
      
      The unfortunate side-effect of this is that if the next idle state(s)
      is disabled, the CPU will forever remain in snooze, despite the fact
      that the system is completely idle, and other deeper idle states are
      available.
      
      This patch fixes the issue by dynamically setting the snooze timeout
      to the target residency of the next enabled state on the device.
      
      Before Patch:
        POWER8 : Only nap disabled.
        $ cpupower monitor sleep 30
        sleep took 30.01297 seconds and exited with status 0
                      |Idle_Stats
        PKG |CORE|CPU | snoo | Nap  | Fast
           0|   8|   0| 96.41|  0.00|  0.00
           0|   8|   1| 96.43|  0.00|  0.00
           0|   8|   2| 96.47|  0.00|  0.00
           0|   8|   3| 96.35|  0.00|  0.00
           0|   8|   4| 96.37|  0.00|  0.00
           0|   8|   5| 96.37|  0.00|  0.00
           0|   8|   6| 96.47|  0.00|  0.00
           0|   8|   7| 96.47|  0.00|  0.00
      
        POWER9: Shallow states (stop0lite, stop1lite, stop2lite, stop0, stop1,
        stop2) disabled:
        $ cpupower monitor sleep 30
        sleep took 30.05033 seconds and exited with status 0
                      |Idle_Stats
        PKG |CORE|CPU | snoo | stop | stop | stop | stop | stop | stop | stop | stop
           0|  16|   0| 89.79|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00
           0|  16|   1| 90.12|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00
           0|  16|   2| 90.21|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00
           0|  16|   3| 90.29|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00
      
      After Patch:
        POWER8 : Only nap disabled.
        $ cpupower monitor sleep 30
        sleep took 30.01200 seconds and exited with status 0
                      |Idle_Stats
        PKG |CORE|CPU | snoo | Nap  | Fast
           0|   8|   0| 16.58|  0.00| 77.21
           0|   8|   1| 18.42|  0.00| 75.38
           0|   8|   2|  4.70|  0.00| 94.09
           0|   8|   3| 17.06|  0.00| 81.73
           0|   8|   4|  3.06|  0.00| 95.73
           0|   8|   5|  7.00|  0.00| 96.80
           0|   8|   6|  1.00|  0.00| 98.79
           0|   8|   7|  5.62|  0.00| 94.17
      
        POWER9: Shallow states (stop0lite, stop1lite, stop2lite, stop0, stop1,
        stop2) disabled:
      
        $ cpupower monitor sleep 30
        sleep took 30.02110 seconds and exited with status 0
                      |Idle_Stats
        PKG |CORE|CPU | snoo | stop | stop | stop | stop | stop | stop | stop | stop
           0|   0|   0|  0.69|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  9.39| 89.70
           0|   0|   1|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.05| 93.21
           0|   0|   2|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00| 89.93
           0|   0|   3|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|  0.00| 93.26
      
      Fixes: 78eaa10f ("cpuidle: powernv/pseries: Auto-promotion of snooze to deeper idle state")
      Cc: stable@vger.kernel.org # v4.2+
      Signed-off-by: default avatarGautham R. Shenoy <ego@linux.vnet.ibm.com>
      Reviewed-by: default avatarBalbir Singh <bsingharora@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      0a4ec6aa
    • Christophe Leroy's avatar
      powerpc: fix build failure by disabling attribute-alias warning in pci_32 · 41552037
      Christophe Leroy authored
      Commit 2479bfc9 ("powerpc: Fix build by disabling attribute-alias
      warning for SYSCALL_DEFINEx") forgot arch/powerpc/kernel/pci_32.c
      
      Latest GCC version emit the following warnings
      
      As arch/powerpc code is built with -Werror, this breaks build with
      GCC 8.1
      
      This patch inhibits this warning
      
      In file included from arch/powerpc/kernel/pci_32.c:14:
      ./include/linux/syscalls.h:233:18: error: 'sys_pciconfig_iobase' alias between functions of incompatible types 'long int(long int,  long unsigned int,  long unsigned int)' and 'long int(long int,  long int,  long int)' [-Werror=attribute-alias]
        asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
                        ^~~
      ./include/linux/syscalls.h:222:2: note: in expansion of macro '__SYSCALL_DEFINEx'
        __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
        ^~~~~~~~~~~~~~~~~
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      41552037
    • Wei Yongjun's avatar
      ocxl: Fix missing unlock on error in afu_ioctl_enable_p9_wait() · 2e5c93d6
      Wei Yongjun authored
      Add the missing unlock before return from function
      afu_ioctl_enable_p9_wait() in the error handling case.
      
      Fixes: e948e06f ("ocxl: Expose the thread_id needed for wait on POWER9")
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Reviewed-by: default avatarAlastair D'Silva <alastair@d-silva.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      2e5c93d6
    • Colin Ian King's avatar
      powerpc-opal: fix spelling mistake "Uniterrupted" -> "Uninterrupted" · b0c4acb1
      Colin Ian King authored
      Trivial fix to spelling mistake in hmi_error_types text
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Reviewed-by: default avatarStewart Smith <stewart@linux.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      b0c4acb1
    • Colin Ian King's avatar
      powerpc: fix spelling mistake: "Usupported" -> "Unsupported" · e6536a9f
      Colin Ian King authored
      Trivial fix to spelling mistake in bootx_printf message text
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      e6536a9f
    • Ram Pai's avatar
      powerpc/pkeys: Detach execute_only key on !PROT_EXEC · eabdb8ca
      Ram Pai authored
      Disassociate the exec_key from a VMA if the VMA permission is not
      PROT_EXEC anymore. Otherwise the exec_only key continues to be
      associated with the vma, causing unexpected behavior.
      
      The problem was reported on x86 by Shakeel Butt, which is also
      applicable on powerpc.
      
      Fixes: 5586cf61 ("powerpc: introduce execute-only pkey")
      Cc: stable@vger.kernel.org # v4.16+
      Reported-by: default avatarShakeel Butt <shakeelb@google.com>
      Signed-off-by: default avatarRam Pai <linuxram@us.ibm.com>
      Reviewed-by: default avatarThiago Jung Bauermann <bauerman@linux.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      eabdb8ca
  2. 04 Jun, 2018 1 commit
  3. 03 Jun, 2018 33 commits