1. 19 8月, 2017 2 次提交
  2. 18 8月, 2017 2 次提交
    • T
      kernel/watchdog: Prevent false positives with turbo modes · 7edaeb68
      Thomas Gleixner 提交于
      The hardlockup detector on x86 uses a performance counter based on unhalted
      CPU cycles and a periodic hrtimer. The hrtimer period is about 2/5 of the
      performance counter period, so the hrtimer should fire 2-3 times before the
      performance counter NMI fires. The NMI code checks whether the hrtimer
      fired since the last invocation. If not, it assumess a hard lockup.
      
      The calculation of those periods is based on the nominal CPU
      frequency. Turbo modes increase the CPU clock frequency and therefore
      shorten the period of the perf/NMI watchdog. With extreme Turbo-modes (3x
      nominal frequency) the perf/NMI period is shorter than the hrtimer period
      which leads to false positives.
      
      A simple fix would be to shorten the hrtimer period, but that comes with
      the side effect of more frequent hrtimer and softlockup thread wakeups,
      which is not desired.
      
      Implement a low pass filter, which checks the perf/NMI period against
      kernel time. If the perf/NMI fires before 4/5 of the watchdog period has
      elapsed then the event is ignored and postponed to the next perf/NMI.
      
      That solves the problem and avoids the overhead of shorter hrtimer periods
      and more frequent softlockup thread wakeups.
      
      Fixes: 58687acb ("lockup_detector: Combine nmi_watchdog and softlockup detector")
      Reported-and-tested-by: NKan Liang <Kan.liang@intel.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: dzickus@redhat.com
      Cc: prarit@redhat.com
      Cc: ak@linux.intel.com
      Cc: babu.moger@oracle.com
      Cc: peterz@infradead.org
      Cc: eranian@google.com
      Cc: acme@redhat.com
      Cc: stable@vger.kernel.org
      Cc: atomlin@redhat.com
      Cc: akpm@linux-foundation.org
      Cc: torvalds@linux-foundation.org
      Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1708150931310.1886@nanos
      7edaeb68
    • G
      ARM: dts: imx6qdl-nitrogen6_som2: fix PCIe reset · c40bc54f
      Gary Bisson 提交于
      Previous value was a bad copy of nitrogen6_max device tree.
      Signed-off-by: NGary Bisson <gary.bisson@boundarydevices.com>
      Fixes: 3faa1bb2 ("ARM: dts: imx: add Boundary Devices Nitrogen6_SOM2 support")
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NShawn Guo <shawnguo@kernel.org>
      c40bc54f
  3. 16 8月, 2017 1 次提交
  4. 14 8月, 2017 1 次提交
  5. 11 8月, 2017 6 次提交
  6. 10 8月, 2017 3 次提交
  7. 09 8月, 2017 8 次提交
  8. 08 8月, 2017 5 次提交
    • P
      MIPS: Set ISA bit in entry-y for microMIPS kernels · 5fc9484f
      Paul Burton 提交于
      When building a kernel for the microMIPS ISA, ensure that the ISA bit
      (ie. bit 0) in the entry address is set. Otherwise we may include an
      entry address in images which bootloaders will jump to as MIPS32 code.
      
      I originally tried using "objdump -f" to obtain the entry address, which
      works for microMIPS but it always outputs a 32 bit address for a 32 bit
      ELF whilst nm will sign extend to 64 bit. That matters for systems where
      we might want to run a MIPS32 kernel on a MIPS64 CPU & load it with a
      MIPS64 bootloader, which would then jump to a non-canonical
      (non-sign-extended) address.
      
      This works in all cases as it only changes the behaviour for microMIPS
      kernels, but isn't the prettiest solution. A possible alternative would
      be to write a custom tool to just extract, sign extend & print the entry
      point of an ELF executable. I'm open to feedback if that would be
      preferred.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/16950/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      5fc9484f
    • P
      MIPS: Prevent building MT support for microMIPS kernels · 527f1028
      Paul Burton 提交于
      We don't currently support the MT ASE for microMIPS kernels, and there
      are no CPUs currently in existence that use both. They can however both
      be enabled in Kconfig, resulting in build failures such as:
      
        AS      arch/mips/kernel/cps-vec.o
      arch/mips/kernel/cps-vec.S: Assembler messages:
      arch/mips/kernel/cps-vec.S:242: Warning: the 32-bit microMIPS architecture does not support the `mt' extension
      arch/mips/kernel/cps-vec.S:276: Error: unrecognized opcode `mttc0 $13,$2,2'
      arch/mips/kernel/cps-vec.S:282: Error: unrecognized opcode `mttc0 $8,$1,2'
      arch/mips/kernel/cps-vec.S:285: Error: unrecognized opcode `mttc0 $0,$2,1'
      ...
      
      Fix this by preventing MT from being enabled when targeting microMIPS.
      Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/16951/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      527f1028
    • G
      powerpc/powernv/idle: Disable LOSE_FULL_CONTEXT states when stop-api fails · 785a12af
      Gautham R. Shenoy 提交于
      Currently, we use the opal call opal_slw_set_reg() to inform the
      Sleep-Winkle Engine (SLW) to restore the contents of some of the
      Hypervisor state on wakeup from deep idle states that lose full
      hypervisor context (characterized by the flag
      OPAL_PM_LOSE_FULL_CONTEXT).
      
      However, the current code has a bug in that if opal_slw_set_reg()
      fails, we don't disable the use of these deep states (winkle on
      POWER8, stop4 onwards on POWER9).
      
      This patch fixes this bug by ensuring that if programing the
      sleep-winkle engine to restore the hypervisor states in
      pnv_save_sprs_for_deep_states() fails, then we exclude such states by
      clearing the OPAL_PM_LOSE_FULL_CONTEXT flag from
      supported_cpuidle_states. As a result POWER8 will be prevented from
      using winkle for CPU-Hotplug, and POWER9 will put the offlined CPUs to
      the default stop state when available.
      
      Further, we ensure in the initialization of the cpuidle-powernv driver
      to only include those states whose flags are present in
      supported_cpuidle_states, thereby skipping OPAL_PM_LOSE_FULL_CONTEXT
      states when they have been disabled due to stop-api failure.
      
      Fixes: 1e1601b3 ("powerpc/powernv/idle: Restore SPRs for deep idle
      states via stop API.")
      Signed-off-by: NGautham R. Shenoy <ego@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      785a12af
    • M
      MIPS: PCI: Fix smp_processor_id() in preemptible · 73530266
      Matt Redfearn 提交于
      Commit 1c3c5eab ("sched/core: Enable might_sleep() and
      smp_processor_id() checks early") enables checks for might_sleep() and
      smp_processor_id() being used in preemptible code earlier in the boot
      than before. This results in a new BUG from
      pcibios_set_cache_line_size().
      
      BUG: using smp_processor_id() in preemptible [00000000] code:
      swapper/0/1 caller is pcibios_set_cache_line_size+0x10/0x70
      CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.13.0-rc1-00007-g3ce3e4ba4275 #615
      Stack: 0000000000000000 ffffffff81189694 0000000000000000 ffffffff81822318
             000000000000004e 0000000000000001 800000000e20bd08 20c49ba5e3540000
             0000000000000000 0000000000000000 ffffffff818d0000 0000000000000000
             0000000000000000 ffffffff81189328 ffffffff818ce692 0000000000000000
             0000000000000000 ffffffff81189bc8 ffffffff818d0000 0000000000000000
             ffffffff81828907 ffffffff81769970 800000020ec78d80 ffffffff818c7b48
             0000000000000001 0000000000000001 ffffffff818652b0 ffffffff81896268
             ffffffff818c0000 800000020ec7fb40 800000020ec7fc58 ffffffff81684cac
             0000000000000000 ffffffff8118ab50 0000000000000030 ffffffff81769970
             0000000000000001 ffffffff81122a58 0000000000000000 0000000000000000 ...
      Call Trace:
      [<ffffffff81122a58>] show_stack+0x90/0xb0
      [<ffffffff81684cac>] dump_stack+0xac/0xf0
      [<ffffffff813f7050>] check_preemption_disabled+0x120/0x128
      [<ffffffff818855e8>] pcibios_set_cache_line_size+0x10/0x70
      [<ffffffff81100578>] do_one_initcall+0x48/0x140
      [<ffffffff81865dc4>] kernel_init_freeable+0x194/0x24c
      [<ffffffff8169c534>] kernel_init+0x14/0x118
      [<ffffffff8111ca84>] ret_from_kernel_thread+0x14/0x1c
      
      Fix this by using the cpu_*cache_line_size() macros instead. These
      macros are the "proper" way to determine the CPU cache sizes.
      This makes use of the newly added cpu_tcache_line_size.
      
      Fixes: 1c3c5eab ("sched/core: Enable might_sleep() and smp_processor_id() checks early")
      Signed-off-by: NMatt Redfearn <matt.redfearn@imgtec.com>
      Suggested-by: NJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: NJames Hogan <james.hogan@imgtec.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      73530266
    • M
      MIPS: Introduce cpu_tcache_line_size · 21da5332
      Matt Redfearn 提交于
      There exist macros to return the cache line size of the L1 dcache and L2
      scache but there is currently no macro for the L3 tcache. Add this macro
      which will be used by the following patch "MIPS: PCI: Fix
      smp_processor_id() in preemptible"
      Signed-off-by: NMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/16871/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      21da5332
  9. 07 8月, 2017 10 次提交
  10. 05 8月, 2017 2 次提交