Re: fuzzing dtc with AFL

2016-01-04 Thread David Gibson
On Sun, Jan 03, 2016 at 08:28:48PM +1100, David Gibson wrote: > On Sun, Jan 03, 2016 at 02:32:47AM +1100, Anton Blanchard wrote: > > Hi David, > > > > I wanted something to test AFL with, and since dtc is simple, self > > What's AFL? > > > contained and

Re: [PATCH] Catch unsigned 32bit overflow when parsing flattened device tree offsets

2016-01-03 Thread David Gibson
ze_dt > totalsize) > + if ((off_dt+size_dt < off_dt) || (off_dt+size_dt > totalsize)) > die("Structure block extends past total size\n"); > } > -- David Gibson| I'll have my music baroque, and my code

Re: fuzzing dtc with AFL

2016-01-03 Thread David Gibson
racters: > > # ./dtc test3.dts > dtc: util.c:155: get_escape_char: Assertion `c' failed. > Aborted > > and a SEGV: > > # ./dtc test4.dts > Segmentation fault Nice catches all. I'll try to debug these in detail soon. -- David Gibson| I'll have my

Re: Generic DT binding for IPIs

2015-12-21 Thread David Gibson
entirely new. > > Let me know if I can help. I don't know what sort of software is running on the coproc. If it also uses a device tree, then the device tree from the coproc point of view *would* represent these inbound IPIs as 'interrupts' properties - probably on some node representing th

Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding

2015-12-16 Thread David Gibson
On Tue, Dec 15, 2015 at 11:03:48AM +0100, Geert Uytterhoeven wrote: > Hi David, > > On Tue, Dec 15, 2015 at 7:00 AM, David Gibson > <da...@gibson.dropbear.id.au> wrote: > >> If the only property needed is the partition table offset, it can be > >> encoded &g

Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding

2015-12-15 Thread David Gibson
On Mon, Dec 14, 2015 at 11:22:46AM +0100, Geert Uytterhoeven wrote: > On Sat, Dec 12, 2015 at 6:51 AM, David Gibson > <da...@gibson.dropbear.id.au> wrote: > > On Thu, Dec 10, 2015 at 12:43:24PM -0800, Brian Norris wrote: > >> On Mon, Dec 07, 2015 at 12:36:28P

Re: Generic DT binding for IPIs

2015-12-13 Thread David Gibson
On Fri, Dec 11, 2015 at 10:47:57AM +, Qais Yousef wrote: > On 12/11/2015 12:39 AM, David Gibson wrote: > >On Thu, Dec 10, 2015 at 10:20:49AM +, Qais Yousef wrote: > >> > >>The IPIs have two properties that are different from a regular interrupts: > >

Re: Generic DT binding for IPIs

2015-12-13 Thread David Gibson
On Fri, Dec 11, 2015 at 10:47:57AM +, Qais Yousef wrote: > On 12/11/2015 12:39 AM, David Gibson wrote: > >On Thu, Dec 10, 2015 at 10:20:49AM +, Qais Yousef wrote: > >> > >>The IPIs have two properties that are different from a regular interrupts: > >

Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding

2015-12-12 Thread David Gibson
On Thu, Dec 10, 2015 at 12:43:24PM -0800, Brian Norris wrote: > On Mon, Dec 07, 2015 at 12:36:28PM +1100, David Gibson wrote: > > On Sat, Dec 05, 2015 at 10:33:30PM +0100, Michal Suchanek wrote: > > > On 5 December 2015 at 12:39, Jonas Gorski <j...@openwrt.org> wrote: >

Re: Generic DT binding for IPIs

2015-12-10 Thread David Gibson
oc2 { > >> ipi-refs = < "in">, < "coproc2data">, > >> < > >>"corpoc2ctrl">; > >This isn't actually parseable. You need a known length of cells after a > >phandle. > > > > To clarify, w

Re: Generic DT binding for IPIs

2015-12-09 Thread David Gibson
-names = "in"; > > }; > > > > This will allocate an IPI to go to cpu @CPU_VALUE passing @IPI_SPEC as > > parameters to the controller. Which means we need a new ipi-cells to > > define how many cells are in ipis property. Note the new ipi-parent too. >

Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding

2015-12-06 Thread David Gibson
other file with another description of the same node. Totally > awesome. I can't actually work out from that if you're agreeing with the original post or the first reply. > Also how do you plan to write partitioning schemes with parameters > like with non-zero offset of the partition table.

Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding

2015-12-06 Thread David Gibson
other file with another description of the same node. Totally > awesome. I can't actually work out from that if you're agreeing with the original post or the first reply. > Also how do you plan to write partitioning schemes with parameters > like with non-zero offset of the partition table.

Re: [PATCH v2] libfdt: check for potential overrun in _fdt_splice()

2015-12-01 Thread David Gibson
son <bjorn.anders...@sonymobile.com> Applied, thanks. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson signature.asc Description: PGP signature

Re: [PATCH v5 1/2] dtc: Plugin and fixup support

2015-11-19 Thread David Gibson
On Wed, Oct 21, 2015 at 04:52:25PM +0300, Pantelis Antoniou wrote: > Hi David, > > > On Oct 21, 2015, at 05:29 , David Gibson <da...@gibson.dropbear.id.au> > > wrote: > > > > On Wed, Aug 26, 2015 at 09:44:33PM +0300, Pantelis Antoniou wrote: > >>

Re: [PATCH] Remove duplicated -Werror in dtc Makefile

2015-11-16 Thread David Gibson
-Wmissing-prototypes -Wredundant-decls -Wshadow > -CFLAGS = -g -Os -fPIC -Werror $(WARNINGS) > +CFLAGS = -g -Os -fPIC $(WARNINGS) > > BISON = bison > LEX = flex -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimali

Re: [PATCH v5 2/2] dtc: Document the dynamic plugin internals

2015-10-20 Thread David Gibson
= "/fragment@0:target:0"; > + ocp = "/fragment@1:target:0"; > + }; > + __local_fixups__ { > + fragment@1 { > + __overlay__ { > + baz { > +

Re: [PATCH v5 1/2] dtc: Plugin and fixup support

2015-10-20 Thread David Gibson
= NULL) > + e = s + strlen(s); > + len = e - s; > + comp = xrealloc(comp, len + 1); You can just allocate comp with strlen(fullpath) bytes in the first place, rather than realloc()ing on every iteration. > + memcpy(comp, s,

Re: [PATCH v5 1/2] dtc: Plugin and fixup support

2015-10-20 Thread David Gibson
= NULL) > + e = s + strlen(s); > + len = e - s; > + comp = xrealloc(comp, len + 1); You can just allocate comp with strlen(fullpath) bytes in the first place, rather than realloc()ing on every iteration. > + memcpy(comp, s,

Re: [PATCH v5 2/2] dtc: Document the dynamic plugin internals

2015-10-20 Thread David Gibson
= "/fragment@0:target:0"; > + ocp = "/fragment@1:target:0"; > + }; > + __local_fixups__ { > + fragment@1 { > + __overlay__ { > + baz { > +

Re: [RFC PATCH v6 2/3] dtc: dts source location annotation

2015-10-06 Thread David Gibson
On Tue, Oct 06, 2015 at 12:45:34AM -0700, Frank Rowand wrote: > On 10/5/2015 9:56 PM, David Gibson wrote: > > On Fri, Oct 02, 2015 at 09:52:48PM -0700, Frank Rowand wrote: > >> From: Frank Rowand <frank.row...@sonymobile.com> > >> > >> Proof of concept pa

Re: [RFC PATCH v6 2/3] dtc: dts source location annotation

2015-10-06 Thread David Gibson
On Tue, Oct 06, 2015 at 12:38:19AM -0700, Frank Rowand wrote: > On 10/5/2015 9:56 PM, David Gibson wrote: > > On Fri, Oct 02, 2015 at 09:52:48PM -0700, Frank Rowand wrote: > >> From: Frank Rowand <frank.row...@sonymobile.com> > >> > >> Proof of concept pa

Re: [RFC PATCH v6 1/3] dtc: protect against null pointer dereference in srcpos_string()

2015-10-06 Thread David Gibson
On Tue, Oct 06, 2015 at 12:32:20AM -0700, Frank Rowand wrote: > On 10/5/2015 9:10 PM, David Gibson wrote: > > On Fri, Oct 02, 2015 at 09:49:08PM -0700, Frank Rowand wrote: > >> From: Frank Rowand <frank.row...@sonymobile.com> > >> > >> Check for NULL po

Re: [RFC PATCH v6 3/3] dtc: dts source location annotation, short location format

2015-10-05 Thread David Gibson
On Fri, Oct 02, 2015 at 09:55:17PM -0700, Frank Rowand wrote: Uh.. the actual patch seems to be missing. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_

Re: [RFC PATCH v6 1/3] dtc: protect against null pointer dereference in srcpos_string()

2015-10-05 Thread David Gibson
else if (pos->first_line != pos->last_line) This logic still seems backwards to me. I'd really prefer the !pos check to go first, then !pos->file, then the normal case. > rc = asprintf(_str, "%s:%d.%d-%d.%d", fname, > pos->fi

Re: [PATCH v3 0/3] Add a couple of string-related functions

2015-10-01 Thread David Gibson
On Thu, Oct 01, 2015 at 10:23:42AM +0200, Thierry Reding wrote: > On Thu, Oct 01, 2015 at 10:10:43AM +0200, Thierry Reding wrote: > > On Wed, Sep 30, 2015 at 01:31:32PM +1000, David Gibson wrote: > > > On Tue, Sep 29, 2015 at 11:09:05AM +0200, Thierry Reding wrote: > >

Re: [PATCH v2 1/3] fdt: Add a function to count strings

2015-09-29 Thread David Gibson
gc != 2) > + CONFIG("Usage: %s \n", argv[0]); > + > + test_init(argc, argv); > + fdt = load_blob(argv[1]); > + > + check_expected_failure(fdt, "/", "#address-cells"); > + check_expected_failure(fdt, "/", "#

Re: [PATCH v2 2/3] fdt: Add a function to get the index of a string

2015-09-29 Thread David Gibson
of node %s is %d, expected > %d\n", > + string, property, path, err, index); > +} > + > int main(int argc, char *argv[]) > { > void *fdt; > @@ -78,5 +113,10 @@ int main(int argc, char *argv[]) > check_string_count(fdt, "/device", &

Re: [PATCH v2 0/3] Add a couple of string-related functions

2015-09-29 Thread David Gibson
e value to determine validity. This could of course be fixed > but the cases in which this succeeds the user did ask for trouble, > so I didn't think it worth the extra effort. > - Improve documentation and tests. Sorry, it looks like these fell off my radar for ages. They look pretty good, b

Re: [PATCH v3 0/3] Add a couple of string-related functions

2015-09-29 Thread David Gibson
able name, which shadows the libc index(3) function. I'm not sure why that didn't show up on a local "make check", but in any case I've changed thos to 'idx' to fix it. -- David Gibson| I'll have my music baroque, and my code david AT

Re: [RFC PATCH v2 2/3] dtc: make check test for dtc --annotate

2015-09-22 Thread David Gibson
On Tue, Sep 22, 2015 at 10:21:55AM -0700, Frank Rowand wrote: > On 9/22/2015 3:39 AM, David Gibson wrote: > > On Mon, Sep 21, 2015 at 10:38:27PM -0700, Frank Rowand wrote: > >> From: Frank Rowand <frank.row...@sonymobile.com> > >> > >> Add dtc tests. >

Re: [RFC PATCH v2 1/3] dtc: dts source location annotation

2015-09-22 Thread David Gibson
rser.y > +++ b/dtc-parser.y > @@ -48,6 +48,7 @@ extern bool treesource_error; > > struct property *prop; > struct property *proplist; > + struct src *src; > struct node *node; > struct node *nodelist; > struct reserve_info *re; > @@ -78,6 +79,7 @@ extern bool treesource_error; > %type propdef > %type proplist > > +%type openbrace > %type devicetree > %type nodedef > %type subnode > @@ -177,12 +179,20 @@ devicetree: > ; > > nodedef: > - '{' proplist subnodes '}' ';' > + openbrace proplist subnodes '}' ';' > { > - $$ = build_node($2, $3); > + $$ = build_node($1, $2, $3); > } > ; > > +openbrace: > + '{' > + { > + $$ = start_node(); > + } > + ; > + > + > proplist: > /* empty */ > { > Index: b/flattree.c > === > --- a/flattree.c > +++ b/flattree.c > @@ -748,7 +748,7 @@ static struct node *unflatten_tree(struc > char *flatname; > uint32_t val; > > - node = build_node(NULL, NULL); > + node = build_node(NULL, NULL, NULL); > > flatname = flat_read_string(dtbuf); > > Index: b/fstree.c > === > --- a/fstree.c > +++ b/fstree.c > @@ -34,7 +34,7 @@ static struct node *read_fstree(const ch > if (!d) > die("Couldn't opendir() \"%s\": %s\n", dirname, > strerror(errno)); > > - tree = build_node(NULL, NULL); > + tree = build_node(NULL, NULL, NULL); > > while ((de = readdir(d)) != NULL) { > char *tmpname; -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson pgpqjj4nH9gsm.pgp Description: PGP signature

Re: [RFC PATCH v2 3/3] dtc: linux kernel build process to create annotated .dts

2015-09-22 Thread David Gibson
cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) > > $(obj)/%.dtb: $(src)/%.dts FORCE > $(call if_changed_dep,dtc) > > dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) > +dtc-annotate-tmp = $(subst $(comma),_,$(dot-target).annotate.dts.tmp) >

Re: [RFC PATCH 2/3] dtc: make check test for dtc --annotate

2015-09-21 Thread David Gibson
run_dtc_test -I dts -O dtb -o embedded_nul.test.dtb embedded_nul.dts > run_dtc_test -I dts -O dtb -o embedded_nul_equiv.test.dtb > embedded_nul_equiv.dts > run_test dtbs_equal_ordered embedded_nul.test.dtb > embedded_nul_equiv.test.dtb -- David Gibson|

Re: [RFC PATCH 1/3] dtc: dts source location annotation

2015-09-21 Thread David Gibson
58,6 +61,13 @@ struct property *build_property(char *na > > new->name = name; > new->val = val; > + if (current_srcfile) { > + new->src.name = current_srcfile->name; > + new->src.lineno = current_srcfile->lineno; > +

Re: [RFC PATCH 2/5] Documentation: dt-bindings: add example DT binding document

2015-09-14 Thread David Gibson
On Thu, Sep 10, 2015 at 11:46:13PM -0500, Rob Herring wrote: > On 09/10/2015 02:08 AM, David Gibson wrote: > > On Fri, Aug 28, 2015 at 09:53:06AM -0500, Rob Herring wrote: > >> On Fri, Aug 28, 2015 at 12:23 AM, Matt Porter <mpor...@konsulko.com> wrote: > >>>

Re: [RFC PATCH 2/5] Documentation: dt-bindings: add example DT binding document

2015-09-10 Thread David Gibson
traints: > > - spi-max-frequency-constraints: > range: 100 100 > some-other-constraint: Not for the first pass I think. What I would suggest is having "description" for pure informational stuff, and "constraint" or maybe just "extra" for norma

Re: [RFC PATCH 1/5] Documentation: dt-bindings: add documentation on new DT binding format

2015-09-08 Thread David Gibson
rence: optional reference to a binding id > > + > > +* [R] example: sequence of examples: > > + [R] dts: DT source of example usage. The example text must use > > + literal style ("|") so that it retains indentation and > > + newlin

Re: [RFC PATCH 1/5] Documentation: dt-bindings: add documentation on new DT binding format

2015-09-08 Thread David Gibson
ptional fields, respectively. > + > +Skeleton Binding > + > + > +The skeleton.yaml binding found in the top of the DT binding tree > +is the canonical example of syntax and format to use when writing > +a DT binding document. It is maintained with the latest formatting

Re: [RFC PATCH 1/5] Documentation: dt-bindings: add documentation on new DT binding format

2015-09-08 Thread David Gibson
ptional fields, respectively. > + > +Skeleton Binding > + > + > +The skeleton.yaml binding found in the top of the DT binding tree > +is the canonical example of syntax and format to use when writing > +a DT binding document. It is maintained with the latest formatting

Re: [PATCH v5 0/2] dtc: Dynamic DT support

2015-09-07 Thread David Gibson
d to dtc mainline. > * Changed __local_fixups__ format > * Clean up for better legibility. Sorry it's taken me so long to get to this. I was sick after the conference, and then had backlog of day-job work to do. I haven't had time to look at this yet, but I haven't forgotten it. -- David

Re: [PATCH v5 0/2] dtc: Dynamic DT support

2015-09-07 Thread David Gibson
d to dtc mainline. > * Changed __local_fixups__ format > * Clean up for better legibility. Sorry it's taken me so long to get to this. I was sick after the conference, and then had backlog of day-job work to do. I haven't had time to look at this yet, but I haven't forgotten it. -- David

Re: st_fdma: Firmware filename in DT?

2015-09-07 Thread David Gibson
dware description, but if the names exist in some "well known" OS independent namespace, then it's a reasonable thing to be specified in the device tree. That said, I have some concerns on points, see later replies to the thread. -- David Gibson| I'll have my music

Re: st_fdma: Firmware filename in DT?

2015-09-07 Thread David Gibson
on the hardware, which require different firmware images in order to present the same programming interface to the OS. In this case there's a very high chance that some firmware revision will have bugs meaning it's not *quite* compatible with the comm

Re: [PATCH 1/3] fdt: Add a function to count strings

2015-07-17 Thread David Gibson
On Fri, Jul 17, 2015 at 11:10:09AM +0200, Thierry Reding wrote: On Thu, Jul 16, 2015 at 10:29:35PM +1000, David Gibson wrote: On Thu, Jul 16, 2015 at 01:13:53PM +0200, Thierry Reding wrote: On Wed, Jul 15, 2015 at 11:41:30PM +1000, David Gibson wrote: On Wed, Jul 15, 2015 at 01:13:57PM

Re: [PATCH 0/3] Add a couple of string-related functions

2015-07-15 Thread David Gibson
...there are recent U-Boot mailing list threads on this. Regards, Simon -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson

Re: [PATCH 1/3] fdt: Add a function to count strings

2015-07-15 Thread David Gibson
/tests/strings.dts new file mode 100644 index ..04c2c202ec77 --- /dev/null +++ b/tests/strings.dts @@ -0,0 +1,10 @@ +/dts-v1/; + +/ { + compatible = foo; + + device { + compatible = bar, baz; + big-endian; + }; +}; -- David Gibson

Re: [PATCH 1/3] guess input file format based on file content or file name

2015-06-29 Thread David Gibson
(inform, dts)) bi = dt_from_source(arg); else if (streq(inform, fs)) -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http

Re: [PATCH] libfdt: fdt_path_offset_*(): Fix handling of paths with options in them

2015-05-29 Thread David Gibson
offset; } - q = memchr(p, '/', end - p); + q = fdt_path_next_seperator(p, end - p); if (! q) q = end; -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au

Re: [PATCH v2] tests: convert `echo -n` to `printf`

2015-05-24 Thread David Gibson
match before after now Much better, thanks. Applied. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson

Re: Invitation and RFC: Linux Plumbers Device Tree track proposed

2015-04-12 Thread David Gibson
of the process of accepting the device tree track). It happens that I'll be in Seattle at the time for the KVM Forum. It's my intention to attend the Plumbers' device tree track, except where it collides with things I need to attend at KVM Forum. -- David Gibson| I'll

Re: [PATCH] libfdt/tests: Add fdt_path_offset_namelen() test

2015-04-06 Thread David Gibson
. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson pgpluGT6H8_fX.pgp Description: PGP signature

Re: [PATCH] libfdt: Add fdt_path_offset_namelen()

2015-03-12 Thread David Gibson
On Tue, Mar 10, 2015 at 09:47:44AM -0400, Peter Hurley wrote: Hi David, On 03/09/2015 08:17 PM, David Gibson wrote: On Fri, Mar 06, 2015 at 10:12:38AM -0500, Peter Hurley wrote: Properties may contain path names which are not NUL-terminated. For example, the 'stdout-path' property allows

Re: [PATCH] libfdt: Add fdt_path_offset_namelen()

2015-03-12 Thread David Gibson
On Tue, Mar 10, 2015 at 09:47:44AM -0400, Peter Hurley wrote: Hi David, On 03/09/2015 08:17 PM, David Gibson wrote: On Fri, Mar 06, 2015 at 10:12:38AM -0500, Peter Hurley wrote: Properties may contain path names which are not NUL-terminated. For example, the 'stdout-path' property allows

Re: [PATCH v4 2/3] dtc: Plugin (object) device tree support.

2015-03-11 Thread David Gibson
On Fri, Mar 06, 2015 at 06:55:14PM +0100, Jan Lübbe wrote: On Do, 2015-03-05 at 10:34 +1100, David Gibson wrote: On Fri, Feb 27, 2015 at 08:55:45PM +0200, Pantelis Antoniou wrote: Enables the generation of a __fixups__ node for trees compiled using the -@ option that are using the /plugin

Re: [PATCH] libfdt: Add fdt_path_offset_namelen()

2015-03-09 Thread David Gibson
for it. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson pgpFxxAnA57cP.pgp Description: PGP signature

Re: [PATCH] libfdt: Add fdt_path_offset_namelen()

2015-03-09 Thread David Gibson
for it. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson pgpbOBo17MxrD.pgp Description: PGP signature

Re: [PATCH v4 3/3] dtc: Document the dynamic plugin internals

2015-03-04 Thread David Gibson
On Wed, Mar 04, 2015 at 03:16:32PM +0200, Pantelis Antoniou wrote: Hi David, On Mar 4, 2015, at 13:29 , David Gibson da...@gibson.dropbear.id.au wrote: On Fri, Feb 27, 2015 at 08:55:46PM +0200, Pantelis Antoniou wrote: Provides the document explaining the internal mechanics

Re: [PATCH v4 2/3] dtc: Plugin (object) device tree support.

2015-03-04 Thread David Gibson
, struct emitter *emit, emit_symbols_node(tree, emit, etarget, strbuf, vi); emit_local_fixups_node(tree, emit, etarget, strbuf, vi); + emit_fixups_node(tree, emit, etarget, strbuf, vi); emit-endnode(etarget, tree-labels); } -- David Gibson

Re: [PATCH v4 1/3] dtc: Symbol and local fixup generation support

2015-03-04 Thread David Gibson
, vi); } + emit_symbols_node(tree, emit, etarget, strbuf, vi); + emit_local_fixups_node(tree, emit, etarget, strbuf, vi); + emit-endnode(etarget, tree-labels); } -- David Gibson| I'll have my music baroque, and my code david

Re: [PATCH v4 1/3] dtc: Symbol and local fixup generation support

2015-03-04 Thread David Gibson
, vi); } + emit_symbols_node(tree, emit, etarget, strbuf, vi); + emit_local_fixups_node(tree, emit, etarget, strbuf, vi); + emit-endnode(etarget, tree-labels); } -- David Gibson| I'll have my music baroque, and my code david

Re: [PATCH v4 2/3] dtc: Plugin (object) device tree support.

2015-03-04 Thread David Gibson
, struct emitter *emit, emit_symbols_node(tree, emit, etarget, strbuf, vi); emit_local_fixups_node(tree, emit, etarget, strbuf, vi); + emit_fixups_node(tree, emit, etarget, strbuf, vi); emit-endnode(etarget, tree-labels); } -- David Gibson

Re: [PATCH v4 0/3] dtc: Dynamic DT support

2015-03-04 Thread David Gibson
flaws in the current implementation. More details coming once I have a chance. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http

Re: [PATCH v4 3/3] dtc: Document the dynamic plugin internals

2015-03-04 Thread David Gibson
that the loader can apply the offset. The __local_fixups__ has a totally different format from __fixups__ for doing a very similar operation. You should be able to unify the encoding for local and non-local fixups. -- David Gibson| I'll have my music baroque, and my code david

Re: [PATCH v2] dtc: parser: Add label while overriding nodes

2015-02-22 Thread David Gibson
of tree1 tests. The fact that you can only apply a single label by this method is a bit of a wart, but it's something we can fix later. I had a look at it and (as I suspect you already discovered) it's surprisingly complicated to do so. -- David Gibson| I'll have my music baroque

Re: [PATCH 1/4] arm64: dts: fix PMU IRQ ordering for Juno

2015-02-05 Thread David Gibson
to (e.g. dtc's -s option). That said, you should try not to rely on dt order. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http

dtc: New v1.4.1 release, and tarballs now on kernel.org

2014-11-11 Thread David Gibson
interesting new features in that time, but there have been some important bugfixes, so it's time we rolled a release. The new v1.4.1 release has been tagged in git, and has a released tarball with all the others. -- David Gibson| I'll have my music baroque, and my code david

Re: [PATCH 1/4] Microsoft Visual C patches

2014-06-19 Thread David Gibson
, and 4 have this, but 1 doesn't) * There should be a blank line between the 1-lite summary and the remainder of the commit message -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_

Re: [PATCH 3/3] Add a basic test for fdtdump

2014-06-18 Thread David Gibson
. Applied with a few changes: * Added fdtdump to TESTS_BIN, so it gets made for a make check * Added the fdtdump test to the default set of tests run by run_tests.sh * Changed to a unified diff in fdtdump-runtest.sh -- David Gibson| I'll have my music baroque, and my

Re: KConfig and DTS files

2014-05-08 Thread David Gibson
as well. If it helps we could make that tag optionally appear any number of times. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http

Re: [RESEND PATCH v3 1/3] libfdt: Add function to find regions in an FDT

2014-05-01 Thread David Gibson
not really anyone else who sees it as a compelling feature either. So, sorry. For the forseeable future, you'll need to leave this implemented in your own code, using but outside of libfdt itself. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au

Re: [PATCH] dtc: add ability to make nodes conditional on them being referenced

2014-04-16 Thread David Gibson
, so I don't think it's a big problem. [snip] +struct node *check_node_referenced(struct node *node) This function needs a different name, since it doesn't actually check anything (it just triggers a later check). Maybe mark_node_needs_reference(). -- David Gibson| I'll

Re: [PATCH RFC 2/5] dtc: livetree: Add more tree parsing helpers

2014-03-09 Thread David Gibson
)) { + if (tree-deleted) + return NULL; + return tree; + } This change needs a justification. p = strchr(path, '/'); for_each_child(tree, child) { -- David Gibson| I'll have my music baroque, and my code david

Re: [PATCH RFC 3/5] Implement DT schema checker using hybrid approach

2014-03-09 Thread David Gibson
input tree\n); + + return the_boot_info; +} + static void write_prefix(FILE *f, int level) { int i; -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_

Re: [PATCH RFC 1/5] dtc: Add helpers for various message levels

2014-03-09 Thread David Gibson
or not - these helpers don't address that. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson pgp1FaXlbA62G.pgp Description

Re: [PATCH RFC 0/5] Hybrid approach for DT schema checking

2014-03-09 Thread David Gibson
/gpio.c create mode 100644 schemas/i2c/i2c.c create mode 100644 schemas/interrupt-controller/interrupts.c create mode 100644 schemas/mmio-bus.c create mode 100644 schemas/schema.c create mode 100644 schemas/schema.h -- David Gibson| I'll have my music baroque, and my

Re: [PATCH 1/1] Consistently use xrealloc instead of realloc

2014-03-02 Thread David Gibson
/of/ F: include/linux/of*.h F: scripts/dtc/ K: of_get_property K: of_match_table If the information is not accurate, please, have it updated. That's the maintainers information for the devicetree stuff included in the Linux kernel tree, not for dtc as an upstream project. -- David Gibson

Re: [PATCH 1/1] Remove dead code in util.c

2014-03-02 Thread David Gibson
On Sat, Mar 01, 2014 at 09:11:47AM +0100, xypron.g...@gmx.de wrote: From: Heinrich Schuchardt xypron.g...@gmx.de xrealloc never returns null Signed-off-by: Heinrich Schuchardt xypron.g...@gmx.de Applied, thanks. -- David Gibson| I'll have my music baroque, and my code

Re: [PATCH 1/1] Update source code location for dtc in manual.txt

2014-03-02 Thread David Gibson
removed, then applied. Thanks. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson pgp26is8vzMP2.pgp Description: PGP

Re: [PATCH 1/1] Remove duplicate assignment

2014-03-02 Thread David Gibson
On Sun, Mar 02, 2014 at 09:45:57PM +0100, xypron.g...@gmx.de wrote: From: Heinrich Schuchardt xypron.g...@gmx.de Signed-off-by: Heinrich Schuchardt xypron.g...@gmx.de Applied, thanks. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au

Re: [PATCH 1/1] Consistently use xrealloc instead of realloc

2014-03-02 Thread David Gibson
, thanks. Note that in general dtc patches should be CCed to myself and Jon Loeliger j...@jdl.com, the dtc maintainers. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_

Re: [PATCH 1/1] Update source code location for dtc in manual.txt

2014-03-02 Thread David Gibson
On Mon, Mar 03, 2014 at 10:42:12AM +1100, David Gibson wrote: On Sun, Mar 02, 2014 at 10:39:14PM +0100, xypron.g...@gmx.de wrote: From: Heinrich Schuchardt xypron.g...@gmx.de The information about the location of the source code of the device tree compiler was inaccurate. Signed-off

Re: [PATCH 1/1] Consistently use xrealloc instead of realloc

2014-03-02 Thread David Gibson
/of/ F: include/linux/of*.h F: scripts/dtc/ K: of_get_property K: of_match_table If the information is not accurate, please, have it updated. That's the maintainers information for the devicetree stuff included in the Linux kernel tree, not for dtc as an upstream project. -- David Gibson

[PATCH 08/10] Implement path references in terms of bytestring expressions

2014-02-27 Thread David Gibson
. Logically it would be neater to have the expression itself expand directly to the right value itself, but for now we're evaluating these expressions before all the tree's paths have been constructed. Signed-off-by: David Gibson da...@gibson.dropbear.id.au --- dtc-parser.y | 9 + 1 file changed, 5

[PATCH 07/10] Implement labels within property values as bytestring expressions

2014-02-27 Thread David Gibson
This re-implements labels within property values as a form of bytestring expression. The grammar gets a little hairy to handle the fact that labels are allowed both at the beginning and end of property values without introducing parser conflicts. Signed-off-by: David Gibson da

[PATCH 02/10] Add srcpos information to expressions

2014-02-27 Thread David Gibson
This patch allows information about source locations to be attached to expression structures. We'll need this information later on in order to provide reasonable error messages. Signed-off-by: David Gibson da...@gibson.dropbear.id.au --- dtc-parser.y | 52

[PATCH 09/10] Re-implement , in property definitions as a bytestring operator

2014-02-27 Thread David Gibson
) property values can now be implemented as a single expression. For now we still just immediately evaluate the expression though. Signed-off-by: David Gibson da...@gibson.dropbear.id.au --- dtc-parser.y | 37 ++--- 1 file changed, 14 insertions(+), 23 deletions

[PATCH 05/10] Integrate /incbin/ with expanded expressions

2014-02-27 Thread David Gibson
Implement /incbin/ as a new type of bytestring expression operator. This delays the evaluation of the /incbin/'s parameters until the evaluation of the /incbin/ itself. Signed-off-by: David Gibson da...@gibson.dropbear.id.au --- dtc-parser.y | 56

[PATCH 04/10] Add string and bytestring expression types

2014-02-27 Thread David Gibson
are literals, but we'll expand on that later. Signed-off-by: David Gibson da...@gibson.dropbear.id.au --- data.c | 26 -- dtc-parser.y | 58 +++- dtc.h| 10 +++ expression.c | 87

[PATCH 03/10] Add type information to expression trees

2014-02-27 Thread David Gibson
This implements a rudimentary dynamic typing system for dtc expressions, laying the groundwork for expressions of multiple types (e.g. string, bytestring). For now, we don't actually implement any types beyond integer, though. Signed-off-by: David Gibson da...@gibson.dropbear.id.au --- dtc

[0/10] RFC: A new start on richer dtc expression support [REPOST]

2014-02-27 Thread David Gibson
I previously sent these patches to the new devicetree-compiler, but I suspect not many people had subscribed so I'm resending to the devicetree list. So, we've been talking about richer expression / constant / function / macro support for dtc since forever. So far attempts to start on that

[PATCH 06/10] Implement arrays as expressions

2014-02-27 Thread David Gibson
phandle values aren't all resolved at the time we evaluate expressions. Signed-off-by: David Gibson da...@gibson.dropbear.id.au --- dtc-parser.y | 60 +--- dtc.h| 6 ++ expression.c | 54

[PATCH 10/10] Implement string concatenate and repeat operators

2014-02-27 Thread David Gibson
no obvious candidates for these string operators. Signed-off-by: David Gibson da...@gibson.dropbear.id.au --- dtc.h | 4 ++ expression.c | 117 - tests/.gitignore | 1 + tests/Makefile.tests | 2 +- tests

[PATCH 01/10] First cut at expression trees

2014-02-27 Thread David Gibson
to allowing more possibilities, create the structures we need to represent expressions at runtime. For now we just construct them in the parser, then immediately evaluate, but one thing at a time. Signed-off-by: David Gibson da...@gibson.dropbear.id.au --- Makefile.dtc | 1 + dtc-parser.y | 173

Re: [RFC 1/1] Device Tree Schema Source format description

2014-02-19 Thread David Gibson
is only called if that returns true. * Look at making prerequisite handling be handled on a per-node rather than global basis. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_

Re: [PATCH] Add a README file for dtc and libfdt

2014-02-11 Thread David Gibson
On Tue, Feb 11, 2014 at 01:56:32PM +, Grant Likely wrote: Add a README file to document the location of the mailing list, the home page and state who the maintainers are. Looks good, applied. -- David Gibson| I'll have my music baroque, and my code david

Re: [RFC PATCH 1/1] of/irq: create interrupts-extended-2 property

2014-01-21 Thread David Gibson
still a ways off, so I wouldn't object to another approach as a stopgap, as long as its not too hideous. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_

Re: [PATCH 1/3] dtc: Keep type information from DTS

2014-01-21 Thread David Gibson
to add my acked by: Acked-by: Grant Likely grant.lik...@linaro.org Still a NACK from me, I think this is fundamentally the wrong approach. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_

Re: [0/10] dtc: Assorted parsing and error reporting cleanups

2014-01-16 Thread David Gibson
/, in patch 07/10's commit message, please: Acked-by: Jon Loeliger j...@jdl.com Thanks. I fixed that and one or two similarly trivial errors and committed the series. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you

[PATCH 01/10] Remove unused srcpos_warn() function

2014-01-03 Thread David Gibson
This function has no users, and we can replace it more generally later. Signed-off-by: David Gibson da...@gibson.dropbear.id.au --- srcpos.c | 17 - srcpos.h | 2 -- 2 files changed, 19 deletions(-) diff --git a/srcpos.c b/srcpos.c index 294568b..06ef06d 100644 --- a/srcpos.c

  1   2   >