1. 19 9月, 2014 2 次提交
    • K
      sched, cleanup, treewide: Remove set_current_state(TASK_RUNNING) after schedule() · f139caf2
      Kirill Tkhai 提交于
      schedule(), io_schedule() and schedule_timeout() always return
      with TASK_RUNNING state set, so one more setting is unnecessary.
      
      (All places in patch are visible good, only exception is
       kiblnd_scheduler() from:
      
            drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
      
       Its schedule() is one line above standard 3 lines of unified diff)
      
      No places where set_current_state() is used for mb().
      Signed-off-by: NKirill Tkhai <ktkhai@parallels.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1410529254.3569.23.camel@tkhai
      Cc: Alasdair Kergon <agk@redhat.com>
      Cc: Anil Belur <askb23@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Dave Kleikamp <shaggy@kernel.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Dmitry Eremin <dmitry.eremin@intel.com>
      Cc: Frank Blaschka <blaschka@linux.vnet.ibm.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Isaac Huang <he.huang@intel.com>
      Cc: James E.J. Bottomley <JBottomley@parallels.com>
      Cc: James E.J. Bottomley <jejb@parisc-linux.org>
      Cc: J. Bruce Fields <bfields@fieldses.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: Laura Abbott <lauraa@codeaurora.org>
      Cc: Liang Zhen <liang.zhen@intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Masaru Nomura <massa.nomura@gmail.com>
      Cc: Michael Opdenacker <michael.opdenacker@free-electrons.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Mike Snitzer <snitzer@redhat.com>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Oleg Drokin <green@linuxhacker.ru>
      Cc: Peng Tao <bergwolf@gmail.com>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Robert Love <robert.w.love@intel.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Trond Myklebust <trond.myklebust@primarydata.com>
      Cc: Ursula Braun <ursula.braun@de.ibm.com>
      Cc: Zi Shen Lim <zlim.lnx@gmail.com>
      Cc: devel@driverdev.osuosl.org
      Cc: dm-devel@redhat.com
      Cc: dri-devel@lists.freedesktop.org
      Cc: fcoe-devel@open-fcoe.org
      Cc: jfs-discussion@lists.sourceforge.net
      Cc: linux390@de.ibm.com
      Cc: linux-afs@lists.infradead.org
      Cc: linux-cris-kernel@axis.com
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-nfs@vger.kernel.org
      Cc: linux-parisc@vger.kernel.org
      Cc: linux-raid@vger.kernel.org
      Cc: linux-s390@vger.kernel.org
      Cc: linux-scsi@vger.kernel.org
      Cc: qla2xxx-upstream@qlogic.com
      Cc: user-mode-linux-devel@lists.sourceforge.net
      Cc: user-mode-linux-user@lists.sourceforge.net
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      f139caf2
    • A
      vgaswitcheroo: add vga_switcheroo_fini_domain_pm_ops · 766a53d0
      Alex Deucher 提交于
      Drivers should call this on unload to unregister pmops.
      
      Bug:
      https://bugzilla.kernel.org/show_bug.cgi?id=84431Reviewed-by: NBen Skeggs <bskeggs@redhat.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NPali Rohár <pali.rohar@gmail.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      766a53d0
  2. 17 9月, 2014 2 次提交
    • B
      vgaarb: Drop obsolete #ifndef · ce6eacb0
      Bruno Prémont 提交于
      Commit 20cde694 ("x86, ia64: Move EFI_FB vga_default_device()
      initialization to pci_vga_fixup()") moved boot video device detection from
      efifb to x86 and ia64 pci/fixup.c.
      
      Remove the left-over #ifndef check that will always match since the
      corresponding arch-specific define is gone with above patch.
      Signed-off-by: NBruno Prémont <bonbons@linux-vserver.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Matthew Garrett <matthew.garrett@nebula.com>
      ce6eacb0
    • B
      vgaarb: Don't default exclusively to first video device with mem+io · 86fd887b
      Bruno Prémont 提交于
      Commit 20cde694 ("x86, ia64: Move EFI_FB vga_default_device()
      initialization to pci_vga_fixup()") moved boot video device detection from
      efifb to x86 and ia64 pci/fixup.c.
      
      For dual-GPU Apple computers above change represents a regression as code
      in efifb did forcefully override vga_default_device while the merge did not
      (vgaarb happens prior to PCI fixup).
      
      To improve on initial device selection by vgaarb (it cannot know if PCI
      device not behind bridges see/decode legacy VGA I/O or not), move the
      screen_info based check from pci_video_fixup() to vgaarb's init function and
      use it to refine/override decision taken while adding the individual PCI
      VGA devices.  This way PCI fixup has no reason to adjust vga_default_device
      anymore but can depend on its value for flagging shadowed VBIOS.
      
      This has the nice benefit of removing duplicated code but does introduce a
      #if defined() block in vgaarb.  Not all architectures have screen_info and
      would cause compile to fail without it.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=84461Reported-and-Tested-By: NAndreas Noever <andreas.noever@gmail.com>
      Signed-off-by: NBruno Prémont <bonbons@linux-vserver.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Matthew Garrett <matthew.garrett@nebula.com>
      CC: stable@vger.kernel.org # v3.5+
      86fd887b
  3. 08 7月, 2014 1 次提交
    • A
      vgaarb: We can own non-decoded resources · 4e4e7dc5
      Alex Williamson 提交于
      The VGA arbiter does not allow devices to "own" resources that it
      doesn't "decode".  However, it does allow devices to "lock" resources
      that it doesn't decode.  This gets us into trouble because locking
      the resource goes through the same bridge routing updates regardless
      of whether we decode the resource.  This means that when a non-decoded
      resource is released, the bridge is left with VGA routing enabled and
      locking a different device won't clear it.
      
      This happens in the following scenario:
      
      VGA device 01:00.0 (VGA1) is owned by the radeon driver, which
      registers a set_vga_decode function which releases legacy VGA decodes.
      
      VGA device 02:00.0 (VGA2) is any VGA device.
      
      VGA1 user locks VGA resources triggering first_use callback of
      set_vga_decoded, clearing "decode" and "owns" of legacy resources
      on VGA1.
      
      VGA1 user unlocks VGA resources.
      
      VGA2 user locks VGA resources, which skips VGA1 as conflicting as it
      does not "own" legacy resources, although VGA routing is still enabled
      for the VGA1 bridge.  VGA routing is enabled on VGA2 bridge.
      
      VGA2 may or may not receive VGA transactions depending on the bus
      priority of VGA1 vs VGA2 bridge.
      
      To resolve this, we need to allow devices to "own" resources that they
      do not "decode".  This way we can track bus ownership of VGA.  When a
      device decodes VGA, it only means that we must update the command bits
      in cases where the conflicting device is on the same bus.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Dave Airlie <airlied@redhat.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      4e4e7dc5
  4. 02 6月, 2014 1 次提交
  5. 04 9月, 2013 2 次提交
    • A
      vgaarb: Fix VGA decodes changes · 5c0f6ee7
      Alex Williamson 提交于
      When VGA decodes change we need to do a bit more evaluation of exactly what
      has changed.  We don't necessarily give up all the old owns resources and
      we need to account for resources with locks.  The new algorithm is: If
      something is added, update decodes.  If legacy resources were added and
      none were there before, we have a new participant.  If something is
      removed, update decodes.  If we previously owned it, we no longer own it.
      If it was previously locked, invalidate all locks and release it.  If
      legacy resources were removed and none are left, remove the participant
      from VGA arbitration.
      
      Previously we updated decodes, released ownership of everything that was
      previously decoded, ignored all locks, and went off looking for another
      device to transfer VGA to.  In a test case where Intel IGD removes only
      legacy VGA memory decoding, this left the arbiter switching to discrete
      graphics without actually disabling legacy VGA IO from the IGD.  As a
      bonus, we bumped up the count of VGA arbitration participants for no
      good reason.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Acked-by: NDave Airlie <airlied@redhat.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      [danvet: Kill now unused variables, reported by the 0-day kernel
      builtbot.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5c0f6ee7
    • A
      vgaarb: Don't disable resources that are not owned · f22d776f
      Alex Williamson 提交于
      If a device does not own a resource then we don't need to disable it.
      This resolves the case where an Intel IGD device can be configured to
      disable decode of VGA memory but we still need the arbiter to handle
      VGA I/O port routing.  When the IGD device is in conflict, only
      PCI_COMMAND_IO should be disabled since VGA memory does not require
      arbitration on this device.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Acked-by: NDave Airlie <airlied@redhat.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f22d776f
  6. 29 8月, 2013 1 次提交
    • D
      gpu/vga_switcheroo: add driver control power feature. (v3) · 0d69704a
      Dave Airlie 提交于
      For optimus and powerxpress muxless we really want the GPU
      driver deciding when to power up/down the GPU, not userspace.
      
      This adds the ability for a driver to dynamically power up/down
      the GPU and remove the switcheroo from controlling it, the
      switcheroo reports the dynamic state to userspace also.
      
      It also adds 2 power domains, one for machine where the power
      switch is controlled outside the GPU D3 state, so the powerdown
      ordering is done correctly, and the second for the hdmi audio
      device to make sure it can resume for PCI config space accesses.
      
      v1.1: fix build with switcheroo off
      
      v2: add power domain support for radeon and v1 nvidia dsms
      v2.1: fix typo in off case
      
      v3: add audio power domain for hdmi audio + misc audio fixes
      
      v4: use PCI_SLOT macro, drop power reference on hdmi audio resume
      failure also.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      0d69704a
  7. 08 2月, 2013 1 次提交
  8. 01 12月, 2012 1 次提交
  9. 20 11月, 2012 1 次提交
  10. 25 9月, 2012 1 次提交
    • Y
      PCI: Fix default vga ref_count · 84544a1d
      Yinghai Lu 提交于
      when __ARCH_HAS_VGA_DEFAULT_DEVICE is not defined, aka EFIFB is not used,
      for static path, vga_default setting is through vga_arbiter_add_pci_device.
      and later x86 pci_fixup_video, will skip setting again.
      - subsys_initcall(vga_arb_device_init) come first to call
      vga_arbiter_add_pci_device. It will call pci_get_dev to hold one reference.
      
      for hotplug add path, even vga_arbiter_add_pci_device is called via
      notifier, but it will check VGA_RSRC_LEGACY_MASK that is not set for
      hotplug path.  So x86 pci_fixup_video will take over to call
      vga_set_default_device().  It will not hold one refrence.
      
      Later for hotplug remove path, vga_arbiter_del_pci_device that does not
      check VGA_RSRC_LEGACY_MASK will call put_device and it will cause ref_count
      to decrease extra. that will have that pci device get deleted early
      wrongly.
      
      Need to make get/put balance for both cases.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: x86@kernel.org
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: Matthew Garrett <mjg@redhat.com>
      84544a1d
  11. 13 9月, 2012 1 次提交
  12. 18 8月, 2012 2 次提交
  13. 09 6月, 2012 1 次提交
  14. 08 6月, 2012 1 次提交
  15. 13 5月, 2012 3 次提交
  16. 24 4月, 2012 4 次提交
  17. 23 11月, 2011 1 次提交
  18. 14 11月, 2011 1 次提交
  19. 26 7月, 2011 1 次提交
  20. 16 5月, 2011 1 次提交
  21. 04 5月, 2011 2 次提交
  22. 31 3月, 2011 1 次提交
  23. 23 1月, 2011 1 次提交
    • C
      drm/i915: Recognise non-VGA display devices · 934f992c
      Chris Wilson 提交于
      Starting with SandyBridge (though possible with earlier hacked BIOSes),
      the BIOS may initialise the IGFX as secondary to a discrete GPU. Prior,
      it would simply disable the integrated GPU. So we adjust our PCI class
      mask to match any DISPLAY_CLASS device.
      
      In such a configuration, the IGFX is not a primary VGA controller and
      so should not take part in VGA arbitration, and the error return from
      vga_client_register() is expected.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: stable@kernel.org
      934f992c
  24. 21 1月, 2011 1 次提交
    • D
      kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT · 6a108a14
      David Rientjes 提交于
      The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
      is used to configure any non-standard kernel with a much larger scope than
      only small devices.
      
      This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
      references to the option throughout the kernel.  A new CONFIG_EMBEDDED
      option is added that automatically selects CONFIG_EXPERT when enabled and
      can be used in the future to isolate options that should only be
      considered for embedded systems (RISC architectures, SLOB, etc).
      
      Calling the option "EXPERT" more accurately represents its intention: only
      expert users who understand the impact of the configuration changes they
      are making should enable it.
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NDavid Woodhouse <david.woodhouse@intel.com>
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Cc: Greg KH <gregkh@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Robin Holt <holt@sgi.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6a108a14
  25. 07 1月, 2011 1 次提交
  26. 05 1月, 2011 5 次提交