1. 04 Oct, 2014 5 commits
    • Grant Likely's avatar
      of/selftest: Use the resolver to fixup phandles · 2eb46da2
      Grant Likely authored
      The selftest data ends up causing duplicate phandles in the live tree
      for the time that the testcase data is inserted into the live tree. This
      is obviously a bad situation because anything attempting to read the
      tree while the selftests are running make resolve phandles to one of the
      testcase data nodes. Fix the problem by using the of_resolve_phandles()
      function to eliminate duplicates.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
      2eb46da2
    • Pantelis Antoniou's avatar
      of: Introduce Device Tree resolve support. · 7941b27b
      Pantelis Antoniou authored
      Introduce support for dynamic device tree resolution.
      Using it, it is possible to prepare a device tree that's
      been loaded on runtime to be modified and inserted at the kernel
      live tree.
      
      Export of of_resolve and bug fix of double free by
      	Guenter Roeck <groeck@juniper.net>
      Signed-off-by: default avatarPantelis Antoniou <pantelis.antoniou@konsulko.com>
      [grant.likely: Don't need to select CONFIG_OF_DYNAMIC and CONFIG_OF_DEVICE]
      [grant.likely: Don't need to depend on OF or !SPARC]
      [grant.likely: Factor out duplicate code blocks into single function]
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      7941b27b
    • Grant Likely's avatar
      of/selftest: Add a test for duplicate phandles · 841ec213
      Grant Likely authored
      All phandles in the tree should be unique. Add a testcase to make sure
      that this is so.
      
      Note: this testcase fails on the current kernel because the selftest
      code itself ends up adding duplicate phandles. Before this testcase is
      merged the selftest code needs to be modified to resolve phandles before
      adding them.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
      841ec213
    • Grant Likely's avatar
      of: Don't try to search when phandle == 0 · fc59b447
      Grant Likely authored
      A value of '0' isn't a valid phandle, so searching for a node with that
      phandle is pointless. It will result in nothing but false positives.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      fc59b447
    • Grant Likely's avatar
      of/selftest: Test structure of device tree · f2051d6a
      Grant Likely authored
      Add a testcase to verify that the device tree is properly constructed
      and the lists are in a correct order. The new testcase gets run twice;
      once after adding the testcase data, and once after removing it again.
      It is run twice to make sure adding and removing the testcase data
      doesn't corrupt the data structure.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
      f2051d6a
  2. 01 Oct, 2014 1 commit
    • Grant Likely's avatar
      of: Fix NULL dereference in selftest removal code · e66c98c7
      Grant Likely authored
      The selftest code removes its testcase data from the live tree when
      exiting, but if the testcases data tree contains an empty child of the
      root, then it causes an oops due to a NULL dereference. The reason is
      that the code tries to directly dereference the child pointer without
      checking first if a child is actually there.
      
      The solution is to pass the parent node into detach_node_and_children()
      instead of trying to pass the child. This required removing the code
      that attempts to remove all of the sibling nodes in
      detach_node_and_children(), which was never sensible in the first place.
      
      At the same time add a check to make sure the bounds of the nodes list
      are not exceeded by the testdata tree. If they are then abort.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Gaurav Minocha <gaurav.minocha.os@gmail.com>
      e66c98c7
  3. 28 Sep, 2014 3 commits
  4. 27 Sep, 2014 15 commits
  5. 26 Sep, 2014 14 commits
  6. 25 Sep, 2014 2 commits
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-3.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · f4cb707e
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
       "These are regression fixes (ACPI hotplug, cpufreq, hibernation, ACPI
        LPSS driver), fixes for stuff that never worked correctly (ACPI GPIO
        support in some cases and a wrong sign of an error code in the ACPI
        core in one place), and one blacklist item for ACPI backlight
        handling.
      
        Specifics:
      
         - Revert of a recent hibernation core commit that introduced a NULL
           pointer dereference during resume for at least one user (Rafael J
           Wysocki).
      
         - Fix for the ACPI LPSS (Low-Power Subsystem) driver to disable
           asynchronous PM callback execution for LPSS devices during system
           suspend/resume (introduced in 3.16) which turns out to break
           ordering expectations on some systems.  From Fu Zhonghui.
      
         - cpufreq core fix related to the handling of sysfs nodes during
           system suspend/resume that has been broken for intel_pstate since
           3.15 from Lan Tianyu.
      
         - Restore the generation of "online" uevents for ACPI container
           devices that was removed in 3.14, but some user space utilities
           turn out to need them (Rafael J Wysocki).
      
         - The cpufreq core fails to release a lock in an error code path
           after changes made in 3.14.  Fix from Prarit Bhargava.
      
         - ACPICA and ACPI/GPIO fixes to make the handling of ACPI GPIO
           operation regions (which means AML using GPIOs) work correctly in
           all cases from Bob Moore and Srinivas Pandruvada.
      
         - Fix for a wrong sign of the ACPI core's create_modalias() return
           value in case of an error from Mika Westerberg.
      
         - ACPI backlight blacklist entry for ThinkPad X201s from Aaron Lu"
      
      * tag 'pm+acpi-3.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        Revert "PM / Hibernate: Iterate over set bits instead of PFNs in swsusp_free()"
        gpio / ACPI: Use pin index and bit length
        ACPICA: Update to GPIO region handler interface.
        ACPI / platform / LPSS: disable async suspend/resume of LPSS devices
        cpufreq: release policy->rwsem on error
        cpufreq: fix cpufreq suspend/resume for intel_pstate
        ACPI / scan: Correct error return value of create_modalias()
        ACPI / video: disable native backlight for ThinkPad X201s
        ACPI / hotplug: Generate online uevents for ACPI containers
      f4cb707e
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 12df9f37
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "This is probably not the kind of pull request you want to see that
        late in the cycle.  Yet, the ACPI refactorization was problematic
        again and caused another two issues which need fixing.  My holidays
        with limited internet (plus travelling) and the developer's illness
        didn't help either :(
      
        The details:
      
         - ACPI code was refactored out into a seperate file and as a
           side-effect, the i2c-core module got renamed.  Jean Delvare
           rightfully complained about the rename being problematic for
           distributions.  So, Mika and I thought the least problematic way to
           deal with it is to move all the code back into the main i2c core
           source file.  This is mainly a huge code move with some #ifdeffery
           applied.  No functional code changes.  Our personal tests and the
           testbots did not find problems.  (I was thinking about reverting,
           too, yet that would also have ~800 lines changed)
      
         - The new ACPI code also had a NULL pointer exception, thanks to
           Peter for finding and fixing it.
      
         - Mikko fixed a locking problem by decoupling clock_prepare and
           clock_enable.
      
         - Addy learnt that the datasheet was wrong and reimplemented the
           frequency setup according to the new algorithm.
      
        - Fan fixed an off-by-one error when copying data
      
        - Janusz fixed a copy'n'paste bug which gave a wrong error message
      
        - Sergei made sure that "don't touch" bits are not accessed"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: acpi: Fix NULL Pointer dereference
        i2c: move acpi code back into the core
        i2c: rk3x: fix divisor calculation for SCL frequency
        i2c: mxs: fix error message in pio transfer
        i2c: ismt: use correct length when copy buffer
        i2c: rcar: fix RCAR_IRQ_ACK_{RECV|SEND}
        i2c: tegra: Move clk_prepare/clk_set_rate to probe
      12df9f37