1. 08 2月, 2007 1 次提交
  2. 11 12月, 2006 1 次提交
    • J
      [POWERPC] Generic BUG for powerpc · 73c9ceab
      Jeremy Fitzhardinge 提交于
      This makes powerpc use the generic BUG machinery.  The biggest reports the
      function name, since it is redundant with kallsyms, and not needed in general.
      
      There is an overall reduction of code, since module_32/64 duplicated several
      functions.
      
      Unfortunately there's no way to tell gcc that BUG won't return, so the BUG
      macro includes a goto loop.  This will generate a real jmp instruction, which
      is never used.
      
      [akpm@osdl.org: build fix]
      [paulus@samba.org: remove infinite loop in BUG_ON]
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Hugh Dickens <hugh@veritas.com>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      73c9ceab
  3. 04 12月, 2006 12 次提交
  4. 25 10月, 2006 2 次提交
    • M
      [POWERPC] add support for dumping spu info from xmon · a8984970
      Michael Ellerman 提交于
      This patch adds a command to xmon for dumping information about
      spu structs. The command is 'sf' for "spu fields" perhaps, and
      takes the spu number as an argument. This is the same value as the
      spu->number field, or the "phys-id" value of a context when it is
      bound to a physical spu.
      
      We try to catch memory errors as we dump each field, hopefully this
      will make the command reasonably robust, but YMMV. If people see a
      need we can easily add more fields to the dump in future.
      
      Output looks something like this:
      
      0:mon> sf 0
      Dumping spu fields at address c00000001ffd9e80:
        number                  = 0x0
        name                    = spe
        devnode->full_name      = /cpus/PowerPC,BE@0/spes/spe@0
        nid                     = 0x0
        local_store_phys        = 0x20000000000
        local_store             = 0xd0000800801e0000
        ls_size                 = 0x0
        isrc                    = 0x4
        node                    = 0x0
        flags                   = 0x0
        dar                     = 0x0
        dsisr                   = 0x0
        class_0_pending         = 0
        irqs[0]                 = 0x16
        irqs[1]                 = 0x17
        irqs[2]                 = 0x24
        slb_replace             = 0x0
        pid                     = 0
        prio                    = 0
        mm                      = 0x0000000000000000
        ctx                     = 0x0000000000000000
        rq                      = 0x0000000000000000
        timestamp               = 0x0000000000000000
        problem_phys            = 0x20000040000
        problem                 = 0xd000080080220000
        problem->spu_runcntl_RW = 0x0
        problem->spu_status_R   = 0x0
        problem->spu_npc_RW     = 0x0
        priv1                   = 0xd000080080240000
        priv1->mfc_sr1_RW       = 0x33
        priv2                   = 0xd000080080250000
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a8984970
    • M
      [POWERPC] add support for stopping spus from xmon · ff8a8f25
      Michael Ellerman 提交于
      This patch adds support for stopping, and restarting, spus
      from xmon. We use the spu master runcntl bit to stop execution,
      this is apparently the "right" way to control spu execution and
      spufs will be changed in the future to use this bit.
      
      Testing has shown that to restart execution we have to turn the
      master runcntl bit on and also rewrite the spu runcntl bit, even
      if it is already set to 1 (running).
      
      Stopping spus is triggered by the xmon command 'ss' - "spus stop"
      perhaps. Restarting them is triggered via 'sr'. Restart doesn't
      start execution on spus unless they were running prior to being
      stopped by xmon.
      
      Walking the spu->full_list in xmon after a panic, would mean
      corruption of any spu struct would make all the others
      inaccessible. To avoid this, and also to make the next patch
      easier, we cache pointers to all spus during boot.
      
      We attempt to catch and recover from errors while stopping and
      restarting the spus, but as with most xmon functionality there are
      no guarantees that performing these operations won't crash xmon
      itself.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NArnd Bergmann <arnd.bergmann@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ff8a8f25
  5. 10 10月, 2006 1 次提交
  6. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  7. 04 10月, 2006 2 次提交
  8. 13 9月, 2006 1 次提交
  9. 01 7月, 2006 1 次提交
  10. 26 6月, 2006 1 次提交
  11. 17 3月, 2006 1 次提交
  12. 12 1月, 2006 1 次提交
  13. 09 1月, 2006 3 次提交
    • M
      [PATCH] powerpc: Add a is_kernel_addr() macro · 51fae6de
      Michael Ellerman 提交于
      There's a bunch of code that compares an address with KERNELBASE to see if
      it's a "kernel address", ie. >= KERNELBASE. The proper test is actually to
      compare with PAGE_OFFSET, since we're going to change KERNELBASE soon.
      
      So replace all of them with an is_kernel_addr() macro that does that.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      51fae6de
    • B
      [PATCH] powerpc: udbg updates · bb6b9b28
      Benjamin Herrenschmidt 提交于
      The udbg low level io layer has an issue with udbg_getc() returning a
      char (unsigned on ppc) instead of an int, thus the -1 if you had no
      available input device could end up turned into 0xff, filling your
      display with bogus characters. This fixes it, along with adding a little
      blob to xmon to do a delay before exiting when getting an EOF and fixing
      the detection of ADB keyboards in udbg_adb.c
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      bb6b9b28
    • B
      [PATCH] powerpc: Unify udbg (#2) · 51d3082f
      Benjamin Herrenschmidt 提交于
      This patch unifies udbg for both ppc32 and ppc64 when building the
      merged achitecture. xmon now has a single "back end". The powermac udbg
      stuff gets enriched with some ADB capabilities and btext output. In
      addition, the early_init callback is now called on ppc32 as well,
      approx. in the same order as ppc64 regarding device-tree manipulations.
      The init sequences of ppc32 and ppc64 are getting closer, I'll unify
      them in a later patch.
      
      For now, you can force udbg to the scc using "sccdbg" or to btext using
      "btextdbg" on powermacs. I'll implement a cleaner way of forcing udbg
      output to something else than the autodetected OF output device in a
      later patch.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      51d3082f
  14. 14 11月, 2005 1 次提交
    • A
      [PATCH] powerpc-xmon-build-fix · 4694ca02
      Andrew Morton 提交于
      arch/powerpc/xmon/xmon.c:525: error: syntax error before "xmon_irq"
      arch/powerpc/xmon/xmon.c:526: warning: return type defaults to `int'
      arch/powerpc/xmon/xmon.c: In function `xmon_irq':
      arch/powerpc/xmon/xmon.c:532: error: `IRQ_HANDLED' undeclared (first use in this function)
      arch/powerpc/xmon/xmon.c:532: error: (Each undeclared identifier is reported only once
      arch/powerpc/xmon/xmon.c:532: error: for each function it appears in.)
      
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4694ca02
  15. 11 11月, 2005 1 次提交
  16. 10 11月, 2005 2 次提交
    • P
      powerpc: 32-bit fixes for xmon · e1449ed9
      Paul Mackerras 提交于
      This makes the memory examine/change command print the address as
      8 digits instead of 16, and makes the memory dump command print
      4 4-byte values per line instead of 2 8-byte values.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e1449ed9
    • 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
  17. 08 11月, 2005 1 次提交
  18. 29 10月, 2005 1 次提交
  19. 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