1. 24 4月, 2007 2 次提交
  2. 07 2月, 2007 2 次提交
  3. 09 12月, 2006 1 次提交
  4. 08 12月, 2006 1 次提交
    • 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
  5. 04 12月, 2006 4 次提交
    • S
      [POWERPC] Fix cputable.h for combined build · 0470466d
      Stephen Rothwell 提交于
      Remove CPU_FTR_16M_PAGE from the cupfeatures mask at runtime on iSeries.
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0470466d
    • M
      [POWERPC] Make 64-bit cpu features defined on 32-bit · 0b8e2e13
      Michael Ellerman 提交于
      It saves #ifdef'ing in callers if we at least define the 64-bit cpu
      features for 32-bit also.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      0b8e2e13
    • 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
  6. 25 10月, 2006 4 次提交
    • B
      [POWERPC] Cell timebase bug workaround · 859deea9
      Benjamin Herrenschmidt 提交于
      The Cell CPU timebase has an erratum. When reading the entire 64 bits
      of the timebase with one mftb instruction, there is a handful of cycles
      window during which one might read a value with the low order 32 bits
      already reset to 0x00000000 but the high order bits not yet incremeted
      by one. This fixes it by reading the timebase again until the low order
      32 bits is no longer 0. That might introduce occasional latencies if
      hitting mftb just at the wrong time, but no more than 70ns on a cell
      blade, and that was considered acceptable.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      859deea9
    • 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] Support nested cpu feature sections · 7aeb7324
      Benjamin Herrenschmidt 提交于
      This patch adds some macros that can be used with an explicit label in
      order to nest cpu features. This should be used very careful but is
      necessary for the upcoming cell TB fixup.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7aeb7324
    • 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
  7. 13 9月, 2006 2 次提交
  8. 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
  9. 28 6月, 2006 1 次提交
  10. 18 6月, 2006 1 次提交
  11. 15 6月, 2006 1 次提交
  12. 09 6月, 2006 2 次提交
    • P
      [PATCH] powerpc: Implement support for setting little-endian mode via prctl · fab5db97
      Paul Mackerras 提交于
      This adds the PowerPC part of the code to allow processes to change
      their endian mode via prctl.
      
      This also extends the alignment exception handler to be able to fix up
      alignment exceptions that occur in little-endian mode, both for
      "PowerPC" little-endian and true little-endian.
      
      We always enter signal handlers in big-endian mode -- the support for
      little-endian mode does not amount to the creation of a little-endian
      user/kernel ABI.  If the signal handler returns, the endian mode is
      restored to what it was when the signal was delivered.
      
      We have two new kernel CPU feature bits, one for PPC little-endian and
      one for true little-endian.  Most of the classic 32-bit processors
      support PPC little-endian, and this is reflected in the CPU feature
      table.  There are two corresponding feature bits reported to userland
      in the AT_HWCAP aux vector entry.
      
      This is based on an earlier patch by Anton Blanchard.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      fab5db97
    • M
      [PATCH] powerpc: oprofile support for POWER6 · e78dbc80
      Michael Neuling 提交于
      POWER6 moves some of the MMCRA bits and also requires some bits to be
      cleared each PMU interrupt.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Acked-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e78dbc80
  13. 29 4月, 2006 1 次提交
  14. 27 3月, 2006 1 次提交
  15. 22 3月, 2006 1 次提交
  16. 03 3月, 2006 1 次提交
  17. 24 2月, 2006 2 次提交
    • P
      powerpc: Implement accurate task and CPU time accounting · c6622f63
      Paul Mackerras 提交于
      This implements accurate task and cpu time accounting for 64-bit
      powerpc kernels.  Instead of accounting a whole jiffy of time to a
      task on a timer interrupt because that task happened to be running at
      the time, we now account time in units of timebase ticks according to
      the actual time spent by the task in user mode and kernel mode.  We
      also count the time spent processing hardware and software interrupts
      accurately.  This is conditional on CONFIG_VIRT_CPU_ACCOUNTING.  If
      that is not set, we do tick-based approximate accounting as before.
      
      To get this accurate information, we read either the PURR (processor
      utilization of resources register) on POWER5 machines, or the timebase
      on other machines on
      
      * each entry to the kernel from usermode
      * each exit to usermode
      * transitions between process context, hard irq context and soft irq
        context in kernel mode
      * context switches.
      
      On POWER5 systems with shared-processor logical partitioning we also
      read both the PURR and the timebase at each timer interrupt and
      context switch in order to determine how much time has been taken by
      the hypervisor to run other partitions ("steal" time).  Unfortunately,
      since we need values of the PURR on both threads at the same time to
      accurately calculate the steal time, and since we can only calculate
      steal time on a per-core basis, the apportioning of the steal time
      between idle time (time which we ceded to the hypervisor in the idle
      loop) and actual stolen time is somewhat approximate at the moment.
      
      This is all based quite heavily on what s390 does, and it uses the
      generic interfaces that were added by the s390 developers,
      i.e. account_system_time(), account_user_time(), etc.
      
      This patch doesn't add any new interfaces between the kernel and
      userspace, and doesn't change the units in which time is reported to
      userspace by things such as /proc/stat, /proc/<pid>/stat, getrusage(),
      times(), etc.  Internally the various task and cpu times are stored in
      timebase units, but they are converted to USER_HZ units (1/100th of a
      second) when reported to userspace.  Some precision is therefore lost
      but there should not be any accumulating error, since the internal
      accumulation is at full precision.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c6622f63
    • K
      [PATCH] powerpc: Enable coherency for all pages on 83xx to fix PCI data corruption · 1775dbbc
      Kumar Gala 提交于
      On the 83xx platform to ensure the PCI inbound memory is handled properly we
      have to turn on coherency for all pages in the MMU.  Otherwise we see
      corruption if inbound "prefetching/streaming" is enabled on the PCI controller.
      Signed-off-by: NRandy Vinson <rvinson@mvista.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1775dbbc
  18. 14 1月, 2006 2 次提交
    • A
      [PATCH] powerpc: oprofile cpu type names clash with other code · 7a45fb19
      Andy Whitcroft 提交于
      In 2.6.15-git6 a change was commited in the oprofile support in
      the powerpc architecture.  It introduced the powerpc_oprofile_type
      which contains the define G4.  This causes a name clash with the
      existing wacom usb tablet driver.
      
            CC [M]  drivers/usb/input/wacom.o
          drivers/usb/input/wacom.c:98: error: conflicting types for `G4'
          include/asm/cputable.h:37: error: previous declaration of `G4'
            CC [M]  drivers/usb/mon/mon_text.o
          make[3]: *** [drivers/usb/input/wacom.o] Error 1
          make[2]: *** [drivers/usb/input] Error 2
      
      The elements of an enum declared in global scope are effectivly
      global identifiers themselves.  As such we need to ensure the names
      are unique.  This patch updates the later oprofile support to use
      unique names.
      Signed-off-by: NAndy Whitcroft <apw@shadowen.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7a45fb19
    • P
      powerpc: Provide a suitable AT_PLATFORM value · 80f15dc7
      Paul Mackerras 提交于
      The glibc folks want to use AT_PLATFORM to select between possible
      alternative versions of shared libraries.  This commit makes the kernel
      supply an AT_PLATFORM string that indicates what class of processor
      we are running on.  Processors with the same set of user-level
      instructions and roughly the same instruction scheduling characteristics
      are given the same AT_PLATFORM value; for example, 821, 823 and 860
      are all reported as "ppc823", and 7447, 7447A, 7448, 7450, 7451, 7455
      are all called "ppc7450".
      
      The intention is that the AT_PLATFORM values match the values that
      gcc accepts for the -mcpu= option.  For values which are numeric
      (e.g. -mcpu=750), "ppc" has been prepended.
      
      This also adds a PPC_FEATURE_BOOKE bit to the AT_HWCAP value and sets
      it for the 440 family and the Freescale 85xx family.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      80f15dc7
  19. 09 1月, 2006 4 次提交
  20. 18 11月, 2005 1 次提交
  21. 10 11月, 2005 2 次提交
    • P
      powerpc: Add user CPU features for POWER4, POWER5, POWER5+ and Cell. · a7ddc5e8
      Paul Mackerras 提交于
      This is at the request of the glibc folks, who want to use these bits
      to select libraries optimized for the microarchitecture and new
      instructions in these processors.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a7ddc5e8
    • D
      [PATCH] powerpc: Consolidate asm compatibility macros · 3ddfbcf1
      David Gibson 提交于
      This patch consolidates macros used to generate assembly for
      compatibility across different CPUs or configs.  A new header,
      asm-powerpc/asm-compat.h contains the main compatibility macros.  It
      uses some preprocessor magic to make the macros suitable both for use
      in .S files, and in inline asm in .c files.  Headers (bitops.h,
      uaccess.h, atomic.h, bug.h) which had their own such compatibility
      macros are changed to use asm-compat.h.
      
      ppc_asm.h is now for use in .S files *only*, and a #error enforces
      that.  As such, we're a lot more careless about namespace pollution
      here than in asm-compat.h.
      
      While we're at it, this patch adds a call to the PPC405_ERR77 macro in
      futex.h which should have had it already, but didn't.
      
      Built and booted on pSeries, Maple and iSeries (ARCH=powerpc).  Built
      for 32-bit powermac (ARCH=powerpc) and Walnut (ARCH=ppc).
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3ddfbcf1
  22. 07 11月, 2005 1 次提交
    • B
      [PATCH] ppc64: support 64k pages · 3c726f8d
      Benjamin Herrenschmidt 提交于
      Adds a new CONFIG_PPC_64K_PAGES which, when enabled, changes the kernel
      base page size to 64K.  The resulting kernel still boots on any
      hardware.  On current machines with 4K pages support only, the kernel
      will maintain 16 "subpages" for each 64K page transparently.
      
      Note that while real 64K capable HW has been tested, the current patch
      will not enable it yet as such hardware is not released yet, and I'm
      still verifying with the firmware architects the proper to get the
      information from the newer hypervisors.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3c726f8d
  23. 13 10月, 2005 1 次提交
  24. 06 10月, 2005 1 次提交
    • P
      powerpc: Merge in the ppc64 version of the prom code. · 9b6b563c
      Paul Mackerras 提交于
      This brings in the ppc64 version of prom_init.c, prom.c and btext.c
      and makes them work for ppc32.  This also brings in the new calling
      convention, where the first entry to the kernel (with r5 != 0) goes
      to the prom_init code, which then restarts from the beginning (with
      r5 == 0) after it has done its stuff.
      
      For now this also brings in the ppc32 version of setup.c.  It also
      merges lmb.h.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      9b6b563c