1. 23 11月, 2013 5 次提交
    • R
      ACPI / hotplug: Make ACPI PCI root hotplug use common hotplug code · 3338db00
      Rafael J. Wysocki 提交于
      Rework the common ACPI device hotplug code so that it is suitable
      for PCI host bridge hotplug and switch the PCI host bridge scan
      handler to using the common hotplug code.
      
      This allows quite a few lines of code that are not necessary any more
      to be dropped from the PCI host bridge scan handler and removes
      arbitrary differences in behavior between PCI host bridge hotplug
      and ACPI-based hotplug of other components, like CPUs and memory.
      
      Also acpi_device_hotplug() can be static now.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      3338db00
    • R
      ACPI / hotplug: Introduce common hotplug function acpi_device_hotplug() · c27b2c33
      Rafael J. Wysocki 提交于
      Modify the common ACPI device hotplug code to always queue up the
      same function, acpi_device_hotplug(), using acpi_hotplug_execute()
      and make the PCI host bridge hotplug code use that function too for
      device hot removal.
      
      This allows some code duplication to be reduced and a race condition
      where the relevant ACPI handle may become invalid between the
      notification handler and the function queued up by it via
      acpi_hotplug_execute() to be avoided.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      c27b2c33
    • R
      ACPI / hotplug: Do not fail bus and device checks for disabled hotplug · 1ceaba05
      Rafael J. Wysocki 提交于
      If the scan handler for the given device has hotplug.enabled
      unset, it doesn't really make sense to fail bus check and device
      check notifications.
      
      First, bus check may not have anything to do with the device it is
      signaled for, but it may concern another device on the bus below
      this one.  For this reason, bus check notifications should not be
      failed if hotplug is disabled for the target device.
      
      Second, device check notifications are signaled only after a device
      has already appeared (or disappeared), so failing it can only prevent
      scan handlers and drivers from attaching to that (already existing)
      device, which is not very useful.
      
      Consequently, if device hotplug is disabled through the device's
      scan handler, fail eject request notifications only.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      1ceaba05
    • R
      ACPI / scan: Add acpi_device objects for all device nodes in the namespace · 202317a5
      Rafael J. Wysocki 提交于
      Modify the ACPI namespace scanning code to register a struct
      acpi_device object for every namespace node representing a device,
      processor and so on, even if the device represented by that namespace
      node is reported to be not present and not functional by _STA.
      
      There are multiple reasons to do that.  First of all, it avoids
      quite a lot of overhead when struct acpi_device objects are
      deleted every time acpi_bus_trim() is run and then added again
      by a subsequent acpi_bus_scan() for the same scope, although the
      namespace objects they correspond to stay in memory all the time
      (which always is the case on a vast majority of systems).
      
      Second, it will allow user space to see that there are namespace
      nodes representing devices that are not present at the moment and may
      be added to the system.  It will also allow user space to evaluate
      _SUN for those nodes to check what physical slots the "missing"
      devices may be put into and it will make sense to add a sysfs
      attribute for _STA evaluation after this change (that will be
      useful for thermal management on some systems).
      
      Next, it will help to consolidate the ACPI hotplug handling among
      subsystems by making it possible to store hotplug-related information
      in struct acpi_device objects in a standard common way.
      
      Finally, it will help to avoid a race condition related to the
      deletion of ACPI namespace nodes.  Namely, namespace nodes may be
      deleted as a result of a table unload triggered by _EJ0 or _DCK.
      If a hotplug notification for one of those nodes is triggered
      right before the deletion and it executes a hotplug callback
      via acpi_hotplug_execute(), the ACPI handle passed to that
      callback may be stale when the callback actually runs.  One way
      to work around that is to always pass struct acpi_device pointers
      to hotplug callbacks after doing a get_device() on the objects in
      question which eliminates the use-after-free possibility (the ACPI
      handles in those objects are invalidated by acpi_scan_drop_device(),
      so they will trigger ACPICA errors on attempts to use them).
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      202317a5
    • R
      ACPI / scan: Define non-empty device removal handler · d783156e
      Rafael J. Wysocki 提交于
      If an ACPI namespace node is removed (usually, as a result of a
      table unload), and there is a data object attached to that node,
      acpi_ns_delete_node() executes the removal handler submitted to
      acpi_attach_data() for that object.  That handler is currently empty
      for struct acpi_device objects, so it is necessary to detach those
      objects from the corresponding ACPI namespace nodes in advance every
      time a table unload may happen.  That is cumbersome and inefficient
      and leads to some design constraints that turn out to be quite
      inconvenient (in particular, struct acpi_device objects cannot be
      registered for namespace nodes representing devices that are not
      reported as present or functional by _STA).
      
      For this reason, introduce a non-empty removal handler for ACPI
      device objects that will unregister them when their ACPI namespace
      nodes go away.
      
      This code modification alone should not change functionality except
      for the ordering of the ACPI hotplug workqueue which should not
      matter (without subsequent code changes).
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      d783156e
  2. 22 11月, 2013 3 次提交
  3. 21 11月, 2013 26 次提交
  4. 20 11月, 2013 6 次提交
    • D
      drm/i915: Fix gen3 self-refresh watermarks · f727b490
      Daniel Vetter 提交于
      This regression has been introduced in
      
      commit 4fe8590a
      Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Date:   Wed Sep 4 18:25:22 2013 +0300
      
          drm/i915: Use adjusted_mode appropriately when computing watermarks
      
      I guess we should renable the enabled local variable into something a
      notch more descriptive, but that's something for -next.
      
      The effect on my i945gme netbook is pretty severe amounts of underruns
      - usually the very first pixel gets used for the entire screeen.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Damien Lespiau <damien.lespiau@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f727b490
    • T
      ACPI / hotplug: Fix conflicted PCI bridge notify handlers · ca499fc8
      Toshi Kani 提交于
      The PCI host bridge scan handler installs its own notify handler,
      handle_hotplug_event_root(), by itself.  Nevertheless, the ACPI
      hotplug framework also installs the common notify handler,
      acpi_hotplug_notify_cb(), for PCI root bridges.  This causes
      acpi_hotplug_notify_cb() to call _OST method with unsupported
      error as hotplug.enabled is not set.
      
      To address this issue, introduce hotplug.ignore flag, which
      indicates that the scan handler installs its own notify handler by
      itself.  The ACPI hotplug framework does not install the common
      notify handler when this flag is set.
      Signed-off-by: NToshi Kani <toshi.kani@hp.com>
      [rjw: Changed the name of the new flag]
      Cc: 3.9+ <stable@vger.kernel.org> # 3.9+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ca499fc8
    • T
      drm/ttm: Remove set_need_resched from the ttm fault handler · c58f009e
      Thomas Hellstrom 提交于
      Addresses
      "[BUG] completely bonkers use of set_need_resched + VM_FAULT_NOPAGE".
      
      In the first occurence it was used to try to be nice while releasing the
      mmap_sem and retrying the fault to work around a locking inversion.
      The second occurence was never used.
      
      There has been some discussion whether we should change the locking order to
      mmap_sem -> bo_reserve. This patch doesn't address that issue, and leaves
      that locking order undefined. The solution that we release the mmap_sem if
      tryreserve fails and wait for the buffer to become unreserved is something
      we want in any case, and follows how the core vm system waits for pages
      to be come unlocked while releasing the mmap_sem.
      
      The code also outlines what needs to be changed if we want to establish the
      locking order as mmap_sem -> bo::reserve.
      
      One slight issue that remains with this code is that the fault handler might
      be prone to starvation if another thread countinously reserves the buffer.
      IMO that usage pattern is highly unlikely.
      Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
      c58f009e
    • T
      drm/ttm: Don't move non-existing data · 0bc25425
      Thomas Hellstrom 提交于
      If ttm_bo_move_memcpy was instructed to move a non-populated ttm to
      io memory, it would first populate the ttm, then move the data and then
      destroy the ttm. That's stupid. However, some drivers might have relied on
      this to clear io memory from old stuff. So instead of a NOP, which would
      be the most efficient, just clear the destination.
      Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
      Reviewed-by: NJakob Bornecrantz <jakob@vmware.com>
      0bc25425
    • N
      iscsi-target: Do not reject non-immediate CmdSNs exceeding MaxCmdSN · ea7e32be
      Nicholas Bellinger 提交于
      This patch changes iscsit_sequence_cmd() logic to no longer reject
      non-immediate CmdSNs that exceed MaxCmdSN with a protocol error,
      but instead silently ignore them.
      
      This is done to correctly follow RFC-3720 Section 3.2.2.1:
      
         For non-immediate commands, the CmdSN field can take any
         value from ExpCmdSN to MaxCmdSN inclusive.  The target MUST silently
         ignore any non-immediate command outside of this range or non-
         immediate duplicates within the range.
      Reported-by: NSantosh Kulkarni <santosh.kulkarni@calsoftinc.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ea7e32be
    • N
      iscsi-target: Convert iscsi_session statistics to atomic_long_t · 04f3b31b
      Nicholas Bellinger 提交于
      This patch converts a handful of iscsi_session statistics to type
      atomic_long_t, instead of using iscsi_session->session_stats_lock
      when incrementing these values.
      
      More importantly, go ahead and drop the spinlock usage within
      iscsit_setup_scsi_cmd(), iscsit_check_dataout_hdr(),
      iscsit_send_datain(), and iscsit_build_rsp_pdu() fast-path code.
      
      (Squash in Roland's  target: Remove write-only stats fields and lock
      from struct se_node_acl)
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      04f3b31b