1. 10 Aug, 2010 40 commits
    • Alan Cox's avatar
      epca: Kill the big kernel lock · 7cc34fd0
      Alan Cox authored
      The lock is no longer needed for wait until sent paths so this can go
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7cc34fd0
    • Alan Cox's avatar
      cyclades: Kill off BKL usage · 25c3cdf8
      Alan Cox authored
      Use the port mutext for config setting, the rest is locked sufficiently
      anyway that the BKL makes no odds.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      25c3cdf8
    • Alan Cox's avatar
      synclink: kill the big kernel lock · f602501d
      Alan Cox authored
      We don't need it while waiting and we can lock the ioctls using the port
      mutex. While at it eliminate use of the hangup mutex and switch to the port
      mutex.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f602501d
    • Alan Cox's avatar
      rocket: kill BKL · 417b6e0e
      Alan Cox authored
      We can use the port mutex for this and also for the hangup path so removing
      the problematic use of the hangup mutex in this driver. Fix up the locking
      on the various port flags while we are at it.
      
      Ultimately this driver needs to be using tty_port_ helpers which would sort
      this out far better.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      417b6e0e
    • Alan Cox's avatar
      isicom: kill off the BKL · ec82db12
      Alan Cox authored
      As with the others we can use the port mutex to get the needed locking
      properties and fix the race with open.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ec82db12
    • Alan Cox's avatar
      riscom8: kill use of lock_kernel · bf936f92
      Alan Cox authored
      The riscom8 board uses lock_kernel to protect bits of the port setting
      ioctl logic. We can use the port mutex for this as the logic is internal
      and will also lock set versus open (a locking property that has been lost
      somewhere along the way)
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      bf936f92
    • Alan Cox's avatar
      istallion: use bit ops for the board flags · 8a1e803d
      Alan Cox authored
      This lets us avoid problems with races on the flag changes
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8a1e803d
    • Alan Cox's avatar
      stallion: prune lock_kernel calls · b4eda9cb
      Alan Cox authored
      Remove unneeded tty layer lock kernel bits. Relock the needed bits using the
      port mutex. The istallion still has brd state races but those are not new
      or introduced by the removal of the lock_kernel logic.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      b4eda9cb
    • Jesse Barnes's avatar
      vt/console: try harder to print output when panicing · 8fd4bd22
      Jesse Barnes authored
      Jesse's initial patch commit said:
      
      "At panic time (i.e.  when oops_in_progress is set) we should try a bit
      harder to update the screen and make sure output gets to the VT, since
      some drivers are capable of flipping back to it.
      
      So make sure we try to unblank and update the display if called from a
      panic context."
      
      I've enhanced this to add a flag to the vc that console layer can set to
      indicate they want this behaviour to occur.  This also adds support to
      fbcon for that flag and adds an fb flag for drivers to indicate they want
      to use the support.  It enables this for KMS drivers.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
      Acked-by: default avatarJames Simmons <jsimmons@infradead.org>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8fd4bd22
    • hyc@symas.com's avatar
      tty: Add EXTPROC support for LINEMODE · 26df6d13
      hyc@symas.com authored
      This patch is against the 2.6.34 source.
      
      Paraphrased from the 1989 BSD patch by David Borman @ cray.com:
      
           These are the changes needed for the kernel to support
           LINEMODE in the server.
      
           There is a new bit in the termios local flag word, EXTPROC.
           When this bit is set, several aspects of the terminal driver
           are disabled.  Input line editing, character echo, and mapping
           of signals are all disabled.  This allows the telnetd to turn
           off these functions when in linemode, but still keep track of
           what state the user wants the terminal to be in.
      
           New ioctl:
               TIOCSIG         Generate a signal to processes in the
                               current process group of the pty.
      
           There is a new mode for packet driver, the TIOCPKT_IOCTL bit.
           When packet mode is turned on in the pty, and the EXTPROC bit
           is set, then whenever the state of the pty is changed, the
           next read on the master side of the pty will have the TIOCPKT_IOCTL
           bit set.  This allows the process on the server side of the pty
           to know when the state of the terminal has changed; it can then
           issue the appropriate ioctl to retrieve the new state.
      
      Since the original BSD patches accompanied the source code for telnet
      I've left that reference here, but obviously the feature is useful for
      any remote terminal protocol, including ssh.
      
      The corresponding feature has existed in the BSD tty driver since 1989.
      For historical reference, a good copy of the relevant files can be found
      here:
      
      http://anonsvn.mit.edu/viewvc/krb5/trunk/src/appl/telnet/?pathrev=17741Signed-off-by: default avatarHoward Chu <hyc@symas.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      26df6d13
    • Greg Kroah-Hartman's avatar
      tty: remove remaining Hayes ESP ioctls · a3c8ed69
      Greg Kroah-Hartman authored
      As Jeff Dike pointed out, the Hayes ESP driver was removed in commit
      f53a2ade, so these ioctl definitions
      should also be removed.  This cleans up the remaining arch-specific
      locations of this ioctl value.
      
      Thanks to Arnd for pointing these out.
      
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a3c8ed69
    • Jeff Dike's avatar
      tty: Remove Hayes ESP ioctls · 39e5322c
      Jeff Dike authored
      Remove Hayes ESP ioctls
      
      The Hayes ESP driver has been removed from the tree:
      commit f53a2ade
      ("tty: esp: remove broken driver")
      so its ioctls aren't needed any more.
      Signed-off-by: default avatarJeff Dike <jdike@linux.intel.com>
      Acked-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      39e5322c
    • Arjan van de Ven's avatar
      serial: fix wakup races in the mrst_max3110 driver · d6e679b4
      Arjan van de Ven authored
      The mrst_max3110 driver had a set of unsafe wakeup sequences
      along the following line:
      
      if (!atomic_read(&foo)) {
        atomic_set(&foo, 1);
        wake_up(worker_thread);
      }
      and the worker thread would do
      
      if (atomic_read(&foo)) {
        do_work();
        atomic_set(&foo, 0);
      }
      
      which can result in various missed wakups due to test-then-set races,
      as well as due to clear-after-work instead of clear-before-work.
      
      This patch fixes these races by using the proper bit test-and-set operations,
      and by doing clear-before-work.
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d6e679b4
    • Arjan van de Ven's avatar
      serial: replace open coded mutex with a real mutex in mrst_max3110.c · 68c16b41
      Arjan van de Ven authored
      The mrst_max3110.c driver uses an open coded, non atomic variable
      to create exclusion between two of its worker threads. More than that,
      while the main thread does a proper set-work-clear sequence,
      the other thread only does a test, with the result that no actual
      exclusion is happening.
      
      this patch replaces this open coded variable with a proper mutex
      
      in addition, the 'lock' spinlock is removed from the per adapter structure,
      the lock was only ever initialized but never used
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      68c16b41
    • jianwei.yang's avatar
      max3110 sanity check a register · 99dd3f6b
      jianwei.yang authored
      MAX3111 is the SPI/UART IC installed on the MRST SPI Port Card as a serial
      debug goal, and the SPI Port Card will be frequently mounted and unmounted
      from the main board by developers depending whether debug serial is
      required or not.
      
      As the MAX3111 has no subvendor or product id registers available, the patch
      will try to access one register to decide if this IC is present or not.
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      99dd3f6b
    • Feng Tang's avatar
      mrst_max3110: add UART driver for Max3110 on Moorestown · 22510995
      Feng Tang authored
      This driver enable the max3110 device, it can be used as
      a system console. the IRQ needs be enabled if user want a
      better performance. MRST max3110 works in 3.684MHz clock,
      which supports 230400 as its maximum rate.
      Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
      Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      22510995
    • Yegor Yefremov's avatar
      serial: add UART_CAP_EFR and UART_CAP_SLEEP flags to 16C950 UARTs definition · 7a56aa45
      Yegor Yefremov authored
      Adding UART_CAP_EFR and UART_CAP_SLEEP flags will enable sleep mode
      and automatic CTS flow control for 16C950 UARTs. It will also avoid
      capabilities detection warning like this:
      
      "ttyS0: detected caps 00000700 should be 00000100"
      Signed-off-by: default avatarYegor Yefremov <yegorslists@googlemail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7a56aa45
    • Andy Shevchenko's avatar
      vt: clean up the code - use kernel library · 74c807ce
      Andy Shevchenko authored
      Signed-off-by: default avatarAndy Shevchenko <ext-andriy.shevchenko@nokia.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      74c807ce
    • Christoph Egger's avatar
      serial: There's no config CONSOLE · 690b781b
      Christoph Egger authored
      as there's no config CONSOLE (never has been as far as I can tell) and
      noone has ever missed that piece of code, it should be safe to remove
      it making the kernel a tiny bit less complex.
      Signed-off-by: default avatarChristoph Egger <siccegge@cs.fau.de>
      Acked-by: default avatarGreg Ungerer <gerg@snapgear.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      690b781b
    • Andrea Gelmini's avatar
      n_gsm.c: removed duplicated #includes · ea5d0236
      Andrea Gelmini authored
      drivers/char/n_gsm.c: linux/timer.h is included more than once.
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ea5d0236
    • Linus Torvalds's avatar
      Merge branch 'writable_limits' of git://decibel.fi.muni.cz/~xslaby/linux · b34d8915
      Linus Torvalds authored
      * 'writable_limits' of git://decibel.fi.muni.cz/~xslaby/linux:
        unistd: add __NR_prlimit64 syscall numbers
        rlimits: implement prlimit64 syscall
        rlimits: switch more rlimit syscalls to do_prlimit
        rlimits: redo do_setrlimit to more generic do_prlimit
        rlimits: add rlimit64 structure
        rlimits: do security check under task_lock
        rlimits: allow setrlimit to non-current tasks
        rlimits: split sys_setrlimit
        rlimits: selinux, do rlimits changes under task_lock
        rlimits: make sure ->rlim_max never grows in sys_setrlimit
        rlimits: add task_struct to update_rlimit_cpu
        rlimits: security, add task_struct to setrlimit
      
      Fix up various system call number conflicts.  We not only added fanotify
      system calls in the meantime, but asm-generic/unistd.h added a wait4
      along with a range of reserved per-architecture system calls.
      b34d8915
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/mtd-2.6 · e8a89ceb
      Linus Torvalds authored
      * git://git.infradead.org/mtd-2.6: (79 commits)
        mtd: Remove obsolete <mtd/compatmac.h> include
        mtd: Update copyright notices
        jffs2: Update copyright notices
        mtd-physmap: add support users can assign the probe type in board files
        mtd: remove redwood map driver
        mxc_nand: Add v3 (i.MX51) Support
        mxc_nand: support 8bit ecc
        mxc_nand: fix correct_data function
        mxc_nand: add V1_V2 namespace to registers
        mxc_nand: factor out a check_int function
        mxc_nand: make some internally used functions overwriteable
        mxc_nand: rework get_dev_status
        mxc_nand: remove 0xe00 offset from registers
        mtd: denali: Add multi connected NAND support
        mtd: denali: Remove set_ecc_config function
        mtd: denali: Remove unuseful code in get_xx_nand_para functions
        mtd: denali: Remove device_info_tag structure
        mtd: m25p80: add support for the Winbond W25Q32 SPI flash chip
        mtd: m25p80: add support for the Intel/Numonyx {16,32,64}0S33B SPI flash chips
        mtd: m25p80: add support for the EON EN25P{32, 64} SPI flash chips
        ...
      
      Fix up trivial conflicts in drivers/mtd/maps/{Kconfig,redwood.c} due to
      redwood driver removal.
      e8a89ceb
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bcopeland/omfs · 8196867c
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bcopeland/omfs:
        omfs: fix uninitialized variable warning
        omfs: sanity check cluster size
        omfs: refuse to mount if bitmap pointer is obviously wrong
        omfs: check bounds on block numbers before passing to sb_bread
        omfs: fix memory leak
      8196867c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify · 8c8946f5
      Linus Torvalds authored
      * 'for-linus' of git://git.infradead.org/users/eparis/notify: (132 commits)
        fanotify: use both marks when possible
        fsnotify: pass both the vfsmount mark and inode mark
        fsnotify: walk the inode and vfsmount lists simultaneously
        fsnotify: rework ignored mark flushing
        fsnotify: remove global fsnotify groups lists
        fsnotify: remove group->mask
        fsnotify: remove the global masks
        fsnotify: cleanup should_send_event
        fanotify: use the mark in handler functions
        audit: use the mark in handler functions
        dnotify: use the mark in handler functions
        inotify: use the mark in handler functions
        fsnotify: send fsnotify_mark to groups in event handling functions
        fsnotify: Exchange list heads instead of moving elements
        fsnotify: srcu to protect read side of inode and vfsmount locks
        fsnotify: use an explicit flag to indicate fsnotify_destroy_mark has been called
        fsnotify: use _rcu functions for mark list traversal
        fsnotify: place marks on object in order of group memory address
        vfs/fsnotify: fsnotify_close can delay the final work in fput
        fsnotify: store struct file not struct path
        ...
      
      Fix up trivial delete/modify conflict in fs/notify/inotify/inotify.c.
      8c8946f5
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · 5f248c9c
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (96 commits)
        no need for list_for_each_entry_safe()/resetting with superblock list
        Fix sget() race with failing mount
        vfs: don't hold s_umount over close_bdev_exclusive() call
        sysv: do not mark superblock dirty on remount
        sysv: do not mark superblock dirty on mount
        btrfs: remove junk sb_dirt change
        BFS: clean up the superblock usage
        AFFS: wait for sb synchronization when needed
        AFFS: clean up dirty flag usage
        cifs: truncate fallout
        mbcache: fix shrinker function return value
        mbcache: Remove unused features
        add f_flags to struct statfs(64)
        pass a struct path to vfs_statfs
        update VFS documentation for method changes.
        All filesystems that need invalidate_inode_buffers() are doing that explicitly
        convert remaining ->clear_inode() to ->evict_inode()
        Make ->drop_inode() just return whether inode needs to be dropped
        fs/inode.c:clear_inode() is gone
        fs/inode.c:evict() doesn't care about delete vs. non-delete paths now
        ...
      
      Fix up trivial conflicts in fs/nilfs2/super.c
      5f248c9c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · f6cec0ae
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (59 commits)
        igbvf.txt: Add igbvf Documentation
        igb.txt: Add igb documentation
        e100/e1000*/igb*/ixgb*: Add missing read memory barrier
        ixgbe: fix build error with FCOE_CONFIG without DCB_CONFIG
        netxen: protect tx timeout recovery by rtnl lock
        isdn: gigaset: use after free
        isdn: gigaset: add missing unlock
        solos-pci: Fix race condition in tasklet RX handling
        pkt_sched: Fix sch_sfq vs tcf_bind_filter oops
        net: disable preemption before call smp_processor_id()
        tcp: no md5sig option size check bug
        iwlwifi: fix locking assertions
        iwlwifi: fix TX tracer
        isdn: fix information leak
        net: Fix napi_gro_frags vs netpoll path
        usbnet: remove noisy and hardly useful printk
        rtl8180: avoid potential NULL deref in rtl8180_beacon_work
        ath9k: Remove myself from the MAINTAINERS list
        libertas: scan before assocation if no BSSID was given
        libertas: fix association with some APs by using extended rates
        ...
      f6cec0ae
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6 · 0fcf12d5
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
        tx493xide: use min_t() macro instead of min()
        drivers/ide: Use memdup_user
        via82cxxx: fix typo for VT6415 PCIE PATA IDE Host Controller support.
        ide-cd: Do not access completed requests in the irq handler
      0fcf12d5
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 · 4d15393d
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
        sparc64: Update defconfig.
        sparc: Kill user copy check code.
        sparc64: Fix perf_arch_get_caller_regs().
        sparc64: Add missing ID to parport probing code.
      4d15393d
    • Linus Torvalds's avatar
      Merge branch 'rs485fix' of git://www.jni.nu/cris · 7fbd15f9
      Linus Torvalds authored
      * 'rs485fix' of git://www.jni.nu/cris:
        CRIS: ioctl for getting RS485 information
      7fbd15f9
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 1989425a
      Linus Torvalds authored
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc: fix build with make 3.82
        Revert "Input: appletouch - fix integer overflow issue"
        memblock: Fix memblock_is_region_reserved() to return a boolean
        powerpc: Trim defconfigs
        powerpc: fix i8042 module build error
        sound/soc: mpc5200_psc_ac97: Use gpio pins for cold reset
        powerpc/5200: add mpc5200_psc_ac97_gpio_reset
      1989425a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin · 0fc2f137
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (32 commits)
        Blackfin: gpio: add a debounce stub
        Blackfin: update defconfigs
        Blackfin: remove CONFIG_MEM_GENERIC_BOARD
        Blackfin: dpmc: punt unnecessary RTC_ISTAT clearing
        Blackfin: unify rotary encoder bitmasks
        Blackfin: unify SDH/RSI bitmasks
        Blackfin: BF54x: tweak DMAC MMR naming to match other ports
        Blackfin: TWI: clean up the MMR names
        Blackfin: add EVT_OVERRIDE/IPRIO core MMR helpers
        Blackfin: add support for dynamic ftrace
        Blackfin: add support for LZO compressed kernels
        Blackfin: portmux: fix peripheral map overflow when requesting pins
        Blackfin: document SPI CS limitations with CPHA=0
        Blackfin: remove useless and outdated documentation
        Blackfin: BF51x/BF52x: support GPIO Hysteresis/Schmitt Trigger options
        Blackfin: gpio/portmux: clean up whitespace corruption
        Blackfin: make sure mmiowb inserts a write barrier with SSYNC
        Blackfin: fix DMA/cache bug when resuming from suspend to RAM
        Blackfin: BF51x: fix handling of PH8 (the "internal" SPI0SEL4 pin)
        Blackfin: add a GPIO_DEFAULT_BOOT_SPI_CS
        ...
      0fc2f137
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx · dcded10f
      Linus Torvalds authored
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (30 commits)
        DMAENGINE: at_hdmac: locking fixlet
        DMAENGINE: pch_dma: kill another usage of __raw_{read|write}l
        dma: dmatest: fix potential sign bug
        ioat2: catch and recover from broken vtd configurations v6
        DMAENGINE: add runtime slave control to COH 901 318 v3
        DMAENGINE: add runtime slave config to DMA40 v3
        DMAENGINE: generic slave channel control v3
        dmaengine: Driver for Topcliff PCH DMA controller
        intel_mid: Add Mrst & Mfld DMA Drivers
        drivers/dma: Eliminate a NULL pointer dereference
        dma/timb_dma: compile warning on 32 bit
        DMAENGINE: ste_dma40: support older silicon
        DMAENGINE: ste_dma40: support disabling physical channels
        DMAENGINE: ste_dma40: no disabled phy channels on ux500
        DMAENGINE: ste_dma40: fix suspend bug
        DMAENGINE: ste_dma40: add DB8500 memcpy channels
        DMAENGINE: ste_dma40: no flow control on memcpy
        DMAENGINE: ste_dma40: arch updates for LCLA and LCPA
        DMAENGINE: ste_dma40: allocate LCLA dynamically
        DMAENGINE: ste_dma40: no premature stop
        ...
      
      Fix up trivial conflicts in arch/arm/mach-ux500/devices-db8500.c
      dcded10f
    • qiaochong's avatar
      drivers/char/vt.c:vc_do_resize(): local var `end' should be unsigned long · 9e0ba741
      qiaochong authored
      According include/linux/console_struct.h,vc_scr_end is unsigned long.
      
      struct vc_data {
          unsigned short  vc_num;         /* Console number */
          unsigned int    vc_cols;        /* [#] Console size */
          unsigned int    vc_rows;
          unsigned int    vc_size_row;        /* Bytes per row */
          unsigned int    vc_scan_lines;      /* # of scan lines */
          unsigned long   vc_origin;      /* [!] Start of real screen */
          unsigned long   vc_scr_end;     /* [!] End of real screen */
          unsigned long   vc_visible_origin;  /* [!] Top of visible window */
          unsigned int    vc_top, vc_bottom;  /* Scrolling region */
          const struct consw *vc_sw;
          unsigned short  *vc_screenbuf;
      ...
      }
      Signed-off-by: default avatarqiaochong <qiaochong@loongson.cn>
      Cc: Greg KH <greg@kroah.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9e0ba741
    • qiaochong's avatar
      drivers/char/vt.c: fix vc->vc_origin on take_over_console() · 02f0777a
      qiaochong authored
      kernel will die on some platform when switch from vga mode to framebuffer
      mode.  The reason of this bug is that bind_con_driver reset vc->vc_origin
      to (unsigned long)vc->vc_screenbuf.
      
      On vgacon vc->vc_origin is not releated to vc->vc_screenbuf,if set
      vc->vc_origin to vc->vc_screenbuf,kernel will die on vc_do_resize.
      
      static int vc_do_resize(struct tty_struct *tty, struct tty_struct *real_tty,
              struct vc_data *vc, unsigned int cols, unsigned int lines)
      {
          unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0;
          unsigned int old_cols, old_rows, old_row_size, old_screen_size;
          unsigned int new_cols, new_rows, new_row_size, new_screen_size;
          unsigned int end, user;
      ...
              end = (old_rows > new_rows) ? old_origin +
                  (old_row_size * new_rows) :
                  vc->vc_scr_end;
      
      ...
      /*
      here for a test from vgacon to framebuffer:
      old_origin=0x810814a0,end=0xb00b8fa0,vc->vc_origin=0x810814a0
      the code bellow will copy memory from 0x810814a0 to 0xb00b8fa0,
      this will cover kernel code,kernel died here.
      */
      
          while (old_origin < end) {
      
              scr_memcpyw((unsigned short *) new_origin,
                      (unsigned short *) old_origin, rlth);
              if (rrem)
                  scr_memsetw((void *)(new_origin + rlth),
                          vc->vc_video_erase_char, rrem);
              old_origin += old_row_size;
              new_origin += new_row_size;
          }
      
      ...
      }
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: default avatarqiaochong <qiaochong@loongson.cn>
      Cc: Greg KH <greg@kroah.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      02f0777a
    • Michel Lespinasse's avatar
      rwsem: smaller wrappers around rwsem_down_failed_common · a8618a0e
      Michel Lespinasse authored
      More code can be pushed from rwsem_down_read_failed and
      rwsem_down_write_failed into rwsem_down_failed_common.
      
      Following change adding down_read_critical infrastructure support also
      enjoys having flags available in a register rather than having to fish it
      out in the struct rwsem_waiter...
      Signed-off-by: default avatarMichel Lespinasse <walken@google.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Suleiman Souhlal <suleiman@google.com>
      Cc: Ying Han <yinghan@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a8618a0e
    • Michel Lespinasse's avatar
      rwsem: wake queued readers when writer blocks on active read lock · 424acaae
      Michel Lespinasse authored
      This change addresses the following situation:
      
      - Thread A acquires the rwsem for read
      - Thread B tries to acquire the rwsem for write, notices there is already
        an active owner for the rwsem.
      - Thread C tries to acquire the rwsem for read, notices that thread B already
        tried to acquire it.
      - Thread C grabs the spinlock and queues itself on the wait queue.
      - Thread B grabs the spinlock and queues itself behind C. At this point A is
        the only remaining active owner on the rwsem.
      
      In this situation thread B could notice that it was the last active writer
      on the rwsem, and decide to wake C to let it proceed in parallel with A
      since they both only want the rwsem for read.
      Signed-off-by: default avatarMichel Lespinasse <walken@google.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Suleiman Souhlal <suleiman@google.com>
      Cc: Ying Han <yinghan@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      424acaae
    • Michel Lespinasse's avatar
      rwsem: let RWSEM_WAITING_BIAS represent any number of waiting threads · fd41b334
      Michel Lespinasse authored
      Previously each waiting thread added a bias of RWSEM_WAITING_BIAS.  With
      this change, the bias is added only once to indicate that the wait list is
      non-empty.
      
      This has a few nice properties which will be used in following changes:
      - when the spinlock is held and the waiter list is known to be non-empty,
        count < RWSEM_WAITING_BIAS  <=>  there is an active writer on that sem
      - count == RWSEM_WAITING_BIAS  <=>  there are waiting threads and no
                                           active readers/writers on that sem
      Signed-off-by: default avatarMichel Lespinasse <walken@google.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Suleiman Souhlal <suleiman@google.com>
      Cc: Ying Han <yinghan@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fd41b334
    • Michel Lespinasse's avatar
      rwsem: lighter active count checks when waking up readers · 70bdc6e0
      Michel Lespinasse authored
      In __rwsem_do_wake(), we can skip the active count check unless we come
      there from up_xxxx().  Also when checking the active count, it is not
      actually necessary to increment it; this allows us to get rid of the read
      side undo code and simplify the calculation of the final rwsem count
      adjustment once we've counted the reader threads to wake.
      
      The basic observation is the following.  When there are waiter threads on
      a rwsem and the spinlock is held, other threads can only increment the
      active count by trying to grab the rwsem in down_xxxx().  However
      down_xxxx() will notice there are waiter threads and take the down_failed
      path, blocking to acquire the spinlock on the way there.  Therefore, a
      thread observing an active count of zero with waiters queued and the
      spinlock held, is protected against other threads acquiring the rwsem
      until it wakes the last waiter or releases the spinlock.
      Signed-off-by: default avatarMichel Lespinasse <walken@google.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Suleiman Souhlal <suleiman@google.com>
      Cc: Ying Han <yinghan@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      70bdc6e0
    • Michel Lespinasse's avatar
      rwsem: fully separate code paths to wake writers vs readers · 345af7bf
      Michel Lespinasse authored
      This is in preparation for later changes in the series.
      
      In __rwsem_do_wake(), the first queued waiter is checked first in order to
      determine whether it's a writer or a reader.  The code paths diverge at
      this point.  The code that checks and increments the rwsem active count is
      duplicated on both sides - the point is that later changes in the series
      will be able to independently modify both sides.
      Signed-off-by: default avatarMichel Lespinasse <walken@google.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Suleiman Souhlal <suleiman@google.com>
      Cc: Ying Han <yinghan@google.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      345af7bf
    • Giel van Schijndel's avatar
      hwmon: f71882fg: add support for the Fintek F71808E · 7721fea3
      Giel van Schijndel authored
      Allow device probing to recognise the Fintek F71808E.
      
      Sysfs interface:
       * Fan/pwm control is the same as for F71889FG
       * Temperature and voltage sensor handling is largely the same as for
         the F71889FG
        - Has one temperature sensor less (doesn't have temp3)
        - Misses one voltage sensor (doesn't have V6, thus in6_input refers to
          what in7_input refers for F71889FG)
      
      For the purpose of the sysfs interface fxxxx_in_temp_attr[] is split up
      such that it can largely be reused.
      Signed-off-by: default avatarGiel van Schijndel <me@mortis.eu>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Jonathan Cameron <jic23@cam.ac.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7721fea3