1. 14 6月, 2007 17 次提交
    • B
      [POWERPC] Remove some useless ifdef's in ptrace · 1b6610d6
      Benjamin Herrenschmidt 提交于
      CHECK_FULL_REGS() exist on both 32 and 64 bits, so there's no need
      to make it conditional on CONFIG_PPC32.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1b6610d6
    • B
      [POWERPC] Uninline common ptrace bits · 865418d8
      Benjamin Herrenschmidt 提交于
      This folds back the ptrace-common.h bits back into ptrace.c and removes
      that file. The FSL SPE bits from ptrace-ppc32.h are folded back in as
      well.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      865418d8
    • B
      [POWERPC] ptrace updates & new, better requests · e17666ba
      Benjamin Herrenschmidt 提交于
      The powerpc ptrace interface is dodgy at best. We have defined our
      "own" versions of GETREGS/SETREGS/GETFPREGS/SETFPREGS that strangely
      take arguments in reverse order from other archs (in addition to having
      different request numbers) and have subtle issue, like not accessing
      all of the registers in their respective categories.
      
      This patch moves the implementation of those to a separate function
      in order to facilitate their deprecation in the future, and provides
      new ptrace requests that mirror the x86 and sparc ones and use the
      same numbers:
      
         PTRACE_GETREGS    : returns an entire pt_regs (the whole thing,
                             not only the 32 GPRs, though that doesn't
                             include the FPRs etc... There's a compat version
                             for 32 bits that returns a 32 bits compatible
                             pt_regs (44 uints)
      
         PTRACE_SETREGS    : sets an entire pt_regs (the whole thing,
                             not only the 32 GPRs, though that doesn't
                             include the FPRs etc... Some registers cannot be
                             written to and will just be dropped, this is the
                             same as with POKEUSR, that is anything above MQ
                             on 32 bits and CCR on 64 bits. There is a compat
                             version as well.
      
         PTRACE_GETFPREGS  : returns all the FP registers -including- the FPSCR
                             that is 33 doubles (regardless of 32/64 bits)
      
         PTRACE_SETFPREGS  : sets all the FP registers -including- the FPSCR
                             that is 33 doubles (regardless of 32/64 bits)
      
      And two that only exist on 64 bits kernels:
      
         PTRACE_GETREGS64  : Same as PTRACE_GETREGS, except there is no compat
                             function, a 32 bits process will obtain the full 64
                             bits registers
      
         PTRACE_SETREGS64  : Same as PTRACE_SETREGS, except there is no compat
                             function, a 32 bits process will set the full 64
                             bits registers
      
      The two later ones makes things easier to have a 32 bits debugger on a
      64 bits program (or on a 32 bits program that uses the full 64 bits of
      the GPRs, which is possible though has issues that will be fixed in a
      later patch).
      
      Finally, while at it, the patch removes a whole bunch of code duplication
      between ptrace32.c and ptrace.c, in large part by having the former call
      into the later for all requests that don't need any special "compat"
      treatment.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e17666ba
    • B
      [POWERPC] ptrace cleanups · acd89828
      Benjamin Herrenschmidt 提交于
      The powerpc ptrace code has some weirdness, like a ptrace-common.h file that
      is actually ppc64 only and some of the 32 bits code ifdef'ed inside ptrace.c.
      
      There are also separate implementations for things like get/set_vrregs for
      32 and 64 bits which is totally unnecessary.
      
      This patch cleans that up a bit by having a ptrace-common.h which contains
      really common code (and makes a lot more code common), and ptrace-ppc32.h and
      ptrace-ppc64.h files that contain the few remaining different bits.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      acd89828
    • B
      [POWERPC] Disable broken PPC_PTRACE_GETFPREGS on 32 bits · 0b3d5c48
      Benjamin Herrenschmidt 提交于
      The handling of PPC_PTRACE_GETFPREGS is broken on 32 bits kernel,
      it will only return half of the registers. Since that call didn't
      initially exist for 32 bits kernel (added recently), rather than
      fixing it, let's just remove it.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0b3d5c48
    • B
      [POWERPC] spufs: Add a "capabilities" file to spu contexts · cbe709c1
      Benjamin Herrenschmidt 提交于
      This adds a "capabilities" file to spu contexts consisting of a
      list of linefeed separated capability names. The current exposed
      capabilities are "sched" (the context is scheduleable) and
      "step" (the context supports single stepping).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NJeremy Kerr <jk@ozlabs.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      cbe709c1
    • B
      [POWERPC] spufs: Add support for SPU single stepping · 05169237
      Benjamin Herrenschmidt 提交于
      This patch adds support for SPU single stepping. The single
      step bit is set in the SPU when the current process is
      being single-stepped via ptrace. The spu then stops and
      returns with a specific flag set and the syscall exit code
      will generate the SIGTRAP.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NJeremy Kerr <jk@ozlabs.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      05169237
    • B
      [POWERPC] Rewrite IO allocation & mapping on powerpc64 · 3d5134ee
      Benjamin Herrenschmidt 提交于
      This rewrites pretty much from scratch the handling of MMIO and PIO
      space allocations on powerpc64.  The main goals are:
      
       - Get rid of imalloc and use more common code where possible
       - Simplify the current mess so that PIO space is allocated and
         mapped in a single place for PCI bridges
       - Handle allocation constraints of PIO for all bridges including
         hot plugged ones within the 2GB space reserved for IO ports,
         so that devices on hotplugged busses will now work with drivers
         that assume IO ports fit in an int.
       - Cleanup and separate tracking of the ISA space in the reserved
         low 64K of IO space. No ISA -> Nothing mapped there.
      
      I booted a cell blade with IDE on PIO and MMIO and a dual G5 so
      far, that's it :-)
      
      With this patch, all allocations are done using the code in
      mm/vmalloc.c, though we use the low level __get_vm_area with
      explicit start/stop constraints in order to manage separate
      areas for vmalloc/vmap, ioremap, and PCI IOs.
      
      This greatly simplifies a lot of things, as you can see in the
      diffstat of that patch :-)
      
      A new pair of functions pcibios_map/unmap_io_space() now replace
      all of the previous code that used to manipulate PCI IOs space.
      The allocation is done at mapping time, which is now called from
      scan_phb's, just before the devices are probed (instead of after,
      which is by itself a bug fix). The only other caller is the PCI
      hotplug code for hot adding PCI-PCI bridges (slots).
      
      imalloc is gone, as is the "sub-allocation" thing, but I do beleive
      that hotplug should still work in the sense that the space allocation
      is always done by the PHB, but if you unmap a child bus of this PHB
      (which seems to be possible), then the code should properly tear
      down all the HPTE mappings for that area of the PHB allocated IO space.
      
      I now always reserve the first 64K of IO space for the bridge with
      the ISA bus on it. I have moved the code for tracking ISA in a separate
      file which should also make it smarter if we ever are capable of
      hot unplugging or re-plugging an ISA bridge.
      
      This should have a side effect on platforms like powermac where VGA IOs
      will no longer work. This is done on purpose though as they would have
      worked semi-randomly before. The idea at this point is to isolate drivers
      that might need to access those and fix them by providing a proper
      function to obtain an offset to the legacy IOs of a given bus.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3d5134ee
    • B
      [POWERPC] unmap_vm_area becomes unmap_kernel_range for the public · c19c03fc
      Benjamin Herrenschmidt 提交于
      This makes unmap_vm_area static and a wrapper around a new
      exported unmap_kernel_range that takes an explicit range instead
      of a vm_area struct.
      
      This makes it more versatile for code that wants to play with kernel
      page tables outside of the standard vmalloc area.
      
      (One example is some rework of the PowerPC PCI IO space mapping
      code that depends on that patch and removes some code duplication
      and horrible abuse of forged struct vm_struct).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c19c03fc
    • L
      [POWERPC] Tweak EEH copyright info · 3c8c90ab
      Linas Vepstas 提交于
      Twiddle the copyright notices. Per current guidelines, the use
      of the (C) or (c) in source code is deprecated.
      Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
      
      ----
       arch/powerpc/platforms/pseries/eeh.c        |    6 +++++-
       arch/powerpc/platforms/pseries/eeh_cache.c  |    3 ++-
       arch/powerpc/platforms/pseries/eeh_driver.c |    6 +++---
       3 files changed, 10 insertions(+), 5 deletions(-)
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3c8c90ab
    • L
      [POWERPC] Remove dead EEH code · 42253a68
      Linas Vepstas 提交于
      Remove some dead code.
      Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
      
      ----
       arch/powerpc/platforms/pseries/eeh.c |    4 +---
       1 file changed, 1 insertion(+), 3 deletions(-)
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      42253a68
    • L
      [POWERPC] Show EEH per-device false positives · 858955bd
      Linas Vepstas 提交于
      Track and report the number of times we read an all-1s value (0xff,
      0xffff or 0xffffffff) from each device which is valid data, not
      indicating EEH isolation.
      Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
      
      ----
       arch/powerpc/platforms/pseries/eeh.c       |    5 +++++
       arch/powerpc/platforms/pseries/eeh_sysfs.c |    3 +++
       include/asm-powerpc/pci-bridge.h           |    1 +
       3 files changed, 9 insertions(+)
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      858955bd
    • L
      [POWERPC] Add EEH sysfs blinkenlights · e1d04c97
      Linas Vepstas 提交于
      Add sysfs blinkenlights for EEH statistics.  Shuffle the
      eeh_add_device_tree() call so that it appears in the correct
      sequence.
      Signed-off-by: NLinas Vepstas <linas@austin.ibm.com>
      
      ----
       arch/powerpc/platforms/pseries/Makefile    |    2
       arch/powerpc/platforms/pseries/eeh.c       |    4 +
       arch/powerpc/platforms/pseries/eeh_cache.c |    2
       arch/powerpc/platforms/pseries/eeh_sysfs.c |   84 +++++++++++++++++++++++++++++
       arch/powerpc/platforms/pseries/pci_dlpar.c |    7 +-
       include/asm-powerpc/ppc-pci.h              |    3 +
       6 files changed, 98 insertions(+), 4 deletions(-)
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e1d04c97
    • J
      [POWERPC] Move common code out of if/else · 3f1df7a2
      Jon Tollefson 提交于
      Move common code out of if/else.
      Signed-off-by: NJon Tollefson <kniht@linux.vnet.ibm.com>
      ----
      
      hash_native_64.c |    3 +--
       1 files changed, 1 insertion(+), 2 deletions(-)
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3f1df7a2
    • S
      [POWERPC] Fix VDSO compile warning · 31fe5bf6
      Segher Boessenkool 提交于
      Maybe the type should have been char[] instead of __u8[]
      in the first place, but this will do.
      Signed-off-by: NSegher Boessenkool <segher@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      31fe5bf6
    • M
      [POWERPC] Fix console output getting dropped on platforms without udbg_putc · 220ddc08
      Milton Miller 提交于
      Previously, registering this early console would just result
      in dropping early buffered printk output until a udbg_putc
      was registered.
      
      However, commit 69331af7
      clears the CON_PRINTBUFFER flag on the main console when a
      CON_BOOT (early) console has been registered, resulting in
      the buffered messages never being displayed to the user.
      
      This fixes the problem by making sure we don't register udbg_console
      on platforms that don't implement udbg_putc.
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Acked-by: NMark A. Greer <mgreer@mvista.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      220ddc08
    • P
      [POWERPC] Fix per-cpu allocation on oldworld SMP powermacs · c63c4faa
      Paul Mackerras 提交于
      The per-cpu area(a) for the secondary CPU(s) isn't getting allocated
      on old SMP powermacs that don't have the secondary CPU(s) listed in
      the device tree, as per-cpu areas are now only allocated for CPUs in
      the cpu_possible_map, and we aren't setting the bits for the secondary
      CPU(s) until smp_prepare_cpus(), which is after per-cpu allocation.
      Therefore this sets the bits for CPUs 1..3 in cpu_possible_map in
      pmac_setup_arch, so they get per-cpu data allocated.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c63c4faa
  2. 12 6月, 2007 10 次提交
  3. 09 6月, 2007 6 次提交
  4. 08 6月, 2007 5 次提交
  5. 07 6月, 2007 2 次提交