1. 08 5月, 2008 1 次提交
  2. 06 5月, 2008 1 次提交
  3. 05 5月, 2008 10 次提交
    • L
      [POWERPC] spufs: handle faults while the context switch pending flag is set · de102892
      Luke Browning 提交于
      Currently, page fault handlers don't issue a mfc restart if the context
      switch pending flag is set, which can leave us with a hanging DMA after
      a context restore.
      
      This patch introduces fault pending flag that is set by the fault
      handler and read by the context switch code, so that the latter can add
      the restart bit at the right spot, after it has successfuly saved the
      state of the mfc control register.
      Signed-off-by: NLuke Browning <lukebr@linux.vnet.ibm.com>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      de102892
    • L
      [POWERPC] spufs: fix concurrent delivery of class 0 & 1 exceptions · f3d69e05
      Luke Browning 提交于
      SPU class 0 & 1 exceptions may occur in parallel, so we may end up
      overwriting csa.dsisr.
      
      This change adds dedicated fields for each class to the spu and the spu
      context so that fault data is not overwritten.
      Signed-off-by: NLuke Browning <lukebr@linux.vnet.ibm.com>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      f3d69e05
    • L
      [POWERPC] spufs: try to route SPU interrupts to local node · 7a214200
      Luke Browning 提交于
      Currently, we re-route SPU interrupts to the current cpu, which may be
      on a remote node. In the case of time slicing, all spu interrupts will
      end up routed to the same cpu, where the spusched_tick occurs.
      
      This change routes mfc interrupts to the cpu where the controlling
      thread last ran, provided that cpu is on the same node as the spu
      (otherwise don't reroute interrupts).
      
      This should improve performance and provide a more predictable
      environment for processing spu exceptions. In the past we have seen
      concurrent delivery of spu exceptions to two cpus. This eliminates that
      concern.
      Signed-off-by: NLuke Browning <lukebr@linux.vnet.ibm.com>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      7a214200
    • L
      [POWERPC] spufs: set SPU_CONTEXT_SWITCH_PENDING before synchronising SPU irqs · 093c16bf
      Luke Browning 提交于
      synchronize_irq() provides the serialization for
      SPU_CONTEXT_SWITCH_PENDING which is read with a simple load. This
      routine guarantees that the relevant interrupt handlers are not running,
      so that the next time they do run they will see the update
      memory value.
      
      This must be done correctly so that exception handling code does not
      restart the mfc in the middle of a context switch while we are trying
      to atomically stop it and save state.
      Signed-off-by: NLuke Browning <lukebr@linux.vnet.ibm.com>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      093c16bf
    • J
      [POWERPC] spufs: don't acquire state_mutex interruptible while performing callback · d29694f0
      Jeremy Kerr 提交于
      There's currently no way to tell if spu_process_callback has
      returned with the state mutex held, as -EINTR may be returned
      by either the syscall or the spu_acquire fail case.
      
      Instead, just do a non-interruptible mutex_lock here.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      d29694f0
    • J
      [POWERPC] spufs: update master runcntl with context lock held · c0bace5c
      Jeremy Kerr 提交于
      Currently, we update the SPU master run control bit (ie,
      spu_enable_spu) in spufs_run_spu before we grab the context mutex. This
      can result in races with other processes accessing this context's
      resources.
      
      This change moves the spu_enable_spu to after we have acquired the
      context lock.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      c0bace5c
    • J
      [POWERPC] spufs: fix post-stopped update of MFC_CNTL register · 55d7cd74
      Jeremy Kerr 提交于
      We currently have two issues with the MFC save code:
      
       * save_mfc_decr doesn't handle a transition of 1 -> 0 of the Ds bit
       * The Q bit may be stale in the CSA
      
      This change fixes the first issue by clearing the relevant bits from
      the MFC_CNTL value in the CSA before or-ing in the updated status.
      Also, we add the Q bit to the updated status.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      55d7cd74
    • J
      [POWERPC] spufs: fix save of mfc_cntl register · 1ca4264e
      Jeremy Kerr 提交于
      Currently, we can introduce invalid entries into the MFC queues:
      
      1) context starts a DMA
      
      2) context gets scheduled out during a DMA
        - kernel saves MFC queue to CSA
        - kernel saves 0x0 in csa->mfc_control_RW
      
      3) context gets scheduled in
        - csa->mfc_control[Q] ('queues empty') isn't set, so DMA queues are
          restored from the CSA
      
      4) context's DMA is completed
      
      5) context gets scheduled out again, no DMA occuring this time
        - kernel sees that MFC_CNTL[Q] ('queues empty') is set, so doesn't
          touch saved queue data in CSA
        - kernel saves 0x0 in csa->mfc_control_RW
      
      6) context gets scheduled in
        - csa->mfc_control[Q] ('queues empty') isn't set (we saved is as 0!),
          so DMA queues are restored from the CSA
      
      In this last restore, we've restored the queue status from step 2,
      which are now invalid.
      
      This change makes save_mfc_cntl() closer to the save/restore sequence,
      as specified in the CBE handbook.
      
      With changes from Luke Browning.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      1ca4264e
    • J
      [POWERPC] spufs: don't touch suspend bits when purging DMA queue · 943906ba
      Jeremy Kerr 提交于
      When we issue a MFC purge request, we may inadvertantly clear the
      suspended status.
      
      This change adds the MFC_CNTL_SUSPEND_MASK when we issue a purge
      request, so that the suspend bit is masked out.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      943906ba
    • J
      [POWERPC] cell: Fix lost interrupts due to fasteoi handler · 5711fe90
      Jeremy Kerr 提交于
      We may currently lose interrupts during SPE context switch, as we alter
      the INT_Route register. Because the IIC uses a per-thread priority
      status, changing the interrupt routing to a different thread means that
      the IRQ is no longer masked by the priority status, so we end up with
      two fasteoi IRQ handlers executing for the one irq_desc. The fasteoi
      handler doesn't handle multiple IRQs, so drops the second one.
      
      Fix this by using our own flow handler. This is based on
      handle_edge_irq, but issues an eoi after IRQs are handled, and doesn't
      do any mask/unmasking.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      5711fe90
  4. 02 5月, 2008 8 次提交
    • P
      [POWERPC] Bolt in SLB entry for kernel stack on secondary cpus · 3b575064
      Paul Mackerras 提交于
      This fixes a regression reported by Kamalesh Bulabel where a POWER4
      machine would crash because of an SLB miss at a point where the SLB
      miss exception was unrecoverable.  This regression is tracked at:
      
      http://bugzilla.kernel.org/show_bug.cgi?id=10082
      
      SLB misses at such points shouldn't happen because the kernel stack is
      the only memory accessed other than things in the first segment of the
      linear mapping (which is mapped at all times by entry 0 of the SLB).
      The context switch code ensures that SLB entry 2 covers the kernel
      stack, if it is not already covered by entry 0.  None of entries 0
      to 2 are ever replaced by the SLB miss handler.
      
      Where this went wrong is that the context switch code assumes it
      doesn't have to write to SLB entry 2 if the new kernel stack is in the
      same segment as the old kernel stack, since entry 2 should already be
      correct.  However, when we start up a secondary cpu, it calls
      slb_initialize, which doesn't set up entry 2.  This is correct for
      the boot cpu, where we will be using a stack in the kernel BSS at this
      point (i.e. init_thread_union), but not necessarily for secondary
      cpus, whose initial stack can be allocated anywhere.  This doesn't
      cause any immediate problem since the SLB miss handler will just
      create an SLB entry somewhere else to cover the initial stack.
      
      In fact it's possible for the cpu to go quite a long time without SLB
      entry 2 being valid.  Eventually, though, the entry created by the SLB
      miss handler will get overwritten by some other entry, and if the next
      access to the stack is at an unrecoverable point, we get the crash.
      
      This fixes the problem by making slb_initialize create a suitable
      entry for the kernel stack, if we are on a secondary cpu and the stack
      isn't covered by SLB entry 0.  This requires initializing the
      get_paca()->kstack field earlier, so I do that in smp_create_idle
      where the current field is initialized.  This also abstracts a bit of
      the computation that mk_esid_data in slb.c does so that it can be used
      in slb_initialize.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3b575064
    • G
      [POWERPC] PS3: Update ps3_defconfig · d9f2f3f5
      Geoff Levand 提交于
      Update ps3_defconfig.
      Signed-off-by: NGeoff Levand <geoffrey.levand@am.sony.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d9f2f3f5
    • G
      [POWERPC] PS3: Make ps3_virq_setup and ps3_virq_destroy static · fdedb4ca
      Geert Uytterhoeven 提交于
      The routines ps3_virq_setup() and ps3_virq_destroy() are used
      in only one file, so make them static.
      Signed-off-by: NGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Signed-off-by: NGeoff Levand <geoffrey.levand@am.sony.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      fdedb4ca
    • G
      [POWERPC] Fix slb.c compile warnings · bbea3460
      Geoff Levand 提交于
      Arrange for a syntax check to always be done on the powerpc/mm/slb.c
      DBG() macro by defining it to pr_debug() for non-debug builds.
      
      Also, fix these related compile warnings:
      
        slb.c:273: warning: format '%04x' expects type 'unsigned int', but argument 2 has type 'long unsigned int
        slb.c:274: warning: format '%04x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'
      Signed-off-by: NGeoff Levand <geoffrey.levand@am.sony.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      bbea3460
    • K
      [POWERPC] Xilinx: Fix compile warnings · b17b8181
      Kumar Gala 提交于
      arch/powerpc/sysdev/xilinx_intc.c: In function 'xilinx_intc_init':
      arch/powerpc/sysdev/xilinx_intc.c:111: warning: format '%08X' expects type 'unsigned int', but argument 2 has type 'resource_size_t'
      drivers/char/xilinx_hwicap/xilinx_hwicap.c: In function 'hwicap_setup':
      drivers/char/xilinx_hwicap/xilinx_hwicap.c:626: warning: cast to pointer from integer of different size
      drivers/char/xilinx_hwicap/xilinx_hwicap.c:646: warning: format '%x' expects type 'unsigned int', but argument 6 has type 'resource_size_t'
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      b17b8181
    • B
      [POWERPC] Squash build warning for print of resource_size_t in fsl_soc.c · 128cf7f2
      Becky Bruce 提交于
      When resource_size_t is larger than an int, the current code
      generates a build warning.  Kill it.
      Signed-off-by: NBecky Bruce <becky.bruce@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      128cf7f2
    • R
      [RAPIDIO] fix current kernel-doc notation · 9941d945
      Randy Dunlap 提交于
      Fix current (-git16) missing docbook/kernel-doc notation in RapidIO files.
      
      Warning(linux-2.6.25-git16//include/linux/rio.h:187): No description found for parameter 'sys_size'
      Warning(linux-2.6.25-git16//include/linux/rio.h:187): No description found for parameter 'phy_type'
      
      Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:188): No description found for parameter 'mport'
      Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:224): No description found for parameter 'mport'
      Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:245): No description found for parameter 'mport'
      Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:270): No description found for parameter 'mport'
      Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:311): No description found for parameter 'mport'
      Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:996): No description found for parameter 'dev'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      9941d945
    • A
      [POWERPC] 86xx: mpc8610_hpcd: add support for PCI Express x8 slot · e598477a
      Anton Vorontsov 提交于
      This patch adds pcie node which is resposible for PCI-E x8 slot
      functioning. Though, this was tested using only x1 SKY2 NIC.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      e598477a
  5. 30 4月, 2008 9 次提交
  6. 29 4月, 2008 11 次提交