1. 29 Aug, 2013 6 commits
    • Vineet Gupta's avatar
      ARC: gdbserver breakage in Big-Endian configuration #2 · 16a06df2
      Vineet Gupta authored
      [Based on mainline commit 352c1d95: "ARC: stop using
      pt_regs->orig_r8"]
      
      Stop using orig_r8 as it could get clobbered by ST in trap_with_param,
      and further it is semantically not needed either.
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      16a06df2
    • Vineet Gupta's avatar
      ARC: gdbserver breakage in Big-Endian configuration #1 · 9b2c750d
      Vineet Gupta authored
      [Based on mainline commit 502a0c77: "ARC: pt_regs update #5"]
      
      gdbserver needs @stop_pc, served by ptrace, but fetched from pt_regs
      differently, based on in_brkpt_traps(), which in turn relies on
      additional machine state in pt_regs->event bitfield.
      
              unsigned long orig_r8:16, event:16;
      
      For big endian config, this macro was returning false, despite being in
      breakpoint Trap exception, causing wrong @stop_pc to be returned to gdb.
      
      Issue #1: In BE, @event above is at offset 2 in word, while a STW insn
                at offset 0 was used to update it. Resort to using ST insn
      	  which updates the half-word at right location.
      
      Issue #2: The union involving bitfields causes all the members to be
      	  laid out at offset 0. So with fix #1 above, ASM was now
      	  updating at offset 2, "C" code was still referencing at
      	  offset 0. Fixed by wrapping bitfield in a struct.
      Reported-by: default avatarNoam Camus <noamc@ezchip.com>
      Tested-by: default avatarAnton Kolesov <akolesov@synopsys.com>
      Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9b2c750d
    • Rafael J. Wysocki's avatar
      ACPI: Try harder to resolve _ADR collisions for bridges · 6e4fdb80
      Rafael J. Wysocki authored
      commit 60f75b8e upstream.
      
      In theory, under a given ACPI namespace node there should be only
      one child device object with _ADR whose value matches a given bus
      address exactly.  In practice, however, there are systems in which
      multiple child device objects under a given parent have _ADR matching
      exactly the same address.  In those cases we use _STA to determine
      which of the multiple matching devices is enabled, since some systems
      are known to indicate which ACPI device object to associate with the
      given physical (usually PCI) device this way.
      
      Unfortunately, as it turns out, there are systems in which many
      device objects under the same parent have _ADR matching exactly the
      same bus address and none of them has _STA, in which case they all
      should be regarded as enabled according to the spec.  Still, if
      those device objects are supposed to represent bridges (e.g. this
      is the case for device objects corresponding to PCIe ports), we can
      try harder and skip the ones that have no child device objects in the
      ACPI namespace.  With luck, we can avoid using device objects that we
      are not expected to use this way.
      
      Although this only works for bridges whose children also have ACPI
      namespace representation, it is sufficient to address graphics
      adapter detection issues on some systems, so rework the code finding
      a matching device ACPI handle for a given bus address to implement
      this idea.
      
      Introduce a new function, acpi_find_child(), taking three arguments:
      the ACPI handle of the device's parent, a bus address suitable for
      the device's bus type and a bool indicating if the device is a
      bridge and make it work as outlined above.  Reimplement the function
      currently used for this purpose, acpi_get_child(), as a call to
      acpi_find_child() with the last argument set to 'false' and make
      the PCI subsystem use acpi_find_child() with the bridge information
      passed as the last argument to it.  [Lan Tianyu notices that it is
      not sufficient to use pci_is_bridge() for that, because the device's
      subordinate pointer hasn't been set yet at this point, so use
      hdr_type instead.]
      
      This change fixes a regression introduced inadvertently by commit
      33f767d7 (ACPI: Rework acpi_get_child() to be more efficient) which
      overlooked the fact that for acpi_walk_namespace() "post-order" means
      "after all children have been visited" rather than "on the way back",
      so for device objects without children and for namespace walks of
      depth 1, as in the acpi_get_child() case, the "post-order" callbacks
      ordering is actually the same as the ordering of "pre-order" ones.
      Since that commit changed the namespace walk in acpi_get_child() to
      terminate after finding the first matching object instead of going
      through all of them and returning the last one, it effectively
      changed the result returned by that function in some rare cases and
      that led to problems (the switch from a "pre-order" to a "post-order"
      callback was supposed to prevent that from happening, but it was
      ineffective).
      
      As it turns out, the systems where the change made by commit
      33f767d7 actually matters are those where there are multiple ACPI
      device objects representing the same PCIe port (which effectively
      is a bridge).  Moreover, only one of them, and the one we are
      expected to use, has child device objects in the ACPI namespace,
      so the regression can be addressed as described above.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=60561Reported-by: default avatarPeter Wu <lekensteyn@gmail.com>
      Tested-by: default avatarVladimir Lalov <mail@vlalov.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: Peter Wu <lekensteyn@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6e4fdb80
    • Jeff Wu's avatar
      ACPI: add _STA evaluation at do_acpi_find_child() · 2ac3b5e4
      Jeff Wu authored
      commit c7d9ca90 upstream.
      
      Once do_acpi_find_child() has found the first matching handle, it
      makes the acpi_get_child() loop stop and return that handle.  On some
      platforms, though, there are multiple devices with the same value of
      "_ADR" in the same namespace scope, and if one of them is enabled,
      the others will be disabled.  For example:
      
       Address : 0x1FFFF ; path : SB_PCI0.SATA.DEV0
       Address : 0x1FFFF ; path : SB_PCI0.SATA.DEV1
       Address : 0x1FFFF ; path : SB_PCI0.SATA.DEV2
      
      If DEV0 and DEV1 are disabled and DEV2 is enabled, the handle of DEV2
      should be returned, but actually the function always returns the
      handle of DEV0.
      
      To address that issue, make do_acpi_find_child() evaluate _STA to
      check the device status.  If a matching device object exists, but is
      disabled, acpi_get_child() will continue to walk the namespace in the
      hope of finding an enabled one.  If one is found, its handle will be
      returned, but otherwise the function will return the handle of the
      disabled object found before (in case it is enabled going forward).
      
      [rjw: Changelog]
      Signed-off-by: default avatarJeff Wu <zlinuxkernel@gmail.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Peter Wu <lekensteyn@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2ac3b5e4
    • Johannes Berg's avatar
      mac80211: don't wait for TX status forever · e0f23666
      Johannes Berg authored
      commit cb236d2d upstream.
      
      TX status notification can get lost, or the frames could
      get stuck on the queue, so don't wait for the callback
      from the driver forever and instead time out after half
      a second.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      e0f23666
    • Dominik Dingel's avatar
      KVM: s390: move kvm_guest_enter,exit closer to sie · 6904756d
      Dominik Dingel authored
      commit 2b29a9fd upstream.
      
      Any uaccess between guest_enter and guest_exit could trigger a page fault,
      the page fault handler would handle it as a guest fault and translate a
      user address as guest address.
      Signed-off-by: default avatarDominik Dingel <dingel@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      6904756d
  2. 20 Aug, 2013 34 commits