Skip to content
  1. Sep 22, 2011
    • Ohad Ben-Cohen's avatar
      hwspinlock/core: register a bank of hwspinlocks in a single API call · 300bab97
      Ohad Ben-Cohen authored
      Hardware Spinlock devices usually contain numerous locks (known
      devices today support between 32 to 256 locks).
      
      Originally hwspinlock core required drivers to register (and later,
      when needed, unregister) each lock separately.
      
      That worked, but required hwspinlocks drivers to do a bit extra work
      when they were probed/removed.
      
      This patch changes hwspin_lock_{un}register() to allow a bank of
      hwspinlocks to be {un}registered in a single invocation.
      
      A new 'struct hwspinlock_device', which contains an array of 'struct
      hwspinlock's is now being passed to the core upon registration (so
      instead of wrapping each struct hwspinlock, a priv member has been added
      to allow drivers to piggyback their private data with each hwspinlock).
      
      While at it, several per-lock members were moved to be per-device:
      1. struct device *dev
      2. struct hwspinlock_ops *ops
      
      In addition, now that the array of locks is handled by the core,
      there's no reason to maintain a...
      300bab97
    • Ohad Ben-Cohen's avatar
      hwspinlock/core: remove stubs for register/unregister · c536abfd
      Ohad Ben-Cohen authored
      
      
      hwspinlock drivers must anyway select CONFIG_HWSPINLOCK,
      so there's no point in having register/unregister stubs.
      
      Removing those stubs will only make it easier for developers
      to catch CONFIG_HWSPINLOCK mis-.config-urations.
      
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      c536abfd
    • Juan Gutierrez's avatar
      hwspinlock/core: use a mutex to protect the radix tree · 93b465c2
      Juan Gutierrez authored
      
      
      Since we're using non-atomic radix tree allocations, we
      should be protecting the tree using a mutex and not a
      spinlock.
      
      Non-atomic allocations and process context locking is good enough,
      as the tree is manipulated only when locks are registered/
      unregistered/requested/freed.
      
      The locks themselves are still protected by spinlocks of course,
      and mutexes are not involved in the locking/unlocking paths.
      
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarJuan Gutierrez <jgutierrez@ti.com>
      [ohad@wizery.com: rewrite the commit log, #include mutex.h, add minor
      commentary]
      [ohad@wizery.com: update register/unregister parts in hwspinlock.txt]
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      93b465c2
    • Ohad Ben-Cohen's avatar
      hwspinlock/core/omap: fix id issues on multiple hwspinlock devices · c3c1250e
      Ohad Ben-Cohen authored
      
      
      hwspinlock devices provide system-wide hardware locks that are used
      by remote processors that have no other way to achieve synchronization.
      
      To achieve that, each physical lock must have a system-wide id number
      that is agreed upon, otherwise remote processors can't possibly assume
      they're using the same hardware lock.
      
      Usually boards have a single hwspinlock device, which provides several
      hwspinlocks, and in this case, they can be trivially numbered 0 to
      (num-of-locks - 1).
      
      In case boards have several hwspinlocks devices, a different base id
      should be used for each hwspinlock device (they can't all use 0 as
      a starting id!).
      
      While this is certainly not common, it's just plain wrong to just
      silently use 0 as a base id whenever the hwspinlock driver is probed.
      
      This patch provides a hwspinlock_pdata structure, that boards can use
      to set a different base id for each of the hwspinlock devices they may
      have, and demonstrates how to use it with the omap hwspinlock driver.
      
      While we're at it, make sure the hwspinlock core prints an explicit
      error message in case an hwspinlock is registered with an id number
      that already exists; this will help users catch such base id issues.
      
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      c3c1250e
    • Ohad Ben-Cohen's avatar
      hwspinlock/omap: simplify allocation scheme · c97f6dd0
      Ohad Ben-Cohen authored
      
      
      Instead of allocating every hwspinlock separately, allocate
      them all in one shot.
      
      This both simplifies the driver and helps achieving better
      slab utilization.
      
      Reported-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      c97f6dd0
    • Ohad Ben-Cohen's avatar
      hwspinlock/core: simplify 'owner' handling · e467b642
      Ohad Ben-Cohen authored
      
      
      Use struct device_driver's owner member instead of asking drivers to
      explicitly pass the owner again.
      
      This simplifies drivers and also save some memory, since there's no
      point now in maintaining a separate owner pointer per hwspinlock.
      
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      e467b642
    • Ohad Ben-Cohen's avatar
      hwspinlock/core: simplify Kconfig · 315d8f5c
      Ohad Ben-Cohen authored
      
      
      Simplify hwspinlock's Kconfig by making the global CONFIG_HWSPINLOCK
      entry invisible; users will just select it when needed.
      
      This also prepares the ground for adding hwspinlock support for other
      platforms (the 'depends on ARCH_OMAP4' was rather hideous, and while
      we're at it, a dedicated menu is added).
      
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      315d8f5c
  2. Sep 13, 2011
    • Linus Torvalds's avatar
      Linux 3.1-rc6 · b6fd41e2
      Linus Torvalds authored
      b6fd41e2
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 8cb3ed17
      Linus Torvalds authored
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm: Remove duplicate "return" statement
        drm/nv04/crtc: Bail out if FB is not bound to crtc
        drm/nouveau: fix nv04_sgdma_bind on non-"4kB pages" archs
        drm/nouveau: properly handle allocation failure in nouveau_sgdma_populate
        drm/nouveau: fix oops on pre-semaphore hardware
        drm/nv50/crtc: Bail out if FB is not bound to crtc
        drm/radeon/kms: fix DP detect and EDID fetch for DP bridges
      8cb3ed17
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/arnd/arm-soc · 4c752782
      Linus Torvalds authored
      * 'fixes' of git://git.linaro.org/people/arnd/arm-soc:
        ARM: CSR: add missing sentinels to of_device_id tables
        ARM: cns3xxx: Fix newly introduced warnings in the PCIe code
        ARM: cns3xxx: Fix compile error caused by hardware.h removed
        ARM: davinci: fix cache flush build error
        ARM: davinci: correct MDSTAT_STATE_MASK
        ARM: davinci: da850 EVM: read mac address from SPI flash
        OMAP: omap_device: fix !CONFIG_SUSPEND case in _noirq handlers
        OMAP2430: hwmod: musb: add missing terminator to omap2430_usbhsotg_addrs[]
        OMAP3: clock: indicate that gpt12_fck and wdt1_fck are in the WKUP clockdomain
        OMAP4: clock: fix compile warning
        OMAP4: clock: re-enable previous clockdomain enable/disable sequence
        OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup
        OMAP: powerdomains: Make all powerdomain target states as ON at init
      4c752782
    • Mathieu Desnoyers's avatar
      ioctl: register LTTng ioctl · 14d01ff5
      Mathieu Desnoyers authored
      
      
      The LTTng 2.0 kernel tracer (stand-alone module package, available at
      http://lttng.org) uses the 0xF6 ioctl range for tracer control and
      transport operations.
      
      Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      14d01ff5
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://github.com/chrismason/linux · 0b001b2e
      Linus Torvalds authored
      * 'for-linus' of git://github.com/chrismason/linux:
        Btrfs: add dummy extent if dst offset excceeds file end in
        Btrfs: calc file extent num_bytes correctly in file clone
        btrfs: xattr: fix attribute removal
        Btrfs: fix wrong nbytes information of the inode
        Btrfs: fix the file extent gap when doing direct IO
        Btrfs: fix unclosed transaction handle in btrfs_cont_expand
        Btrfs: fix misuse of trans block rsv
        Btrfs: reset to appropriate block rsv after orphan operations
        Btrfs: skip locking if searching the commit root in csum lookup
        btrfs: fix warning in iput for bad-inode
        Btrfs: fix an oops when deleting snapshots
      0b001b2e
    • Miklos Szeredi's avatar
      fuse: fix memory leak · 5dfcc87f
      Miklos Szeredi authored
      
      
      kmemleak is reporting that 32 bytes are being leaked by FUSE:
      
        unreferenced object 0xe373b270 (size 32):
        comm "fusermount", pid 1207, jiffies 4294707026 (age 2675.187s)
        hex dump (first 32 bytes):
          01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00  ................
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<b05517d7>] kmemleak_alloc+0x27/0x50
          [<b0196435>] kmem_cache_alloc+0xc5/0x180
          [<b02455be>] fuse_alloc_forget+0x1e/0x20
          [<b0245670>] fuse_alloc_inode+0xb0/0xd0
          [<b01b1a8c>] alloc_inode+0x1c/0x80
          [<b01b290f>] iget5_locked+0x8f/0x1a0
          [<b0246022>] fuse_iget+0x72/0x1a0
          [<b02461da>] fuse_get_root_inode+0x8a/0x90
          [<b02465cf>] fuse_fill_super+0x3ef/0x590
          [<b019e56f>] mount_nodev+0x3f/0x90
          [<b0244e95>] fuse_mount+0x15/0x20
          [<b019d1bc>] mount_fs+0x1c/0xc0
          [<b01b5811>] vfs_kern_mount+0x41/0x90
          [<b01b5af9>] do_kern_mount+0x39/0xd0
          [<b01b7585>] do_mount+0x2e5/0x660
          [<b01b7966>] sys_mount+0x66/0xa0
      
      This leak report is consistent and happens once per boot on
      3.1.0-rc5-dirty.
      
      This happens if a FORGET request is queued after the fuse device was
      released.
      
      Reported-by: default avatarSitsofe Wheeler <sitsofe@yahoo.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Tested-by: default avatarSitsofe Wheeler <sitsofe@yahoo.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5dfcc87f
    • Miklos Szeredi's avatar
      fuse: fix flock breakage · 24114504
      Miklos Szeredi authored
      Commit 37fb3a30
      
       ("fuse: fix flock") added in 3.1-rc4 caused flock() to
      fail with ENOSYS with the kernel ABI version 7.16 or earlier.
      
      Fix by falling back to testing FUSE_POSIX_LOCKS for ABI versions 7.16
      and earlier.
      
      Reported-by: default avatarMartin Ziegler <ziegler@email.mathematik.uni-freiburg.de>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Tested-by: default avatarMartin Ziegler <ziegler@email.mathematik.uni-freiburg.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      24114504
    • Arnd Bergmann's avatar
  3. Sep 12, 2011
  4. Sep 11, 2011