1. 15 6月, 2009 1 次提交
    • P
      powerpc: Add compiler memory barrier to mtmsr macro · 4c75f84f
      Paul Mackerras 提交于
      On 32-bit non-Book E, local_irq_restore() turns into just mtmsr(),
      which doesn't currently have a compiler memory barrier.  This means
      that accesses to memory inside a local_irq_save/restore section,
      or a spin_lock_irqsave/spin_unlock_irqrestore section on UP, can
      be reordered by the compiler to occur outside that section.
      
      To fix this, this adds a compiler memory barrier to mtmsr for both
      32-bit and 64-bit.  Having a compiler memory barrier in mtmsr makes
      sense because it will almost always be changing something about the
      context in which memory accesses are done, so in general we don't want
      memory accesses getting moved from one side of an mtmsr to the other.
      
      With the barrier in mtmsr(), some of the explicit barriers in
      hw_irq.h are now redundant, so this removes them.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      4c75f84f
  2. 15 5月, 2009 1 次提交
    • P
      perf_counter: powerpc: supply more precise information on counter overflow events · 0bbd0d4b
      Paul Mackerras 提交于
      This uses values from the MMCRA, SIAR and SDAR registers on
      powerpc to supply more precise information for overflow events,
      including a data address when PERF_RECORD_ADDR is specified.
      
      Since POWER6 uses different bit positions in MMCRA from earlier
      processors, this converts the struct power_pmu limited_pmc5_6
      field, which only had 0/1 values, into a flags field and
      defines bit values for its previous use (PPMU_LIMITED_PMC5_6)
      and a new flag (PPMU_ALT_SIPR) to indicate that the processor
      uses the POWER6 bit positions rather than the earlier
      positions.  It also adds definitions in reg.h for the new and
      old positions of the bit that indicates that the SIAR and SDAR
      values come from the same instruction.
      
      For the data address, the SDAR value is supplied if we are not
      doing instruction sampling.  In that case there is no guarantee
      that the address given in the PERF_RECORD_ADDR subrecord will
      correspond to the instruction whose address is given in the
      PERF_RECORD_IP subrecord.
      
      If instruction sampling is enabled (e.g. because this counter
      is counting a marked instruction event), then we only supply
      the SDAR value for the PERF_RECORD_ADDR subrecord if it
      corresponds to the instruction whose address is in the
      PERF_RECORD_IP subrecord.  Otherwise we supply 0.
      
      [ Impact: support more PMU hardware features on PowerPC ]
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <18955.37028.48861.555309@drongo.ozlabs.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0bbd0d4b
  3. 02 4月, 2009 1 次提交
  4. 11 3月, 2009 1 次提交
  5. 23 12月, 2008 1 次提交
  6. 04 8月, 2008 1 次提交
  7. 17 7月, 2008 1 次提交
  8. 01 7月, 2008 2 次提交
    • M
      powerpc: Add VSX context save/restore, ptrace and signal support · ce48b210
      Michael Neuling 提交于
      This patch extends the floating point save and restore code to use the
      VSX load/stores when VSX is available.  This will make FP context
      save/restore marginally slower on FP only code, when VSX is available,
      as it has to load/store 128bits rather than just 64bits.
      
      Mixing FP, VMX and VSX code will get constant architected state.
      
      The signals interface is extended to enable access to VSR 0-31
      doubleword 1 after discussions with tool chain maintainers.  Backward
      compatibility is maintained.
      
      The ptrace interface is also extended to allow access to VSR 0-31 full
      registers.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ce48b210
    • M
      powerpc: Introduce infrastructure for feature sections with alternatives · fac23fe4
      Michael Ellerman 提交于
      The current feature section logic only supports nop'ing out code, this means
      if you want to choose at runtime between instruction sequences, one or both
      cases will have to execute the nop'ed out contents of the other section, eg:
      
      BEGIN_FTR_SECTION
      	or	1,1,1
      END_FTR_SECTION_IFSET(FOO)
      BEGIN_FTR_SECTION
      	or	2,2,2
      END_FTR_SECTION_IFCLR(FOO)
      
      and the resulting code will be either,
      
      	or	1,1,1
      	nop
      
      or,
      	nop
      	or	2,2,2
      
      For small code segments this is fine, but for larger code blocks and in
      performance criticial code segments, it would be nice to avoid the nops.
      This commit starts to implement logic to allow the following:
      
      BEGIN_FTR_SECTION
      	or	1,1,1
      FTR_SECTION_ELSE
      	or	2,2,2
      ALT_FTR_SECTION_END_IFSET(FOO)
      
      and the resulting code will be:
      
      	or	1,1,1
      or,
      	or	2,2,2
      
      We achieve this by extending the existing FTR macros. The current feature
      section semantic just becomes a special case, ie. if the else case is empty
      we nop out the default case.
      
      The key limitation is that the size of the else case must be less than or
      equal to the size of the default case. If the else case is smaller the
      remainder of the section is nop'ed.
      
      We let the linker put the else case code in with the rest of the text,
      so that relative branches from the else case are more likley to link,
      this has the disadvantage that we can't free the unused else cases.
      
      This commit introduces the required macro and linker script changes, but
      does not enable the patching of the alternative sections.
      
      We also need to update two hand-made section entries in reg.h and timex.h
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      fac23fe4
  9. 26 6月, 2008 1 次提交
  10. 03 3月, 2008 1 次提交
  11. 06 2月, 2008 1 次提交
  12. 25 1月, 2008 1 次提交
  13. 11 12月, 2007 1 次提交
  14. 17 9月, 2007 1 次提交
  15. 13 9月, 2007 1 次提交
  16. 10 7月, 2007 1 次提交
  17. 24 4月, 2007 1 次提交
  18. 07 2月, 2007 3 次提交
  19. 09 12月, 2006 2 次提交
  20. 25 10月, 2006 1 次提交
  21. 23 10月, 2006 1 次提交
  22. 06 10月, 2006 1 次提交
  23. 13 9月, 2006 1 次提交
  24. 21 6月, 2006 1 次提交
    • B
      [POWERPC] cell: add RAS support · acf7d768
      Benjamin Herrenschmidt 提交于
      This is a first version of support for the Cell BE "Reliability,
      Availability and Serviceability" features.
      
      It doesn't yet handle some of the RAS interrupts (the ones described in
      iic_is/iic_irr), I'm still working on a proper way to expose these. They
      are essentially a cascaded controller by themselves (sic !) though I may
      just handle them locally to the iic driver. I need also to sync with
      David Erb on the way he hooked in the performance monitor interrupt.
      
      So that's all for 2.6.17 and I'll do more work on that with my rework of
      the powerpc interrupt layer that I'm hacking on at the moment.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      acf7d768
  25. 15 6月, 2006 2 次提交
  26. 09 6月, 2006 1 次提交
  27. 19 5月, 2006 1 次提交
  28. 27 3月, 2006 1 次提交
    • P
      powerpc: Unify the 32 and 64 bit idle loops · a0652fc9
      Paul Mackerras 提交于
      This unifies the 32-bit (ARCH=ppc and ARCH=powerpc) and 64-bit idle
      loops.  It brings over the concept of having a ppc_md.power_save
      function from 32-bit to ARCH=powerpc, which lets us get rid of
      native_idle().  With this we will also be able to simplify the idle
      handling for pSeries and cell.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a0652fc9
  29. 24 2月, 2006 1 次提交
    • A
      [PATCH] powerpc: Fix runlatch performance issues · cb2c9b27
      Anton Blanchard 提交于
      The runlatch SPR can take a lot of time to write. My original runlatch
      code would set it on every exception entry even though most of the time
      this was not required. It would also continually set it in the idle
      loop, which is an issue on an SMT capable processor.
      
      Now we cache the runlatch value in a threadinfo bit, and only check for
      it in decrementer and hardware interrupt exceptions as well as the idle
      loop. Boot on POWER3, POWER5 and iseries, and compile tested on pmac32.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      cb2c9b27
  30. 09 1月, 2006 2 次提交
    • A
      [PATCH] cell: enable pause(0) in cpu_idle · c902be71
      Arnd Bergmann 提交于
      This patch enables support for pause(0) power management state
      for the Cell Broadband Processor, which is import for power efficient
      operation. The pervasive infrastructure will in the future enable
      us to introduce more functionality specific to the Cell's
      pervasive unit.
      
      From: Maximino Aguilar <maguilar@us.ibm.com>
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c902be71
    • A
      [PATCH] powerpc: G4+ oprofile support · 555d97ac
      Andy Fleming 提交于
      This patch adds oprofile support for the 7450 and all its multitudinous
      derivatives.
      
      * Added 7450 (and derivatives) support for oprofile
      * Changed e500 cputable to have oprofile model and cpu_type fields
      * Added support for classic 32-bit performance monitor interrupt
      * Cleaned up common powerpc oprofile code to be as common as possible
      * Cleaned up oprofile_impl.h to reflect 32 bit classic code
      * Added 32-bit MMCRx bitfield definitions and SPR numbers
      Signed-off-by: NAndy Fleming <afleming@freescale.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      555d97ac
  31. 10 11月, 2005 2 次提交
    • P
      [PATCH] powerpc: merge code values for identifying platforms · 799d6046
      Paul Mackerras 提交于
      This patch merges platform codes.  systemcfg->platform is no longer used,
      systemcfg use in general is deprecated as much as possible (and renamed
      _systemcfg before it gets completely moved elsewhere in a future patch),
      _machine is now used on ppc64 along as ppc32.  Platform codes aren't gone
      yet but we are getting a step closer. A bunch of asm code in head[_64].S
      is also turned into C code.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      799d6046
    • D
      [PATCH] powerpc: Merge cacheflush.h and cache.h · 26ef5c09
      David Gibson 提交于
      The ppc32 and ppc64 versions of cacheflush.h were almost identical.
      The two versions of cache.h are fairly similar, except for a bunch of
      register definitions in the ppc32 version which probably belong better
      elsewhere.  This patch, therefore, merges both headers.  Notable
      points:
      	- there are several functions in cacheflush.h which exist only
      on ppc32 or only on ppc64.  These are handled by #ifdef for now, but
      these should probably be consolidated, along with the actual code
      behind them later.
      	- Confusingly, both ppc32 and ppc64 have a
      flush_dcache_range(), but they're subtly different: it uses dcbf on
      ppc32 and dcbst on ppc64, ppc64 has a flush_inval_dcache_range() which
      uses dcbf.  These too should be merged and consolidated later.
      	- Also flush_dcache_range() was defined in cacheflush.h on
      ppc64, and in cache.h on ppc32.  In the merged version it's in
      cacheflush.h
      	- On ppc32 flush_icache_range() is a normal function from
      misc.S.  On ppc64, it was wrapper, testing a feature bit before
      calling __flush_icache_range() which does the actual flush.  This
      patch takes the ppc64 approach, which amounts to no change on ppc32,
      since CPU_FTR_COHERENT_ICACHE will never be set there, but does mean
      renaming flush_icache_range() to __flush_icache_range() in
      arch/ppc/kernel/misc.S and arch/powerpc/kernel/misc_32.S
      	- The PReP register info from asm-ppc/cache.h has moved to
      arch/ppc/platforms/prep_setup.c
      	- The 8xx register info from asm-ppc/cache.h has moved to a
      new asm-powerpc/reg_8xx.h, included from reg.h
      	- flush_dcache_all() was defined on ppc32 (only), but was
      never called (although it was exported).  Thus this patch removes it
      from cacheflush.h and from ARCH=powerpc (misc_32.S) entirely.  It's
      left in ARCH=ppc for now, with the prototype moved to ppc_ksyms.c.
      
      Built for Walnut (ARCH=ppc), 32-bit multiplatform (pmac, CHRP and PReP
      ARCH=ppc, pmac and CHRP ARCH=powerpc).  Built and booted on POWER5
      LPAR (ARCH=powerpc and ARCH=ppc64).
      
      Built for 32-bit powermac (ARCH=ppc and ARCH=powerpc).  Built and
      booted on POWER5 LPAR (ARCH=powerpc and ARCH=ppc64).  Built and booted
      on G5 (ARCH=powerpc)
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      26ef5c09
  32. 08 11月, 2005 1 次提交
  33. 28 10月, 2005 1 次提交
    • P
      powerpc: Merge xmon · f78541dc
      Paul Mackerras 提交于
      The merged version follows the ppc64 version pretty closely mostly,
      and in fact ARCH=ppc64 now uses the arch/powerpc/xmon version.
      The main difference for ppc64 is that the 'p' command to call
      show_state (which was always pretty dodgy) has been replaced by
      the ppc32 'p' command, which calls a given procedure (so in fact
      the old 'p' command behaviour can be achieved with 'p $show_state').
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f78541dc