1. 11 10月, 2007 1 次提交
    • P
      [POWERPC] Fix performance monitor on machines with logical PVR · 87a72f9e
      Paul Mackerras 提交于
      Some IBM machines supply a "logical" PVR (processor version register)
      value in the device tree in the cpu nodes rather than the real PVR.
      This is used for instance to indicate that the processors in a POWER6
      partition have been configured by the hypervisor to run in POWER5+
      mode rather than POWER6 mode.  To cope with this, we call identify_cpu
      a second time with the logical PVR value (the first call is with the
      real PVR value in the very early setup code).
      
      However, POWER5+ machines can also supply a logical PVR value, and use
      the same value (the value that indicates a v2.04 architecture
      compliant processor).  This causes problems for code that uses the
      performance monitor (such as oprofile), because the PMU registers are
      different in POWER6 (even in POWER5+ mode) from the real POWER5+.
      
      This change works around this problem by taking out the PMU
      information from the cputable entries for the logical PVR values, and
      changing identify_cpu so that the second call to it won't overwrite
      the PMU information that was established by the first call (the one
      with the real PVR), but does update the other fields.  Specifically,
      if the cputable entry for the logical PVR value has num_pmcs == 0,
      none of the PMU-related fields get used.
      
      So that we can create a mixed cputable entry, we now make cur_cpu_spec
      point to a single static struct cpu_spec, and copy stuff from
      cpu_specs[i] into it.  This has the side-effect that we can now make
      cpu_specs[] be initdata.
      
      Ultimately it would be good to move the PMU-related fields out to a
      separate structure, pointed to by the cputable entries, and change
      identify_cpu so that it saves the PMU info pointer, copies the whole
      structure, and restores the PMU info pointer, rather than identify_cpu
      having to list all the fields that are *not* PMU-related.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      87a72f9e
  2. 03 10月, 2007 3 次提交
  3. 14 9月, 2007 1 次提交
  4. 07 9月, 2007 1 次提交
  5. 11 7月, 2007 1 次提交
  6. 10 7月, 2007 1 次提交
  7. 22 5月, 2007 1 次提交
  8. 17 5月, 2007 1 次提交
  9. 24 4月, 2007 2 次提交
  10. 09 3月, 2007 1 次提交
  11. 08 3月, 2007 1 次提交
  12. 13 2月, 2007 1 次提交
  13. 07 2月, 2007 2 次提交
  14. 08 12月, 2006 2 次提交
    • K
      [POWERPC] Fix 440SPe CPU table entry · a147c585
      Kumar Gala 提交于
      The 440SPe CPU table entry was missing the CPU_FTR_NODSISRALIGN and
      really should have been CPU_FTRS_44X.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      a147c585
    • K
      [POWERPC] Add support for FP emulation for the e300c2 core · aa42c69c
      Kim Phillips 提交于
      The e300c2 has no FPU.  Its MSR[FP] is grounded to zero.  If an attempt
      is made to execute a floating point instruction (including floating-point
      load, store, or move instructions), the e300c2 takes a floating-point
      unavailable interrupt.
      
      This patch adds support for FP emulation on the e300c2 by declaring a
      new CPU_FTR_FP_TAKES_FPUNAVAIL, where FP unavail interrupts are
      intercepted and redirected to the ProgramCheck exception path for
      correct emulation handling.
      
      (If we run out of CPU_FTR bits we could look to reclaim this bit by adding
      support to test the cpu_user_features for PPC_FEATURE_HAS_FPU instead)
      
      It adds a nop to the exception path for 32-bit processors with a FPU.
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      aa42c69c
  15. 04 12月, 2006 4 次提交
    • S
      [POWERPC] Add the e300c3 core to the CPU table. · 57933f8f
      Scott Wood 提交于
      This core is used in Freescale's 831x chips.
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      57933f8f
    • M
      [POWERPC] powerpc: Make 970MP detectable by oprofile · fecb352f
      Mike Wolf 提交于
      Change the oprofile_cpu_type in cputables.c to be ppc64/970MP.  Oprofile
      needs to distinquish the MP from other 970 processors so it can add some
      new counters specific to the 970MP.
      Signed-off-by: NMike Wolf <mjw@us.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      fecb352f
    • P
      [POWERPC] Distinguish POWER6 partition modes and tell userspace · 974a76f5
      Paul Mackerras 提交于
      This adds code to look at the properties firmware puts in the device
      tree to determine what compatibility mode the partition is in on
      POWER6 machines, and set the ELF aux vector AT_HWCAP and AT_PLATFORM
      entries appropriately.
      
      Specifically, we look at the cpu-version property in the cpu node(s).
      If that contains a "logical" PVR value (of the form 0x0f00000x), we
      call identify_cpu again with this PVR value.  A value of 0x0f000001
      indicates the partition is in POWER5+ compatibility mode, and a value
      of 0x0f000002 indicates "POWER6 architected" mode, with various
      extensions disabled.  We also look for various other properties:
      ibm,dfp, ibm,purr and ibm,spurr.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      974a76f5
    • M
      [POWERPC] cell: Add oprofile support · 18f2190d
      Maynard Johnson 提交于
      Add PPU event-based and cycle-based profiling support to Oprofile for Cell.
      
      Oprofile is expected to collect data on all CPUs simultaneously.
      However, there is one set of performance counters per node.  There are
      two hardware threads or virtual CPUs on each node.  Hence, OProfile must
      multiplex in time the performance counter collection on the two virtual
      CPUs.
      
      The multiplexing of the performance counters is done by a virtual
      counter routine.  Initially, the counters are configured to collect data
      on the even CPUs in the system, one CPU per node.  In order to capture
      the PC for the virtual CPU when the performance counter interrupt occurs
      (the specified number of events between samples has occurred), the even
      processors are configured to handle the performance counter interrupts
      for their node.  The virtual counter routine is called via a kernel
      timer after the virtual sample time.  The routine stops the counters,
      saves the current counts, loads the last counts for the other virtual
      CPU on the node, sets interrupts to be handled by the other virtual CPU
      and restarts the counters, the virtual timer routine is scheduled to run
      again.  The virtual sample time is kept relatively small to make sure
      sampling occurs on both CPUs on the node with a relatively small
      granularity.  Whenever the counters overflow, the performance counter
      interrupt is called to collect the PC for the CPU where data is being
      collected.
      
      The oprofile driver relies on a firmware RTAS call to setup the debug bus
      to route the desired signals to the performance counter hardware to be
      counted.  The RTAS call must set the routing registers appropriately in
      each of the islands to pass the signals down the debug bus as well as
      routing the signals from a particular island onto the bus.  There is a
      second firmware RTAS call to reset the debug bus to the non pass thru
      state when the counters are not in use.
      Signed-off-by: NCarl Love <carll@us.ibm.com>
      Signed-off-by: NMaynard Johnson <mpjohn@us.ibm.com>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      18f2190d
  16. 25 10月, 2006 2 次提交
    • B
      [POWERPC] Support feature fixups in vdso's · 0909c8c2
      Benjamin Herrenschmidt 提交于
      This patch reworks the feature fixup mecanism so vdso's can be fixed up.
      The main issue was that the construct:
      
              .long   label  (or .llong on 64 bits)
      
      will not work in the case of a shared library like the vdso. It will
      generate an empty placeholder in the fixup table along with a reloc,
      which is not something we can deal with in the vdso.
      
      The idea here (thanks Alan Modra !) is to instead use something like:
      
      1:
              .long   label - 1b
      
      That is, the feature fixup tables no longer contain addresses of bits of
      code to patch, but offsets of such code from the fixup table entry
      itself. That is properly resolved by ld when building the .so's. I've
      modified the fixup mecanism generically to use that method for the rest
      of the kernel as well.
      
      Another trick is that the 32 bits vDSO included in the 64 bits kernel
      need to have a table in the 64 bits format. However, gas does not
      support 32 bits code with a statement of the form:
      
              .llong  label - 1b  (Or even just .llong label)
      
      That is, it cannot emit the right fixup/relocation for the linker to use
      to assign a 32 bits address to an .llong field. Thus, in the specific
      case of the 32 bits vdso built as part of the 64 bits kernel, we are
      using a modified macro that generates:
      
              .long   0xffffffff
              .llong  label - 1b
      
      Note that is assumes that the value is negative which is enforced by
      the .lds (those offsets are always negative as the .text is always
      before the fixup table and gas doesn't support emiting the reloc the
      other way around).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0909c8c2
    • B
      [POWERPC] Consolidate feature fixup code · 42c4aaad
      Benjamin Herrenschmidt 提交于
      There are currently two versions of the functions for applying the
      feature fixups, one for CPU features and one for firmware features. In
      addition, they are both in assembly and with separate implementations
      for 32 and 64 bits. identify_cpu() is also implemented in assembly and
      separately for 32 and 64 bits.
      
      This patch replaces them with a pair of C functions. The call sites are
      slightly moved on ppc64 as well to be called from C instead of from
      assembly, though it's a very small change, and thus shouldn't cause any
      problem.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      42c4aaad
  17. 23 10月, 2006 1 次提交
  18. 16 10月, 2006 2 次提交
  19. 04 10月, 2006 1 次提交
  20. 21 9月, 2006 1 次提交
  21. 13 9月, 2006 1 次提交
  22. 25 8月, 2006 1 次提交
    • O
      [POWERPC] Cleanup CPU inits · f39b7a55
      Olof Johansson 提交于
      Cleanup CPU inits a bit more, Geoff Levand already did some earlier.
      
      * Move CPU state save to cpu_setup, since cpu_setup is only ever done
        on cpu 0 on 64-bit and save is never done more than once.
      * Rename __restore_cpu_setup to __restore_cpu_ppc970 and add
        function pointers to the cputable to use instead. Powermac always
        has 970 so no need to check there.
      * Rename __970_cpu_preinit to __cpu_preinit_ppc970 and check PVR before
        calling it instead of in it, it's too early to use cputable.
      * Rename pSeries_secondary_smp_init to generic_secondary_smp_init since
        everyone but powermac and iSeries use it.
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f39b7a55
  23. 01 7月, 2006 1 次提交
  24. 28 6月, 2006 1 次提交
    • K
      powerpc: minor cleanups for mpc86xx · 9ad494f6
      Kumar Gala 提交于
      * Remove duplicated cputable entry for 8641 (matches w/7448)
      * Removed __init from function prototypes in mpc86xx.h
      * Moved pci fixups into board specific code
      * Moved mpc86xx_exclude_device to generic mpc86xx pci code
      * Fixed sparse warnings in mpc86xx_smp.c
      * Removed board specific header include from asm-powerpc/mpc86xx.h
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      9ad494f6
  25. 21 6月, 2006 1 次提交
  26. 15 6月, 2006 1 次提交
  27. 09 6月, 2006 3 次提交
  28. 19 5月, 2006 1 次提交