Skip to content
  1. May 23, 2013
  2. May 22, 2013
    • Viresh Kumar's avatar
      cpufreq: arm_big_little_dt: Instantiate as platform_driver · 9076eaca
      Viresh Kumar authored
      
      
      As multiplatform build is being adopted by more and more ARM platforms, initcall
      function should be used very carefully. For example, when both arm_big_little_dt
      and cpufreq-cpu0 drivers are compiled in, arm_big_little_dt driver may try to
      register even if we had platform device for cpufreq-cpu0 registered.
      
      To eliminate this undesired the effect, the patch changes arm_big_little_dt
      driver to have it instantiated as a platform_driver. Then it will only run on
      platforms that create the platform_device "arm-bL-cpufreq-dt".
      
      Reported-and-tested-by: default avatarRob Herring <robherring2@gmail.com>
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9076eaca
    • Viresh Kumar's avatar
      cpufreq: arm_big_little_dt: Register driver only if DT has valid data · 92a9b5c2
      Viresh Kumar authored
      
      
      If arm_big_little_dt driver is enabled, then it will always try to register with
      big LITTLE cpufreq core driver. In case DT doesn't have relevant data for cpu
      nodes, i.e. operating points aren't present, then we should exit early and
      shouldn't register with big LITTLE cpufreq core driver. Otherwise we will fail
      continuously from the driver->init() routine.
      
      This patch fixes this issue.
      
      Reported-and-tested-by: default avatarJon Medhurst <tixy@linaro.org>
      Reviewed-by: default avatarJon Medhurst <tixy@linaro.org>
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      92a9b5c2
    • Rafał Bilski's avatar
      cpufreq / e_powersaver: Fix linker error when ACPI processor is a module · b5f14720
      Rafał Bilski authored
      
      
      on i386:
      CONFIG_ACPI_PROCESSOR=m
      CONFIG_X86_E_POWERSAVER=y
      
      drivers/built-in.o: In function `eps_cpu_init.part.8':
      e_powersaver.c:(.text.unlikely+0x2243): undefined reference to `acpi_processor_register_performance'
      e_powersaver.c:(.text.unlikely+0x22a2): undefined reference to `acpi_processor_unregister_performance'
      e_powersaver.c:(.text.unlikely+0x246b): undefined reference to `acpi_processor_get_bios_limit'
      
      X86_E_POWERSAVER should also depend on ACPI_PROCESSOR.
      
      Signed-off-by: default avatarRafal Bilski <rafalbilski@interia.pl>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b5f14720
    • Dirk Brandewie's avatar
      cpufreq / intel_pstate: Add additional supported CPU ID · c96d53d6
      Dirk Brandewie authored
      
      
      Add CPU ID for Ivybrigde processor.
      
      Signed-off-by: default avatarDirk Brandewie <dirk.j.brandewie@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c96d53d6
    • Viresh Kumar's avatar
      cpufreq: Drop rwsem lock around CPUFREQ_GOV_POLICY_EXIT · 955ef483
      Viresh Kumar authored
      
      
      With the rwsem lock around
      __cpufreq_governor(policy, CPUFREQ_GOV_POLICY_EXIT), we
      get circular dependency when we call sysfs_remove_group().
      
       ======================================================
       [ INFO: possible circular locking dependency detected ]
       3.9.0-rc7+ #15 Not tainted
       -------------------------------------------------------
       cat/2387 is trying to acquire lock:
        (&per_cpu(cpu_policy_rwsem, cpu)){+++++.}, at: [<c02f6179>] lock_policy_rwsem_read+0x25/0x34
      
       but task is already holding lock:
        (s_active#41){++++.+}, at: [<c00f9bf7>] sysfs_read_file+0x4f/0xcc
      
       which lock already depends on the new lock.
      
       the existing dependency chain (in reverse order) is:
      
      -> #1 (s_active#41){++++.+}:
              [<c0055a79>] lock_acquire+0x61/0xbc
              [<c00fabf1>] sysfs_addrm_finish+0xc1/0x128
              [<c00f9819>] sysfs_hash_and_remove+0x35/0x64
              [<c00fbe6f>] remove_files.isra.0+0x1b/0x24
              [<c00fbea5>] sysfs_remove_group+0x2d/0xa8
              [<c02f9a0b>] cpufreq_governor_interactive+0x13b/0x35c
              [<c02f61df>] __cpufreq_governor+0x2b/0x8c
              [<c02f6579>] __cpufreq_set_policy+0xa9/0xf8
              [<c02f6b75>] store_scaling_governor+0x61/0x100
              [<c02f6f4d>] store+0x39/0x60
              [<c00f9b81>] sysfs_write_file+0xed/0x114
              [<c00b3fd1>] vfs_write+0x65/0xd8
              [<c00b424b>] sys_write+0x2f/0x50
              [<c000cdc1>] ret_fast_syscall+0x1/0x52
      
      -> #0 (&per_cpu(cpu_policy_rwsem, cpu)){+++++.}:
              [<c0055253>] __lock_acquire+0xef3/0x13dc
              [<c0055a79>] lock_acquire+0x61/0xbc
              [<c03ee1f5>] down_read+0x25/0x30
              [<c02f6179>] lock_policy_rwsem_read+0x25/0x34
              [<c02f6edd>] show+0x21/0x58
              [<c00f9c0f>] sysfs_read_file+0x67/0xcc
              [<c00b40a7>] vfs_read+0x63/0xd8
              [<c00b41fb>] sys_read+0x2f/0x50
              [<c000cdc1>] ret_fast_syscall+0x1/0x52
      
       other info that might help us debug this:
      
        Possible unsafe locking scenario:
      
              CPU0                    CPU1
              ----                    ----
         lock(s_active#41);
                                      lock(&per_cpu(cpu_policy_rwsem, cpu));
                                      lock(s_active#41);
         lock(&per_cpu(cpu_policy_rwsem, cpu));
      
        *** DEADLOCK ***
      
       2 locks held by cat/2387:
        #0:  (&buffer->mutex){+.+.+.}, at: [<c00f9bcd>] sysfs_read_file+0x25/0xcc
        #1:  (s_active#41){++++.+}, at: [<c00f9bf7>] sysfs_read_file+0x4f/0xcc
      
       stack backtrace:
       [<c0011d55>] (unwind_backtrace+0x1/0x9c) from [<c03e9a09>] (print_circular_bug+0x19d/0x1e8)
       [<c03e9a09>] (print_circular_bug+0x19d/0x1e8) from [<c0055253>] (__lock_acquire+0xef3/0x13dc)
       [<c0055253>] (__lock_acquire+0xef3/0x13dc) from [<c0055a79>] (lock_acquire+0x61/0xbc)
       [<c0055a79>] (lock_acquire+0x61/0xbc) from [<c03ee1f5>] (down_read+0x25/0x30)
       [<c03ee1f5>] (down_read+0x25/0x30) from [<c02f6179>] (lock_policy_rwsem_read+0x25/0x34)
       [<c02f6179>] (lock_policy_rwsem_read+0x25/0x34) from [<c02f6edd>] (show+0x21/0x58)
       [<c02f6edd>] (show+0x21/0x58) from [<c00f9c0f>] (sysfs_read_file+0x67/0xcc)
       [<c00f9c0f>] (sysfs_read_file+0x67/0xcc) from [<c00b40a7>] (vfs_read+0x63/0xd8)
       [<c00b40a7>] (vfs_read+0x63/0xd8) from [<c00b41fb>] (sys_read+0x2f/0x50)
       [<c00b41fb>] (sys_read+0x2f/0x50) from [<c000cdc1>] (ret_fast_syscall+0x1/0x52)
      
      This lock isn't required while calling __cpufreq_governor(policy,
      CPUFREQ_GOV_POLICY_EXIT). Remove it.
      
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      955ef483
    • Rafael J. Wysocki's avatar
      ACPI / PM: Allow device power states to be used for CONFIG_PM unset · ec4602a9
      Rafael J. Wysocki authored
      
      
      Currently, drivers/acpi/device_pm.c depends on CONFIG_PM and all of
      the functions defined in there are replaced with static inline stubs
      if that option is unset.  However, CONFIG_PM means, roughly, "runtime
      PM or suspend/hibernation support" and some of those functions are
      useful regardless of that.  For example, they are used by the ACPI
      fan driver for controlling fans and acpi_device_set_power() is called
      during device removal.  Moreover, device initialization may depend on
      setting device power states properly.
      
      For these reasons, make the routines manipulating ACPI device power
      states defined in drivers/acpi/device_pm.c available for CONFIG_PM
      unset too.
      
      Reported-by: default avatarZhang Rui <rui.zhang@intel.com>
      Reported-and-tested-by: default avatarMichel Lespinasse <walken@google.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: 3.9+ <stable@vger.kernel.org>
      ec4602a9
  3. May 21, 2013
  4. May 20, 2013
  5. May 19, 2013
    • Jean Delvare's avatar
      hwmon: (tmp401) Drop redundant safety on cache lifetime · 4e2284d2
      Jean Delvare authored
      
      
      time_after (as opposed to time_after_equal) already ensures that the
      cache lifetime is at least as much as requested. There is no point in
      manually adding another jiffy to that value, and this can confuse the
      reader into wrong interpretation.
      
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      4e2284d2
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 130901ba
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "Miao Xie has been very busy, fixing races and enospc problems and many
        other small but important pieces.
      
        Alexandre Oliva discovered some problems with how our error handling
        was interacting with the block layer and for now has disabled our
        partial handling of sub-page writes.  The real sub-page work is in a
        series of patches from IBM that we still need to integrate and test.
        The code Alexandre has turned off was really incomplete.
      
        Josef has more error handling fixes and an important fix for the new
        skinny extent format.
      
        This also has my fix for the tracepoint crash from late in 3.9.  It's
        the first stage in a larger clean up to get rid of btrfs_bio and make
        a proper bioset for all the items we need to tack into the bio.  For
        now the bioset only holds our mirror_num and stripe_index, but for the
        next merge window I'll shuffle more in."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (25 commits)
        Btrfs: use a btrfs bioset instead of abusing bio internals
        Btrfs: make sure roots are assigned before freeing their nodes
        Btrfs: explicitly use global_block_rsv for quota_tree
        btrfs: do away with non-whole_page extent I/O
        Btrfs: don't invoke btrfs_invalidate_inodes() in the spin lock context
        Btrfs: remove BUG_ON() in btrfs_read_fs_tree_no_radix()
        Btrfs: pause the space balance when remounting to R/O
        Btrfs: fix unprotected root node of the subvolume's inode rb-tree
        Btrfs: fix accessing a freed tree root
        Btrfs: return errno if possible when we fail to allocate memory
        Btrfs: update the global reserve if it is empty
        Btrfs: don't steal the reserved space from the global reserve if their space type is different
        Btrfs: optimize the error handle of use_block_rsv()
        Btrfs: don't use global block reservation for inode cache truncation
        Btrfs: don't abort the current transaction if there is no enough space for inode cache
        Correct allowed raid levels on balance.
        Btrfs: fix possible memory leak in replace_path()
        Btrfs: fix possible memory leak in the find_parent_nodes()
        Btrfs: don't allow device replace on RAID5/RAID6
        Btrfs: handle running extent ops with skinny metadata
        ...
      130901ba
    • Linus Torvalds's avatar
      Merge branch 'devm_no_resource_check' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · e5106682
      Linus Torvalds authored
      Pull devm usage cleanup from Wolfram Sang:
       "Lately, I have been experimenting how to improve the devm interface to
        make writing device drivers easier and less error prone while also
        getting rid of its subtle issues.  I think it has more potential but
        still needs work and definately conistency, especiall in its usage.
      
        The first thing I come up with is a low hanging fruit regarding
        devm_ioremap_resouce().  This function already checks if the passed
        resource is valid and gives an error message if not.  So, we can
        remove similar checks from the drivers and get rid of a bit of code
        and a number of inconsistent error strings.
      
        This series only removes the unneeded check iff devm_ioremap_resource
        follows platform_get_resource directly.  The previous version tried to
        shuffle code if needed, too, what lead to an embarrasing bug.  It
        turned out to me that shuffling code for all cases found will make the
        automated script too complex, so I am unsure if an automated cleanup
        is the proper tool for this case.  Removing the easy stuff seems
        worthwhile to me, though.
      
        Despite various architectures and platform dependencies, I managed to
        compile test 45 out of 57 modified files locally using heuristics and
        defconfigs."
      
      Pulled because: 296 deletions, 0 additions.
      
      * 'devm_no_resource_check' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (33 commits)
        sound/soc/kirkwood: don't check resource with devm_ioremap_resource
        sound/soc/fsl: don't check resource with devm_ioremap_resource
        arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource
        arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
        arch/arm/mach-tegra: don't check resource with devm_ioremap_resource
        drivers/watchdog: don't check resource with devm_ioremap_resource
        drivers/w1/masters: don't check resource with devm_ioremap_resource
        drivers/video/omap2/dss: don't check resource with devm_ioremap_resource
        drivers/video/omap2: don't check resource with devm_ioremap_resource
        drivers/usb/phy: don't check resource with devm_ioremap_resource
        drivers/usb/host: don't check resource with devm_ioremap_resource
        drivers/usb/gadget: don't check resource with devm_ioremap_resource
        drivers/usb/chipidea: don't check resource with devm_ioremap_resource
        drivers/thermal: don't check resource with devm_ioremap_resource
        drivers/staging/nvec: don't check resource with devm_ioremap_resource
        drivers/staging/dwc2: don't check resource with devm_ioremap_resource
        drivers/spi: don't check resource with devm_ioremap_resource
        drivers/rtc: don't check resource with devm_ioremap_resource
        drivers/pwm: don't check resource with devm_ioremap_resource
        drivers/pinctrl: don't check resource with devm_ioremap_resource
        ...
      e5106682
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux · ff9129b0
      Linus Torvalds authored
      Pull device tree fixes from Grant Likely:
       "Device tree bug fixes and documentation updates for v3.10
      
        Nothing earth shattering here.  A build failure fix, and fix for
        releasing nodes and some documenation updates."
      
      * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
        Documentation/devicetree: make semantic of initrd-end more explicit
        of/base: release the node correctly in of_parse_phandle_with_args()
        of/documentation: move video device bindings to a common place
        <linux/of_platform.h>: fix compilation warnings with DT disabled
      ff9129b0
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 3c6a279f
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "Patching up across the field.  The reversion of the two ASID patches
        is particularly important as it was breaking many platforms."
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: ralink: use the dwc2 driver for the rt305x USB controller
        MIPS: Extract schedule_mfi info from __schedule
        MIPS: Fix sibling call handling in get_frame_info
        MIPS: MSP71xx: remove inline marking of EXPORT_SYMBOL functions
        MIPS: Make virt_to_phys() work for all unmapped addresses.
        MIPS: Fix build error for crash_dump.c in 3.10-rc1
        MIPS: Xway: Fix clk leak
        Revert "MIPS: Allow ASID size to be determined at boot time."
        Revert "MIPS: microMIPS: Support dynamic ASID sizing."
      3c6a279f
    • Linus Torvalds's avatar
      Merge tag 'kmemleak-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64 · 8f05bde9
      Linus Torvalds authored
      Pull kmemleak patches from Catalin Marinas:
       "Kmemleak now scans all the writable and non-executable module sections
        to avoid false positives (previously it was only scanning specific
        sections and missing .ref.data)."
      
      * tag 'kmemleak-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
        kmemleak: No need for scanning specific module sections
        kmemleak: Scan all allocated, writeable and not executable module sections
      8f05bde9
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64 · f71df633
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
       "Fixes for duplicate definition of early_console, kernel/time/Kconfig
        include, __flush_dcache_all() set/way computing, debug (locking, bit
        testing).  The of_platform_populate() was moved to an arch_init_call()
        to allow subsys_init_call() drivers to probe the DT."
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
        arm64: debug: fix mdscr.ss check when enabling debug exceptions
        arm64: Do not source kernel/time/Kconfig explicitly
        arm64: mm: Fix operands of clz in __flush_dcache_all
        arm64: Invoke the of_platform_populate() at arch_initcall() level
        arm64: debug: clear mdscr_el1 instead of taking the OS lock
        arm64: Fix duplicate definition of early_console
      f71df633
  6. May 18, 2013