1. 11 Aug, 2014 2 commits
  2. 03 Aug, 2014 1 commit
    • Gaurav Minocha's avatar
      of: Fixing OF Selftest build error · 32147e9a
      Gaurav Minocha authored
      This patch is to fix following error while compiling OF selftests.
      "drivers/of/selftest.c:617:2: error: implicit declaration of function
      'of_fdt_unflatten_tree'"
      
      Now, CONFIG_OF_SELFTEST depends on CONFIG_OF_EARLY_FLATTREE so that the
      broken configuration cannot be selected. Ultimately it would be a good
      idea to allow CONFIG_OF_SELFTEST to select CONFIG_OF_EARLY_FLATTREE, but
      there is a dependency problem on i386 and x86_64 that causes dtc to not
      get built and causes the build to fail. That problem needs to be fixed
      first.
      Signed-off-by: default avatarGaurav Minocha <gaurav.minocha.os@gmail.com>
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      32147e9a
  3. 01 Aug, 2014 2 commits
  4. 31 Jul, 2014 1 commit
  5. 25 Jul, 2014 1 commit
    • Gaurav Minocha's avatar
      Adding selftest testdata dynamically into live tree · ae9304c9
      Gaurav Minocha authored
      This patch attaches selftest's device tree data (required by /drivers/of/selftest.c)
      dynamically into live device tree. First, it links selftest device tree data into the
      kernel image and then iterates over all the nodes and attaches them into the live tree.
      Once the testcases are complete, it removes the data attached.
      
      This patch will remove the manual process of addition and removal of selftest device
      tree data into the machine's dts file.
      
      Tested successfully with current selftest's testcases.
      Signed-off-by: default avatarGaurav Minocha <gaurav.minocha.os@gmail.com>
      [glikely: Removed ability to build as a module and fixed no-devicetree bug]
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      ae9304c9
  6. 23 Jul, 2014 6 commits
    • Grant Likely's avatar
      of: Add todo tasklist for Devicetree · 848007ba
      Grant Likely authored
      There are a number of outstanding workitems that need to be done on the
      device tree code. Start tracking them so that interested developers can
      pick up a task and start working on it.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      848007ba
    • Pantelis Antoniou's avatar
      of: Transactional DT support. · 201c910b
      Pantelis Antoniou authored
      Introducing DT transactional support.
      
      A DT transaction is a method which allows one to apply changes
      in the live tree, in such a way that either the full set of changes
      take effect, or the state of the tree can be rolled-back to the
      state it was before it was attempted. An applied transaction
      can be rolled-back at any time.
      
      Documentation is in
      	Documentation/devicetree/changesets.txt
      Signed-off-by: default avatarPantelis Antoniou <pantelis.antoniou@konsulko.com>
      [glikely: Removed device notifiers and reworked to be more consistent]
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      201c910b
    • Grant Likely's avatar
      of: Reorder device tree changes and notifiers · 259092a3
      Grant Likely authored
      Currently, devicetree reconfig notifiers get emitted before the change
      is applied to the tree, but that behaviour is problematic if the
      receiver wants the determine the new state of the tree. The current
      users don't care, but the changeset code to follow will be making
      multiple changes at once. Reorder notifiers to get emitted after the
      change has been applied to the tree so that callbacks see the new tree
      state.
      
      At the same time, fixup the existing callbacks to expect the new order.
      There are a few callbacks that compare the old and new values of a
      changed property. Put both property pointers into the of_prop_reconfig
      structure.
      
      The current notifiers also allow the notifier callback to fail and
      cancel the change to the tree, but that feature isn't actually used.
      It really isn't valid to ignore a tree modification provided by firmware
      anyway, so remove the ability to cancel a change to the tree.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Nathan Fontenot <nfont@austin.ibm.com>
      259092a3
    • Grant Likely's avatar
      of: Move dynamic node fixups out of powerpc and into common code · a25095d4
      Grant Likely authored
      PowerPC does an odd thing with dynamic nodes. It uses a notifier to
      catch new node additions and set some of the values like name and type.
      This makes no sense since that same code can be put directly into
      of_attach_node(). Besides, all dynamic node users need this, not just
      powerpc. Fix this problem by moving the logic out of arch/powerpc and
      into drivers/of/dynamic.c.
      
      It is also important to remove this notifier because we want to move the
      firing of notifiers from before the tree is modified to after so that
      the receiver gets a consistent view of the tree, but that is
      incompatible with notifiers that modify the node.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      Cc: Nathan Fontenot <nfont@austin.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      a25095d4
    • Grant Likely's avatar
      of: Make sure attached nodes don't carry along extra children · 6162dbe4
      Grant Likely authored
      The child pointer does not get cleared when attaching new nodes which
      could cause the tree to be inconsistent. Clear the child pointer in
      __of_attach_node() to be absolutely sure that the structure remains in a
      consistent layout.
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      6162dbe4
    • Grant Likely's avatar
      of: Make devicetree sysfs update functions consistent. · 8a2b22a2
      Grant Likely authored
      All of the DT modification functions are split into two parts, the first
      part manipulates the DT data structure, and the second part updates
      sysfs, but the code isn't very consistent about how the second half is
      called. They don't all enforce the same rules about when it is valid to
      update sysfs, and there isn't any clarity on locking.
      
      The transactional DT modification feature that is coming also needs
      access to these functions so that it can perform all the structure
      changes together, and then all the sysfs updates as a second stage
      instead of doing each one at a time.
      
      Fix up the second have by creating a separate __of_*_sysfs() function
      for each of the helpers. The new functions have consistent naming (ie.
      of_node_add() becomes __of_attach_node_sysfs()) and all of them now
      defer if of_init hasn't been called yet.
      
      Callers of the new functions must hold the of_mutex to ensure there are
      no race conditions with of_init(). The mutex ensures that there will
      only ever be one writer to the tree at any given time. There can still
      be any number of readers and the raw_spin_lock is still used to make
      sure access to the data structure is still consistent.
      
      Finally, put the function prototypes into of_private.h so they are
      accessible to the transaction code.
      Signed-off-by: default avatarPantelis Antoniou <pantelis.antoniou@konsulko.com>
      [grant.likely: Changed suffix from _post to _sysfs to match existing code]
      [grant.likely: Reorganized to eliminate trivial wrappers]
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      8a2b22a2
  7. 16 Jul, 2014 2 commits
    • Pantelis Antoniou's avatar
      of: Create unlocked versions of node and property add/remove functions · d8c50088
      Pantelis Antoniou authored
      The DT overlay code will need to manipulate nodes and properties while
      already holding the devicetree lock, or on nodes that are not yet
      attached to the tree, but the current helper functions don't allow that.
      Extract the core behaviour from the accessors and create the following
      unlocked variants.
      
      The unlocked variants require either the lock to already be held or for
      the nodes to be detached from the tree. Changes to live nodes will not
      get updated in sysfs, so the caller must arrange for housekeeping to
      take place after dropping the lock.
      
      The new functions are: __of_add_property(), __of_remove_property(),
      __of_update_property(), __of_attach_node() and __of_detach_node().
      Signed-off-by: default avatarPantelis Antoniou <pantelis.antoniou@konsulko.com>
      [Remove unnecessary diff hunks and rewrite commit text]
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      d8c50088
    • Pantelis Antoniou's avatar
      OF: Utility helper functions for dynamic nodes · 69843396
      Pantelis Antoniou authored
      Introduce helper functions for working with the live DT tree,
      all of them related to dynamically adding/removing nodes and
      properties.
      
      __of_prop_dup() copies a property dynamically
      __of_node_alloc() creates an empty node
      
      Bug fix about prop->len == 0 by Ionut Nicu <ioan.nicu.ext@nsn.com>
      Signed-off-by: default avatarPantelis Antoniou <pantelis.antoniou@konsulko.com>
      [glikely: Added unittest for of_copy_property and dropped fine-grained allocations]
      [glikely: removed name, type and phandle arguments from __of_node_alloc]
      Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
      69843396
  8. 07 Jul, 2014 3 commits
  9. 06 Jul, 2014 4 commits
    • Linus Torvalds's avatar
      Linux 3.16-rc4 · cd3de83f
      Linus Torvalds authored
      cd3de83f
    • Linus Torvalds's avatar
      Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux · 100193f5
      Linus Torvalds authored
      Pull devicetree bugfix from Grant Likely:
       "Important bug fix for parsing 64-bit addresses on 32-bit platforms.
        Without this patch the kernel will try to use memory ranges that
        cannot be reached"
      
      * tag 'dt-for-linus' of git://git.secretlab.ca/git/linux:
        of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch
      100193f5
    • Linus Torvalds's avatar
      Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 8addf0c7
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a set of 13 fixes, a MAINTAINERS update and a sparse update.
        The fixes are mostly correct value initialisations, avoiding NULL
        derefs and some uninitialised pointer avoidance.
      
        All the patches have been incubated in -next for a few days.  The
        final patch (use the scsi data buffer length to extract transfer size)
        has been rebased to add a cc to stable, but only the commit message
        has changed"
      
      * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        [SCSI] use the scsi data buffer length to extract transfer size
        virtio-scsi: fix various bad behavior on aborted requests
        virtio-scsi: avoid cancelling uninitialized work items
        ibmvscsi: Add memory barriers for send / receive
        ibmvscsi: Abort init sequence during error recovery
        qla2xxx: Fix sparse warning in qla_target.c.
        bnx2fc: Improve stats update mechanism
        bnx2fc: do not scan uninitialized lists in case of error.
        fc: ensure scan_work isn't active when freeing fc_rport
        pm8001: Fix potential null pointer dereference and memory leak.
        MAINTAINERS: Update LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) maintainers Email IDs
        be2iscsi: remove potential junk pointer free
        be2iscsi: add an missing goto in error path
        scsi_error: set DID_TIME_OUT correctly
        scsi_error: fix invalid setting of host byte
      8addf0c7
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 110e4308
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "i915, tda998x and vmwgfx fixes,
      
        The main one is i915 fix for missing VGA connectors, along with some
        fixes for the tda998x from Russell fixing some modesetting problems.
      
        (still on holidays, but got a spare moment to find these)"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/vmwgfx: Fix incorrect write to read-only register v2:
        drm/i915: Drop early VLV WA to fix Voltage not getting dropped to Vmin
        drm/i915: only apply crt_present check on VLV
        drm/i915: Wait for vblank after enabling the primary plane on BDW
        drm/i2c: tda998x: add some basic mode validation
        drm/i2c: tda998x: faster polling for edid
        drm/i2c: tda998x: move drm_i2c_encoder_destroy call
      110e4308
  10. 05 Jul, 2014 12 commits
  11. 04 Jul, 2014 6 commits