1. 31 8月, 2017 2 次提交
  2. 10 8月, 2017 3 次提交
  3. 03 8月, 2017 1 次提交
  4. 11 7月, 2017 1 次提交
  5. 09 5月, 2017 1 次提交
  6. 23 4月, 2017 1 次提交
    • N
      powerpc/64s: Fix POWER9 machine check handler from stop state · 1945bc45
      Nicholas Piggin 提交于
      The ISA specifies power save wakeup due to a machine check exception can
      cause a machine check interrupt (rather than the usual system reset
      interrupt).
      
      The machine check handler copes with this by doing low level machine
      check recovery without restoring full state from idle, then queues up a
      machine check event for logging, then directly executes the same idle
      instruction it woke from. This minimises the work done before recovery
      is performed.
      
      The problem is that it requires machine specific instructions and
      knowledge of the book3s idle code. Currently it only has code to handle
      POWER8 idle, so POWER9 crashes when trying to execute the P8 idle
      instructions which don't exist in ISAv3.0B.
      
      cpu 0x0: Vector: e40 (Emulation Assist) at [c0000000008f3810]
          pc: c000000000008380: machine_check_handle_early+0x130/0x2f0
          lr: c00000000053a098: stop_loop+0x68/0xd0
          sp: c0000000008f3a90
         msr: 9000000000081001
        current = 0xc0000000008a1080
        paca    = 0xc00000000ffd0000   softe: 0        irq_happened: 0x01
          pid   = 0, comm = swapper/0
      
      Instead of going to sleep after recovery, do the usual idle wakeup and
      state restoration by calling into the normal idle wakeup path. This
      reuses the normal idle wakeup paths.
      Reviewed-by: NGautham R. Shenoy <ego@linux.vnet.ibm.com>
      Reviewed-by: NMahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      1945bc45
  7. 13 4月, 2017 1 次提交
  8. 10 4月, 2017 1 次提交
  9. 09 2月, 2017 1 次提交
  10. 31 1月, 2017 1 次提交
  11. 27 1月, 2017 1 次提交
    • C
      powerpc/8xx: Perf events on PPC 8xx · 75b82472
      Christophe Leroy 提交于
      This patch has been reworked since RFC version. In the RFC, this patch
      was preceded by a patch clearing MSR RI for all PPC32 at all time at
      exception prologs. Now MSR RI clearing is done only when this 8xx perf
      events functionality is compiled in, it is therefore limited to 8xx
      and merged inside this patch.
      Other main changes have been to take into account detailed review from
      Peter Zijlstra. The instructions counter has been reworked to behave
      as a free running counter like the three other counters.
      
      The 8xx has no PMU, however some events can be emulated by other means.
      
      This patch implements the following events (as reported by 'perf list'):
        cpu-cycles OR cycles				[Hardware event]
        instructions					[Hardware event]
        dTLB-load-misses				[Hardware cache event]
        iTLB-load-misses				[Hardware cache event]
      
      'cycles' event is implemented using the timebase clock. Timebase clock
      corresponds to CPU clock divided by 16, so number of cycles is
      approximatly 16 times the number of TB ticks
      
      On the 8xx, TLB misses are handled by software. It is therefore
      easy to count all TLB misses each time the TLB miss exception is
      called.
      
      'instructions' is calculated by using instruction watchpoint counter.
      This patch sets counter A to count instructions at address greater
      than 0, hence we count all instructions executed while MSR RI bit is
      set. The counter is set to the maximum which is 0xffff. Every 65535
      instructions, debug instruction breakpoint exception fires. The
      exception handler increments a counter in memory which then
      represent the upper part of the instruction counter. We therefore
      end up with a 48 bits counter. In order to avoid unnecessary overhead
      while no perf event is active, this counter is started when the first
      event referring to this counter is added, and the counter is stopped
      when the last event referring to it is deleted. In order to properly
      support breakpoint exceptions, MSR RI bit has to be unset in exception
      epilogs in order to avoid breakpoint exceptions during critical
      sections during changes to SRR0 and SRR1 would be problematic.
      
      All counters are handled as free running counters.
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NScott Wood <oss@buserror.net>
      75b82472
  12. 25 1月, 2017 1 次提交
  13. 23 11月, 2016 3 次提交
  14. 22 11月, 2016 2 次提交
  15. 14 11月, 2016 1 次提交
  16. 04 10月, 2016 1 次提交
  17. 27 9月, 2016 1 次提交
    • T
      KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register · fa73c3b2
      Thomas Huth 提交于
      The MMCR2 register is available twice, one time with number 785
      (privileged access), and one time with number 769 (unprivileged,
      but it can be disabled completely). In former times, the Linux
      kernel was using the unprivileged register 769 only, but since
      commit 8dd75ccb ("powerpc: Use privileged SPR number
      for MMCR2"), it uses the privileged register 785 instead.
      The KVM-PR code then of course also switched to use the SPR 785,
      but this is causing older guest kernels to crash, since these
      kernels still access 769 instead. So to support older kernels
      with KVM-PR again, we have to support register 769 in KVM-PR, too.
      
      Fixes: 8dd75ccb
      Cc: stable@vger.kernel.org # v3.10+
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NPaul Mackerras <paulus@ozlabs.org>
      fa73c3b2
  18. 25 9月, 2016 1 次提交
    • C
      powerpc/8xx: use SPRN_EIE and SPRN_EID to enable/disable interrupts · 834e5a69
      Christophe Leroy 提交于
      The 8xx has two special registers called EID (External Interrupt
      Disable) and EIE (External Interrupt Enable) for clearing/setting
      EE in MSR. It avoids the three instructions set mfmsr/ori/mtmsr or
      mfmsr/rlwinm/mtmsr and it avoids using a general register.
      
      We just have to write something in the special register to change MSR EE
      bit. So we write r0 into the register, regardless of r0 value.
      
      Writing to one of those two special registers also set the MSR RI bit,
      but this bit is only unset during beginning of exception prolog and end
      of exception epilog. When executing C-functions MSR RI is always set.
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NScott Wood <oss@buserror.net>
      834e5a69
  19. 13 9月, 2016 1 次提交
  20. 01 8月, 2016 1 次提交
  21. 19 7月, 2016 1 次提交
  22. 17 7月, 2016 2 次提交
  23. 15 7月, 2016 1 次提交
    • S
      powerpc/powernv: Add platform support for stop instruction · bcef83a0
      Shreyas B. Prabhu 提交于
      POWER ISA v3 defines a new idle processor core mechanism. In summary,
       a) new instruction named stop is added. This instruction replaces
      	instructions like nap, sleep, rvwinkle.
       b) new per thread SPR named Processor Stop Status and Control Register
      	(PSSCR) is added which controls the behavior of stop instruction.
      
      PSSCR layout:
      ----------------------------------------------------------
      | PLS | /// | SD | ESL | EC | PSLL | /// | TR | MTL | RL |
      ----------------------------------------------------------
      0      4     41   42    43   44     48    54   56    60
      
      PSSCR key fields:
      	Bits 0:3  - Power-Saving Level Status. This field indicates the lowest
      	power-saving state the thread entered since stop instruction was last
      	executed.
      
      	Bit 42 - Enable State Loss
      	0 - No state is lost irrespective of other fields
      	1 - Allows state loss
      
      	Bits 44:47 - Power-Saving Level Limit
      	This limits the power-saving level that can be entered into.
      
      	Bits 60:63 - Requested Level
      	Used to specify which power-saving level must be entered on executing
      	stop instruction
      
      This patch adds support for stop instruction and PSSCR handling.
      Reviewed-by: NGautham R. Shenoy <ego@linux.vnet.ibm.com>
      Signed-off-by: NShreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      bcef83a0
  24. 14 7月, 2016 1 次提交
  25. 09 7月, 2016 1 次提交
  26. 05 7月, 2016 1 次提交
    • O
      powerpc/timer: Large Decrementer support · 79901024
      Oliver O'Halloran 提交于
      Power ISAv3 adds a large decrementer (LD) mode which increases the size
      of the decrementer register. The size of the enlarged decrementer
      register is between 32 and 64 bits with the exact size being dependent
      on the implementation. When in LD mode, reads are sign extended to 64
      bits and a decrementer exception is raised when the high bit is set (i.e
      the value goes below zero). Writes however are truncated to the physical
      register width so some care needs to be taken to ensure that the high
      bit is not set when reloading the decrementer. This patch adds support
      for using the LD inside the host kernel on processors that support it.
      
      When LD mode is supported firmware will supply the ibm,dec-bits property
      for CPU nodes to allow the kernel to determine the maximum decrementer
      value. Enabling LD mode is a hypervisor privileged operation so the kernel
      can only enable it manually when running in hypervisor mode. Guests that
      support LD mode can request it using the "ibm,client-architecture-support"
      firmware call (not implemented in this patch) or some other platform
      specific method. If this property is not supplied then the traditional
      decrementer width of 32 bit is assumed and LD mode will not be enabled.
      
      This patch was based on initial work by Jack Miller.
      Signed-off-by: NOliver O'Halloran <oohall@gmail.com>
      Signed-off-by: NBalbir Singh <bsingharora@gmail.com>
      Acked-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      79901024
  27. 21 6月, 2016 1 次提交
    • J
      powerpc: Load Monitor Register Support · bd3ea317
      Jack Miller 提交于
      This enables new registers, LMRR and LMSER, that can trigger an EBB in
      userspace code when a monitored load (via the new ldmx instruction)
      loads memory from a monitored space. This facility is controlled by a
      new FSCR bit, LM.
      
      This patch disables the FSCR LM control bit on task init and enables
      that bit when a load monitor facility unavailable exception is taken
      for using it. On context switch, this bit is then used to determine
      whether the two relevant registers are saved and restored. This is
      done lazily for performance reasons.
      Signed-off-by: NJack Miller <jack@codezen.org>
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      bd3ea317
  28. 31 5月, 2016 2 次提交
  29. 01 5月, 2016 2 次提交
  30. 11 4月, 2016 1 次提交
  31. 12 3月, 2016 1 次提交