[Crosstoolchain-logs] [device-tree-compiler] 178/357: dtc: Don't force alignment of cell list data

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:11 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.

commit f7497dc6be43769abb9119d7bed8fb08f4eecff6
Author: David Gibson <david at gibson.dropbear.id.au>
Date:   Fri Nov 2 16:54:26 2007 +1100

    dtc: Don't force alignment of cell list data
    
    At present, defining a property as, say:
    	foo = [abcd], <ffffffff>;
    
    Will cause dtc to insert 2 bytes of zeros between the abcd and the
    ffffffff, to align the cell form data.
    
    Doing so seemed like a good idea at the time, but I don't believe
    there are any users who actually rely on this behaviour.  Segher
    claims that OF has some defined bindings which include properties an
    unaligned subsection of which is interpreted as 32-bit ints (i.e. like
    cell data).
    
    Worse, this alignment will cause nothing but pain when we add
    expression support to dtc (when celldata is included in a larger
    bytestring expession, we won't know the size of the preceding chunk of
    the expression until it's evaluated, so we would have to carry
    alignment fixup information right through the expression evaluation
    process).
    
    Therefore, this patch kills off this alignment behaviour.
    
    Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
 dtc-parser.y | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dtc-parser.y b/dtc-parser.y
index 61ed250..4853794 100644
--- a/dtc-parser.y
+++ b/dtc-parser.y
@@ -149,8 +149,7 @@ propdata:
 		}
 	| propdataprefix '<' celllist '>'
 		{
-			$$ = data_merge(data_append_align($1,
-							  sizeof(cell_t)), $3);
+			$$ = data_merge($1, $3);
 		}
 	| propdataprefix '[' bytestring ']'
 		{

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list