1. 04 Apr, 2013 13 commits
  2. 03 Apr, 2013 7 commits
  3. 02 Apr, 2013 2 commits
    • Mike Turquette's avatar
      clk: allow reentrant calls into the clk framework · 533ddeb1
      Mike Turquette authored
      Reentrancy into the clock framework is necessary for clock operations
      that result in nested calls to the clk api.  A common example is a clock
      that is prepared via an i2c transaction, such as a clock inside of a
      discrete audio chip or a power management IC.  The i2c subsystem itself
      will use the clk api resulting in a deadlock:
      
      clk_prepare(audio_clk)
      	i2c_transfer(..)
      		clk_prepare(i2c_controller_clk)
      
      The ability to reenter the clock framework prevents this deadlock.
      
      Other use cases exist such as allowing .set_rate callbacks to call
      clk_set_parent to achieve the best rate, or to save power in certain
      configurations.  Yet another example is performing pinctrl operations
      from a clk_ops callback.  Calls into the pinctrl subsystem may call
      clk_{un}prepare on an unrelated clock.  Allowing for nested calls to
      reenter the clock framework enables both of these use cases.
      
      Reentrancy is implemented by two global pointers that track the owner
      currently holding a global lock.  One pointer tracks the owner during
      sleepable, mutex-protected operations and the other one tracks the owner
      during non-interruptible, spinlock-protected operations.
      
      When the clk framework is entered we try to hold the global lock.  If it
      is held we compare the current task against the current owner; a match
      implies a nested call and we reenter.  If the values do not match then
      we block on the lock until it is released.
      Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
      Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org>
      Cc: David Brown <davidb@codeaurora.org>
      Tested-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      533ddeb1
    • Mike Turquette's avatar
      clk: abstract locking out into helper functions · eab89f69
      Mike Turquette authored
      Create locking helpers for the global mutex and global spinlock.  The
      definitions of these helpers will be expanded upon in the next patch
      which introduces reentrancy into the locking scheme.
      Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
      Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org>
      Cc: David Brown <davidb@codeaurora.org>
      Tested-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      eab89f69
  4. 27 Mar, 2013 6 commits
  5. 26 Mar, 2013 1 commit
    • Prashant Gaikwad's avatar
      clk: Add composite clock type · ece70094
      Prashant Gaikwad authored
      Not all clocks are required to be decomposed into basic clock
      types but at the same time want to use the functionality
      provided by these basic clock types instead of duplicating.
      
      For example, Tegra SoC has ~100 clocks which can be decomposed
      into Mux -> Div -> Gate clock types making the clock count to
      ~300. Also, parent change operation can not be performed on gate
      clock which forces to use mux clock in driver if want to change
      the parent.
      
      Instead aggregate the basic clock types functionality into one
      clock and just use this clock for all operations. This clock
      type re-uses the functionality of basic clock types and not
      limited to basic clock types but any hardware-specific
      implementation.
      Signed-off-by: default avatarPrashant Gaikwad <pgaikwad@nvidia.com>
      Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
      ece70094
  6. 23 Mar, 2013 8 commits
  7. 22 Mar, 2013 3 commits
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/users/willy/linux-nvme · 5da273fe
      Linus Torvalds authored
      Pull NVMe driver update from Matthew Wilcox:
       "These patches have mostly been baking for a few months; sorry I didn't
        get them in during the merge window.  They're all bug fixes, except
        for the addition of the SMART log and the addition to MAINTAINERS."
      
      * git://git.infradead.org/users/willy/linux-nvme:
        NVMe: Add namespaces with no LBA range feature
        MAINTAINERS: Add entry for the NVMe driver
        NVMe: Initialize iod nents to 0
        NVMe: Define SMART log
        NVMe: Add result to nvme_get_features
        NVMe: Set result from user admin command
        NVMe: End queued bio requests when freeing queue
        NVMe: Free cmdid on nvme_submit_bio error
      5da273fe
    • Linus Torvalds's avatar
      Merge branch 'akpm' (fixes from Andrew) · 14629ed3
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton.
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        mqueue: sys_mq_open: do not call mnt_drop_write() if read-only
        mm/hotplug: only free wait_table if it's allocated by vmalloc
        dma-debug: update DMA debug API to better handle multiple mappings of a buffer
        dma-debug: fix locking bug in check_unmap()
        drivers/rtc/rtc-at91rm9200.c: use a variable for storing IMR
        drivers/video/ep93xx-fb.c: include <linux/io.h> for devm_ioremap()
        drivers/rtc/rtc-da9052.c: fix for rtc device registration
        mm: zone_end_pfn is too small
        poweroff: change orderly_poweroff() to use schedule_work()
        mm/hugetlb: fix total hugetlbfs pages count when using memory overcommit accouting
        printk: Provide a wake_up_klogd() off-case
        irq_work.h: fix warning when CONFIG_IRQ_WORK=n
      14629ed3
    • Vladimir Davydov's avatar
      mqueue: sys_mq_open: do not call mnt_drop_write() if read-only · 38d78e58
      Vladimir Davydov authored
      mnt_drop_write() must be called only if mnt_want_write() succeeded,
      otherwise the mnt_writers counter will diverge.
      
      mnt_writers counters are used to check if remounting FS as read-only is
      OK, so after an extra mnt_drop_write() call, it would be impossible to
      remount mqueue FS as read-only.  Besides, on umount a warning would be
      printed like this one:
      
        =====================================
        [ BUG: bad unlock balance detected! ]
        3.9.0-rc3 #5 Not tainted
        -------------------------------------
        a.out/12486 is trying to release lock (sb_writers) at:
        mnt_drop_write+0x1f/0x30
        but there are no more locks to release!
      Signed-off-by: default avatarVladimir Davydov <vdavydov@parallels.com>
      Cc: Doug Ledford <dledford@redhat.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      38d78e58