1. 21 3月, 2011 5 次提交
    • M
      powerpc/ptrace: Remove BUG_ON when full register set not available · a71f5d5d
      Mike Wolf 提交于
      In some cases during a threaded core dump not all the threads will have
      a full register set. This happens when the signal causing the core dump
      races with a thread exiting.  The race happens when the exiting thread
      has entered the kernel for the last time before the signal arrives, but
      doesn't get far enough through the exit code to avoid being included
      in the core dump.
      
      So we get a thread included in the core dump which is never going to go
      out to userspace again and only has a partial register set recorded
      
      Normally we would catch each thread as it is about to go into userspace
      and capture the full register set then.
      
      However, this exiting thread is never going to go out to userspace
      again, so we have no way to capture its full register set.  It doesn't
      really matter, though, as this is a thread which is effectively
      already dead.
      
      So instead of hitting a BUG() in this case (a really bad choice of
      action in the first place), we use a poison value for the register
      values.
      
      [BenH]: Some cosmetic/stylistic changes and fix build on ppc32
      Signed-off-by: NMike Wolf <mjw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a71f5d5d
    • M
      powerpc: Factoring mpic cpu id fetching into a function · d6a2639b
      Meador Inge 提交于
      The following code snippet:
      
      	unsigned int cpu = 0;
      	if (mpic->flags & MPIC_PRIMARY)
      		cpu = hard_smp_processor_id();
      
      is seen in several places in the 'mpic.c' code.  This changeset factors
      that pattern out into a helper function called 'mpic_processor_id'.
      Signed-off-by: NMeador Inge <meador_inge@mentor.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      d6a2639b
    • M
      powerpc: Make MPIC honor the "pic-no-reset" device tree property · dfec2202
      Meador Inge 提交于
      This property, defined in the Open PIC binding, tells the kernel not to use
      the reset bit in the global configuration register.  Additionally, its
      presence mandates that only sources which are actually used (i.e. appear in
      the device tree) should have their VECPRI bits initialized.
      
      Although, "pic-no-reset" can be used for the same use cases that
      "protected-sources" is covering, the "protected-sources" implementation was
      left completely intact.  This is a more pragmatic approach as there are
      already several existing systems which use protected sources.  If
      "pic-no-reset" *and* "protected-sources" are both used, however, then
      "pic-no-reset" takes precedence in terms of the init behavior and the
      sanity checks done by protected sources will still take place.
      Signed-off-by: NMeador Inge <meador_inge@mentor.com>
      Cc: Hollis Blanchard <hollis_blanchard@mentor.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      dfec2202
    • M
      powerpc: Document the Open PIC device tree binding · a99eff39
      Meador Inge 提交于
      This binding documents several properties that have been in use for quite
      some time, and adds one new property 'pic-no-reset', which controls the
      runtime initialization behavior of the PIC.  More specifically, the presence
      of 'pic-no-reset' mandates that the PIC shall not be reset during runtime
      initialization and that any initialization related to interrupt sources
      shall be limited to sources explicitly referenced in the device tree.  This
      functionality is useful in AMP systems where multiple OSes are sharing the
      PIC and the reinitialization of the PIC can interfere with OSes that are
      already up and running.
      
      The interrupt specifier definition is based off of Stuart Yoder's FSL MPIC
      binding.
      Signed-off-by: NMeador Inge <meador_inge@mentor.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Stuart Yoder <stuart.yoder@freescale.com>
      Cc: Hollis Blanchard <hollis_blanchard@mentor.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a99eff39
    • B
      powerpc/pci: Fix crash in PCI code on ppc64 when matching device nodes · 90407c99
      Benjamin Herrenschmidt 提交于
      Commit b5d937de has a bug which causes
      basically a NULL dereference in the PCI code during boot on ppc64
      machines.
      
      fetch_dev_dn() is called when dev->dev.of_node is NULL, so using that
      as the starting point for the search makes no sense. It should instead
      start from the device node of the PHB.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      90407c99
  2. 20 3月, 2011 1 次提交
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · a952baa0
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (64 commits)
        Input: tsc2005 - remove 'disable' sysfs attribute
        Input: tsc2005 - add open/close
        Input: tsc2005 - handle read errors from SPI layer
        Input: tsc2005 - do not rearm timer in hardirq handler
        Input: tsc2005 - don't use work for 'pen up' handling
        Input: tsc2005 - do not use 0 in place of NULL
        Input: tsc2005 - use true/false for boolean variables
        Input: tsc2005 - hide selftest attribute if we can't reset
        Input: tsc2005 - rework driver initialization code
        Input: tsc2005 - set up bus type in input device
        Input: tsc2005 - set up parent device
        Input: tsc2005 - clear driver data after unbinding
        Input: tsc2005 - add module description
        Input: tsc2005 - remove driver banner message
        Input: tsc2005 - remove incorrect module alias
        Input: tsc2005 - convert to using dev_pm_ops
        Input: tsc2005 - use spi_get/set_drvdata()
        Input: introduce tsc2005 driver
        Input: xen-kbdfront - move to drivers/input/misc
        Input: xen-kbdfront - add grant reference for shared page
        ...
      a952baa0
  3. 19 3月, 2011 34 次提交