1. 13 9月, 2012 5 次提交
  2. 05 9月, 2012 2 次提交
    • P
      powerpc: Make sure IPI handlers see data written by IPI senders · 9fb1b36c
      Paul Mackerras 提交于
      We have been observing hangs, both of KVM guest vcpu tasks and more
      generally, where a process that is woken doesn't properly wake up and
      continue to run, but instead sticks in TASK_WAKING state.  This
      happens because the update of rq->wake_list in ttwu_queue_remote()
      is not ordered with the update of ipi_message in
      smp_muxed_ipi_message_pass(), and the reading of rq->wake_list in
      scheduler_ipi() is not ordered with the reading of ipi_message in
      smp_ipi_demux().  Thus it is possible for the IPI receiver not to see
      the updated rq->wake_list and therefore conclude that there is nothing
      for it to do.
      
      In order to make sure that anything done before smp_send_reschedule()
      is ordered before anything done in the resulting call to scheduler_ipi(),
      this adds barriers in smp_muxed_message_pass() and smp_ipi_demux().
      The barrier in smp_muxed_message_pass() is a full barrier to ensure that
      there is a full ordering between the smp_send_reschedule() caller and
      scheduler_ipi().  In smp_ipi_demux(), we use xchg() rather than
      xchg_local() because xchg() includes release and acquire barriers.
      Using xchg() rather than xchg_local() makes sense given that
      ipi_message is not just accessed locally.
      
      This moves the barrier between setting the message and calling the
      cause_ipi() function into the individual cause_ipi implementations.
      Most of them -- those that used outb, out_8 or similar -- already had
      a full barrier because out_8 etc. include a sync before the MMIO
      store.  This adds an explicit barrier in the two remaining cases.
      
      These changes made no measurable difference to the speed of IPIs as
      measured using a simple ping-pong latency test across two CPUs on
      different cores of a POWER7 machine.
      
      The analysis of the reason why processes were not waking up properly
      is due to Milton Miller.
      
      Cc: stable@vger.kernel.org # v3.0+
      Reported-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9fb1b36c
    • M
      powerpc/dart: Remove uses of virt_to_abs() and abs_to_virt() · 579468a9
      Michael Ellerman 提交于
      These days they are just wrappers around __pa() and __va() respectively.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      579468a9
  3. 24 8月, 2012 1 次提交
  4. 03 8月, 2012 1 次提交
  5. 27 7月, 2012 1 次提交
  6. 23 7月, 2012 1 次提交
  7. 11 7月, 2012 4 次提交
  8. 10 7月, 2012 3 次提交
  9. 17 6月, 2012 1 次提交
  10. 04 5月, 2012 1 次提交
  11. 03 5月, 2012 1 次提交
  12. 30 4月, 2012 2 次提交
    • G
      powerpc/irqdomain: Fix broken NR_IRQ references · 4013369f
      Grant Likely 提交于
      The switch from using irq_map to irq_alloc_desc*() for managing irq
      number allocations introduced new bugs in some of the powerpc
      interrupt code.  Several functions rely on the value of NR_IRQS to
      determine the maximum irq number that could get allocated.  However,
      with sparse_irq and using irq_alloc_desc*() the maximum possible irq
      number is now specified with 'nr_irqs' which may be a number larger
      than NR_IRQS.  This has caused breakage on powermac when
      CONFIG_NR_IRQS is set to 32.
      
      This patch removes most of the direct references to NR_IRQS in the
      powerpc code and replaces them with either a nr_irqs reference or by
      using the common for_each_irq_desc() macro.  The powerpc-specific
      for_each_irq() macro is removed at the same time.
      
      Also, the Cell axon_msi driver is refactored to remove the global
      build assumption on the size of NR_IRQS and instead add a limit to the
      maximum irq number when calling irq_domain_add_nomap().
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4013369f
    • G
      powerpc/8xx: Fix NR_IRQ bugs and refactor 8xx interrupt controller · 8751ed14
      Grant Likely 提交于
      The mpc8xx driver uses a reference to NR_IRQS that is buggy.  It uses
      NR_IRQs for the array size of the ppc_cached_irq_mask bitmap, but
      NR_IRQs could be smaller than the number of hardware irqs that
      ppc_cached_irq_mask tracks.
      
      Also, while fixing that problem, it became apparent that the interrupt
      controller only supports 32 interrupt numbers, but it is written as if
      it supports multiple register banks which is more complicated.
      
      This patch pulls out the buggy reference to NR_IRQs and fixes the size
      of the ppc_cached_irq_mask to match the number of HW irqs.  It also
      drops the now-unnecessary code since ppc_cached_irq_mask is no longer
      an array.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8751ed14
  13. 23 4月, 2012 2 次提交
  14. 20 4月, 2012 2 次提交
  15. 19 4月, 2012 1 次提交
    • P
      powerpc: fix system.h fallout in sysdev/scom.c [chroma_defconfig] · 1bc68a9e
      Paul Gortmaker 提交于
      The following shows up in chroma_defconfig:
      
       CC      arch/powerpc/sysdev/scom.o
      arch/powerpc/sysdev/scom.c: In function 'scom_debug_init':
      arch/powerpc/sysdev/scom.c:182:36: error: 'powerpc_debugfs_root' undeclared (first use in this function)
      arch/powerpc/sysdev/scom.c:182:36: note: each undeclared identifier is reported only once for each function it appears in
      make[2]: *** [arch/powerpc/sysdev/scom.o] Error 1
      make[1]: *** [arch/powerpc/sysdev/scom.o] Error 2
      
      A bisect leads to commit 9ffc93f2
      
          "Remove all #inclusions of asm/system.h"
      
      Add the debug header which contains powerpc_debugfs_root.
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      1bc68a9e
  16. 29 3月, 2012 2 次提交
  17. 17 3月, 2012 5 次提交
  18. 16 3月, 2012 3 次提交
    • L
    • L
      powerpc/srio: Fix the compile errors when building with 64bit · 2a2383da
      Liu Gang 提交于
      For the file "arch/powerpc/sysdev/fsl_rmu.c", there will be some compile
      errors while using the corenet64_smp_defconfig:
      
      .../fsl_rmu.c:315: error: cast from pointer to integer of different size
      .../fsl_rmu.c:320: error: cast to pointer from integer of different size
      .../fsl_rmu.c:320: error: cast to pointer from integer of different size
      .../fsl_rmu.c:320: error: cast to pointer from integer of different size
      .../fsl_rmu.c:330: error: cast to pointer from integer of different size
      .../fsl_rmu.c:332: error: cast to pointer from integer of different size
      .../fsl_rmu.c:339: error: cast to pointer from integer of different size
      .../fsl_rmu.c:340: error: cast to pointer from integer of different size
      .../fsl_rmu.c:341: error: cast to pointer from integer of different size
      .../fsl_rmu.c:348: error: cast to pointer from integer of different size
      .../fsl_rmu.c:348: error: cast to pointer from integer of different size
      .../fsl_rmu.c:348: error: cast to pointer from integer of different size
      .../fsl_rmu.c:659: error: cast from pointer to integer of different size
      .../fsl_rmu.c:659: error: format '%8.8x' expects type 'unsigned int',
                         but argument 5 has type 'size_t'
      .../fsl_rmu.c:985: error: cast from pointer to integer of different size
      .../fsl_rmu.c:997: error: cast to pointer from integer of different size
      
      Rewrote the corresponding code with the support of 64bit building.
      Signed-off-by: NLiu Gang <Gang.Liu@freescale.com>
      Signed-off-by: NShaohui Xie <Shaohui.Xie@freescale.com>
      Reported-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      2a2383da
    • L
      powerpc/srio: Fix the relocation errors when building with 64bit · b6c46dcf
      Liu Gang 提交于
      For the file "arch/powerpc/sysdev/fsl_rio.c", there will be some relocation
      errors while using the corenet64_smp_defconfig:
      
      WARNING: modpost: Found 6 section mismatch(es).
      To see full details build your kernel with:
      'make CONFIG_DEBUG_SECTION_MISMATCH=y'
        GEN     .version
        CHK     include/generated/compile.h
        UPD     include/generated/compile.h
        CC      init/version.o
        LD      init/built-in.o
        LD      .tmp_vmlinux1
      arch/powerpc/sysdev/built-in.o:(__ex_table+0x0):
      	relocation truncated to fit: R_PPC64_ADDR16 against `.text'+3208
      arch/powerpc/sysdev/built-in.o:(__ex_table+0x2):
      	relocation truncated to fit: R_PPC64_ADDR16 against `.fixup'
      arch/powerpc/sysdev/built-in.o:(__ex_table+0x4):
      	relocation truncated to fit: R_PPC64_ADDR16 against `.text'+3230
      arch/powerpc/sysdev/built-in.o:(__ex_table+0x6):
      	relocation truncated to fit: R_PPC64_ADDR16 against `.fixup'+c
      arch/powerpc/sysdev/built-in.o:(__ex_table+0x8):
      	relocation truncated to fit: R_PPC64_ADDR16 against `.text'+3250
      arch/powerpc/sysdev/built-in.o:(__ex_table+0xa):
      	relocation truncated to fit: R_PPC64_ADDR16 against `.fixup'+18
      
      Rewrote the corresponding code with the support of 64bit building.
      Signed-off-by: NLiu Gang <Gang.Liu@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      b6c46dcf
  19. 27 2月, 2012 1 次提交
  20. 23 2月, 2012 1 次提交
    • K
      powerpc/mpic: Remove duplicate MPIC_WANTS_RESET flag · e55d7f73
      Kyle Moffett 提交于
      There are two separate flags controlling whether or not the MPIC is
      reset during initialization, which is completely unnecessary, and only
      one of them can be specified in the device tree.
      
      Also, most platforms in-tree right now do actually want to reset the
      MPIC during initialization anyways, which means lots of duplicate code
      passing the MPIC_WANTS_RESET flag.
      
      Fix all of the callers which currently do not pass the MPIC_WANTS_RESET
      flag to pass the MPIC_NO_RESET flag, then remove the MPIC_WANTS_RESET
      flag and make the code reset the MPIC by default.
      Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e55d7f73