1. 24 3月, 2014 28 次提交
  2. 20 3月, 2014 12 次提交
    • W
      fsl/pci: The new pci suspend/resume implementation · 48b16180
      Wang Dongsheng 提交于
      If we do nothing in suspend/resume, some platform PCIe ip-block
      can't guarantee the link back to L0 state from sleep, then, when
      we read the EP device will hang. Only we send pme turnoff message
      in pci controller suspend, and send pme exit message in resume, the
      link state will be normal.
      
      When we send pme turnoff message in pci controller suspend, the
      links will into l2/l3 ready, then, host cannot communicate with
      ep device, but pci-driver will call back EP device to save them
      state. So we need to change platform_driver->suspend/resume to
      syscore->suspend/resume.
      
      So the new suspend/resume implementation, send pme turnoff message
      in suspend, and send pme exit message in resume. And add a PME handler,
      to response PME & message interrupt.
      
      Change platform_driver->suspend/resume to syscore->suspend/resume.
      pci-driver will call back EP device, to save EP state in
      pci_pm_suspend_noirq, so we need to keep the link, until
      pci_pm_suspend_noirq finish.
      Signed-off-by: NWang Dongsheng <dongsheng.wang@freescale.com>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      48b16180
    • S
      powerpc/booke64: Critical and machine check exception support · 609af38f
      Scott Wood 提交于
      Add special state saving for critical and machine check exceptions.
      
      Most of this code could be used to handle debug exceptions taken from
      kernel space, but actually doing so is outside the scope of this patch.
      
      The various critical and machine check exceptions now point to their
      real handlers, rather than hanging the kernel.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      609af38f
    • S
      powerpc/booke64: Add crit/mc/debug support to EXCEPTION_COMMON · 31f71248
      Scott Wood 提交于
      Use the proper scratch SPRG and PACA region.  Introduce level-specific
      macros to simplify usage and avoid needing to do a bunch of token
      pasting throughout EXCEPTION_COMMON().
      
      Now that EXCEPTION_COMMON_DBG() is properly using the debug scratch
      register, there's no more need for the caller to move the value to the
      GEN scratch first.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      31f71248
    • S
      powerpc/booke64: Remove ints from EXCEPTION_COMMON · 28a3ded1
      Scott Wood 提交于
      The ints parameter was used to optionally insert RECONCILE_IRQ_STATE
      into EXCEPTION_COMMON.  However, since it came at the end of
      EXCEPTION_COMMON, there was no real benefit for it to be there as
      opposed to being called separately by the caller of EXCEPTION_COMMON.
      
      The ints parameter was causing some hassle when trying to add an extra
      macro layer.  Besides avoiding that, moving "ints" to the caller makes
      the code simpler by:
       - avoiding the asymmetry where INTS_RESTORE_HARD is called separately
      by the individual exception, but INTS_DISABLE was not
       - removing the no-op INTS_KEEP
       - not having an unnecessary macro parameter
      
      It also turned out to be necessary to delay the INTS_DISABLE
      in the case of special level exceptions until after we saved the
      old value of PACAIRQHAPPENED.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      28a3ded1
    • S
      powerpc/booke64: Use SPRG_TLB_EXFRAME on bolted handlers · a3dc6207
      Scott Wood 提交于
      While bolted handlers (including e6500) do not need to deal with a TLB
      miss recursively causing another TLB miss, nested TLB misses can still
      happen with crit/mc/debug exceptions -- so we still need to honor
      SPRG_TLB_EXFRAME.
      
      We don't need to spend time modifying it in the TLB miss fastpath,
      though -- the special level exception will handle that.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Cc: Mihai Caraman <mihai.caraman@freescale.com>
      Cc: kvm-ppc@vger.kernel.org
      a3dc6207
    • S
      powerpc/booke64: Use SPRG7 for VDSO · 9d378dfa
      Scott Wood 提交于
      Previously SPRG3 was marked for use by both VDSO and critical
      interrupts (though critical interrupts were not fully implemented).
      
      In commit 8b64a9df ("powerpc/booke64:
      Use SPRG0/3 scratch for bolted TLB miss & crit int"), Mihai Caraman
      made an attempt to resolve this conflict by restoring the VDSO value
      early in the critical interrupt, but this has some issues:
      
       - It's incompatible with EXCEPTION_COMMON which restores r13 from the
         by-then-overwritten scratch (this cost me some debugging time).
       - It forces critical exceptions to be a special case handled
         differently from even machine check and debug level exceptions.
       - It didn't occur to me that it was possible to make this work at all
         (by doing a final "ld r13, PACA_EXCRIT+EX_R13(r13)") until after
         I made (most of) this patch. :-)
      
      It might be worth investigating using a load rather than SPRG on return
      from all exceptions (except TLB misses where the scratch never leaves
      the SPRG) -- it could save a few cycles.  Until then, let's stick with
      SPRG for all exceptions.
      
      Since we cannot use SPRG4-7 for scratch without corrupting the state of
      a KVM guest, move VDSO to SPRG7 on book3e.  Since neither SPRG4-7 nor
      critical interrupts exist on book3s, SPRG3 is still used for VDSO
      there.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Cc: Mihai Caraman <mihai.caraman@freescale.com>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: kvm-ppc@vger.kernel.org
      9d378dfa
    • S
      powerpc/e6500: Make TLB lock recursive · 82d86de2
      Scott Wood 提交于
      Once special level interrupts are supported, we may take nested TLB
      misses -- so allow the same thread to acquire the lock recursively.
      
      The lock will not be effective against the nested TLB miss handler
      trying to write the same entry as the interrupted TLB miss handler, but
      that's also a problem on non-threaded CPUs that lack TLB write
      conditional.  This will be addressed in the patch that enables crit/mc
      support by invalidating the TLB on return from level exceptions.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      82d86de2
    • S
      powerpc/booke64: Fix exception numbers · c4787d1e
      Scott Wood 提交于
      altivec_unavailable was commented as 0xf20 but the code uses 0x200.
      Note that 0xf20 is also used by ap_unavailable.
      
      altivec_assist was commented as 0x1700 but the code uses 0x220.
      
      critical_input was commented as 0x580 but the code uses 0x100.
      
      machine_check was commented and implemented as 0x200, which conflicts
      with altivec_assist (it only builds because MC_EXCEPTION_PROLOG is
      commented out).  Changed to the fixed IVOR value of 0x000.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      c4787d1e
    • T
      powerpc/book3e: store crit/mc/dbg exception thread info · 19007b34
      Tiejun Chen 提交于
      We need to store thread info to these exception thread info like something
      we already did for PPC32.
      Signed-off-by: NTiejun Chen <tiejun.chen@windriver.com>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      19007b34
    • T
      powerpc/book3e: initialize crit/mc/dbg kernel stack pointers · 160c7324
      Tiejun Chen 提交于
      We already allocated critical/machine/debug check exceptions, but
      we also should initialize those associated kernel stack pointers
      for use by special exceptions in the PACA.
      Signed-off-by: NTiejun Chen <tiejun.chen@windriver.com>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      160c7324
    • W
    • Z
      Corenet: Add QE platform support for Corenet · 0f5a8696
      Zhao Qiang 提交于
      There is QE on platform T104x, add support.
      Call funcs qe_ic_init and qe_init if CONFIG_QUICC_ENGINE is defined.
      Signed-off-by: NZhao Qiang <B45475@freescale.com>
      [scottwood@freesacle.com: whitespace fix]
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      0f5a8696