1. 23 Jul, 2014 2 commits
    • 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
  2. 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
  3. 07 Jul, 2014 3 commits
  4. 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
  5. 05 Jul, 2014 12 commits
  6. 04 Jul, 2014 15 commits
  7. 03 Jul, 2014 2 commits