1. 20 Jan, 2013 1 commit
  2. 03 Jan, 2013 1 commit
    • Greg Kroah-Hartman's avatar
      Drivers: char: remove __dev* attributes. · bcd2982a
      Greg Kroah-Hartman authored
      
      
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bcd2982a
  3. 17 Dec, 2012 7 commits
  4. 29 Nov, 2012 1 commit
  5. 28 Nov, 2012 2 commits
  6. 26 Nov, 2012 1 commit
  7. 21 Nov, 2012 6 commits
  8. 19 Nov, 2012 1 commit
  9. 15 Nov, 2012 1 commit
    • Jiri Slaby's avatar
      TTY: call tty_port_destroy in the rest of drivers · 191c5f10
      Jiri Slaby authored
      
      
      After commit "TTY: move tty buffers to tty_port", the tty buffers are
      not freed in some drivers. This is because tty_port_destructor is not
      called whenever a tty_port is freed. This was an assumption I counted
      with but was unfortunately untrue. So fix the drivers to fulfil this
      assumption.
      
      To be sure, the TTY buffers (and later some stuff) are gone along with
      the tty_port, we have to call tty_port_destroy at tear-down places.
      This is mostly where the structure containing a tty_port is freed.
      This patch does exactly that -- put tty_port_destroy at those places.
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      191c5f10
  10. 11 Nov, 2012 2 commits
    • Ben Widawsky's avatar
      drm/i915: Kill off now unused gen6+ AGP code · 009946f8
      Ben Widawsky authored
      
      
      v2: Accidently removed an ILK case in i9xx_setup (Nicely found by Chris)
      
      CC: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by [v1] : Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      009946f8
    • Ben Widawsky's avatar
      drm/i915: Stop using AGP layer for GEN6+ · e76e9aeb
      Ben Widawsky authored
      
      
      As a quick hack we make the old intel_gtt structure mutable so we can
      fool a bunch of the existing code which depends on elements in that data
      structure. We can/should try to remove this in a subsequent patch.
      
      This should preserve the old gtt init behavior which upon writing these
      patches seems incorrect. The next patch will fix these things.
      
      The one exception is VLV which doesn't have the preserved flush control
      write behavior. Since we want to do that for all GEN6+ stuff, we'll
      handle that in a later patch. Mainstream VLV support doesn't actually
      exist yet anyway.
      
      v2: Update the comment to remove the "voodoo"
      Check that the last pte written matches what we readback
      
      v3: actually kill cache_level_to_agp_type since most of the flags will
      disappear in an upcoming patch
      
      v4: v3 was actually not what we wanted (Daniel)
      Make the ggtt bind assertions better and stricter (Chris)
      Fix some uncaught errors at gtt init (Chris)
      Some other random stuff that Chris wanted
      
      v5: check for i==0 in gen6_ggtt_bind_object to shut up gcc (Ben)
      Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
      Reviewed-by [v4]: Chris Wilson <chris@chris-wilson.co.uk>
      [danvet: Make the cache_level -> agp_flags conversion for pre-gen6 a
      tad more robust by mapping everything != CACHE_NONE to the cached agp
      flag - we have a 1:1 uncached mapping, but different modes of
      cacheable (at least on later generations). Suggested by Chris Wilson.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      e76e9aeb
  11. 08 Nov, 2012 2 commits
    • Jarod Wilson's avatar
      random: prime last_data value per fips requirements · ec8f02da
      Jarod Wilson authored
      
      
      The value stored in last_data must be primed for FIPS 140-2 purposes. Upon
      first use, either on system startup or after an RNDCLEARPOOL ioctl, we
      need to take an initial random sample, store it internally in last_data,
      then pass along the value after that to the requester, so that consistency
      checks aren't being run against stale and possibly known data.
      
      CC: Herbert Xu <herbert@gondor.apana.org.au>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Matt Mackall <mpm@selenic.com>
      CC: linux-crypto@vger.kernel.org
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      ec8f02da
    • Jiri Kosina's avatar
      random: fix debug format strings · 8eb2ffbf
      Jiri Kosina authored
      
      
      Fix the following warnings in formatting debug output:
      
      drivers/char/random.c: In function ‘xfer_secondary_pool’:
      drivers/char/random.c:827: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘size_t’
      drivers/char/random.c: In function ‘account’:
      drivers/char/random.c:859: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘size_t’
      drivers/char/random.c:881: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘size_t’
      drivers/char/random.c: In function ‘random_read’:
      drivers/char/random.c:1141: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘ssize_t’
      drivers/char/random.c:1145: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘ssize_t’
      drivers/char/random.c:1145: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘long unsigned int’
      
      by using '%zd' instead of '%d' to properly denote ssize_t/size_t conversion.
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      8eb2ffbf
  12. 05 Nov, 2012 1 commit
    • Linus Walleij's avatar
      ARM: plat-nomadik: move MTU, kill plat-nomadik · 694e33a7
      Linus Walleij authored
      
      
      This moves the MTU timer driver from arch/arm/plat-nomadik
      to drivers/clocksource and moves the header file to the
      platform_data directory.
      
      As this moves the last file being compiled to an object out
      of arch/arm/plat-nomadik, we have to "turn off the light"
      and delete the plat-nomadik directory, because it is not
      allowed to have an empty Makefile in a plat-* directory.
      This is probably also a desired side effect of depopulating
      the arch/arm directory of drivers. Luckily we have just
      deleted all the <plat/*> include files prior to this so
      by moving the last one we may delete the directory.
      
      After this all the Ux500 and Nomadik device drivers live
      outside of the arch/arm hierarchy.
      
      Cc: Alessandro Rubini <rubini@unipv.it>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      694e33a7
  13. 01 Nov, 2012 1 commit
  14. 25 Oct, 2012 1 commit
  15. 24 Oct, 2012 2 commits
  16. 16 Oct, 2012 3 commits
  17. 15 Oct, 2012 3 commits
    • Jiri Kosina's avatar
      random: make it possible to enable debugging without rebuild · be5b779a
      Jiri Kosina authored
      
      
      The module parameter that turns debugging mode (which basically means
      printing a few extra lines during runtime) is in '#if 0' block. Forcing
      everyone who would like to see how entropy is behaving on his system to
      rebuild seems to be a little bit too harsh.
      
      If we were concerned about speed, we could potentially turn 'debug' into a
      static key, but I don't think it's necessary.
      
      Drop the '#if 0' block to allow using the 'debug' parameter without rebuilding.
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      be5b779a
    • Tony Lindgren's avatar
      ARM: OMAP: Trivial driver changes to remove include plat/cpu.h · 27615a97
      Tony Lindgren authored
      
      
      Drivers should not use cpu_is_omap or cpu_class_is_omap macros,
      they should be private to the platform init code. And we'll be
      removing plat/cpu.h and only have a private soc.h for the
      arch/arm/*omap* code.
      
      This patch is intended as preparation for the core omap changes
      and removes the need to include plat/cpu.h from several drivers.
      This is needed for the ARM common zImage support.
      
      These changes are OK to do because:
      
      - omap-rng.c does not need plat/cpu.h
      
      - omap-aes.c and omap-sham.c get the proper platform_data
        passed to them so they don't need extra checks in the driver
      
      - omap-dma.c and omap-pcm.c can test the arch locally as
        omap1 and omap2 cannot be compiled together because of
        conflicting compiler flags
      
      Cc: Deepak Saxena <dsaxena@plexity.net>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Venkatraman S <svenkatr@ti.com>
      Cc: Chris Ball <cjb@laptop.org>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Dan Williams <djbw@fb.com>
      Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
      Acked-by: default avatarJarkko Nikula <jarkko.nikula@bitmer.com>
      Cc: Liam Girdwood <lrg@ti.com>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: linux-crypto@vger.kernel.org
      Cc: linux-mmc@vger.kernel.org
      Cc: alsa-devel@alsa-project.org
      Cc: linux-kernel@vger.kernel.org
      [tony@atomide.com: mmc changes folded in to an earlier patch]
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      27615a97
    • Alan Cox's avatar
      parport: dead code in pp_write · 5d0c3d4f
      Alan Cox authored
      
      
      We always update bytes_written before we check signal_pending so it
      follows that we can't get a signal return for 0 bytes so we don't
      need to check in the singal path. The cases a signal causes an earlier
      abort are handled before this and will not hit this path
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      5d0c3d4f
  18. 12 Oct, 2012 1 commit
  19. 10 Oct, 2012 2 commits
    • Peter Huewe's avatar
      tpm: Propagate error from tpm_transmit to fix a timeout hang · abce9ac2
      Peter Huewe authored
      
      
      tpm_write calls tpm_transmit without checking the return value and
      assigns the return value unconditionally to chip->pending_data, even if
      it's an error value.
      This causes three bugs.
      
      So if we write to /dev/tpm0 with a tpm_param_size bigger than
      TPM_BUFSIZE=0x1000 (e.g. 0x100a)
      and a bufsize also bigger than TPM_BUFSIZE (e.g. 0x100a)
      tpm_transmit returns -E2BIG which is assigned to chip->pending_data as
      -7, but tpm_write returns that TPM_BUFSIZE bytes have been successfully
      been written to the TPM, altough this is not true (bug #1).
      
      As we did write more than than TPM_BUFSIZE bytes but tpm_write reports
      that only TPM_BUFSIZE bytes have been written the vfs tries to write
      the remaining bytes (in this case 10 bytes) to the tpm device driver via
      tpm_write which then blocks at
      
       /* cannot perform a write until the read has cleared
       either via tpm_read or a user_read_timer timeout */
       while (atomic_read(&chip->data_pending) != 0)
      	 msleep(TPM_TIMEOUT);
      
      for 60 seconds, since data_pending is -7 and nobody is able to
      read it (since tpm_read luckily checks if data_pending is greater than
      0) (#bug 2).
      
      After that the remaining bytes are written to the TPM which are
      interpreted by the tpm as a normal command. (bug #3)
      So if the last bytes of the command stream happen to be a e.g.
      tpm_force_clear this gets accidentally sent to the TPM.
      
      This patch fixes all three bugs, by propagating the error code of
      tpm_write and returning -E2BIG if the input buffer is too big,
      since the response from the tpm for a truncated value is bogus anyway.
      Moreover it returns -EBUSY to userspace if there is a response ready to be
      read.
      Signed-off-by: default avatarPeter Huewe <peter.huewe@infineon.com>
      Signed-off-by: default avatarKent Yoder <key@linux.vnet.ibm.com>
      abce9ac2
    • Gang Wei's avatar
      driver/char/tpm: fix regression causesd by ppi · 1631cfb7
      Gang Wei authored
      This patch try to fix the S3 regression https://lkml.org/lkml/2012/10/5/433
      
      ,
      which includes below line:
      [ 1554.684638] sysfs: cannot create duplicate filename '/devices/pnp0/00:0c/ppi'
      
      The root cause is that ppi sysfs teardown code is MIA, so while S3 resume,
      the ppi kobject will be created again upon existing one.
      
      To make the tear down code simple, change the ppi subfolder creation from
      using kobject_create_and_add to just using a named ppi attribute_group. Then
      ppi sysfs teardown could be done with a simple sysfs_remove_group call.
      
      Adjusted the name & return type for ppi sysfs init function.
      Reported-by: default avatarBen Guthro <ben@guthro.net>
      Signed-off-by: default avatarGang Wei <gang.wei@intel.com>
      Signed-off-by: default avatarKent Yoder <key@linux.vnet.ibm.com>
      1631cfb7
  20. 09 Oct, 2012 1 commit
    • Konstantin Khlebnikov's avatar
      mm: kill vma flag VM_RESERVED and mm->reserved_vm counter · 314e51b9
      Konstantin Khlebnikov authored
      
      
      A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
      currently it lost original meaning but still has some effects:
      
       | effect                 | alternative flags
      -+------------------------+---------------------------------------------
      1| account as reserved_vm | VM_IO
      2| skip in core dump      | VM_IO, VM_DONTDUMP
      3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
      4| do not mlock           | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
      
      This patch removes reserved_vm counter from mm_struct.  Seems like nobody
      cares about it, it does not exported into userspace directly, it only
      reduces total_vm showed in proc.
      
      Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.
      
      remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
      remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.
      
      [akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]
      Signed-off-by: default avatarKonstantin Khlebnikov <khlebnikov@openvz.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Carsten Otte <cotte@de.ibm.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Morris <james.l.morris@oracle.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Cc: Nick Piggin <npiggin@kernel.dk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: Venkatesh Pallipadi <venki@google.com>
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      314e51b9