Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1290142 > unrolled thread
| Started by | David Gibson <david@gibson.dropbear.id.au> |
|---|---|
| First post | 2015-12-12 09:50 +0100 |
| Last post | 2015-12-17 02:10 +0100 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding David Gibson <david@gibson.dropbear.id.au> - 2015-12-12 09:50 +0100
Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding Geert Uytterhoeven <geert@linux-m68k.org> - 2015-12-14 11:30 +0100
Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding Michal Suchanek <hramrach@gmail.com> - 2015-12-14 13:30 +0100
Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding David Gibson <david@gibson.dropbear.id.au> - 2015-12-15 11:00 +0100
Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding Geert Uytterhoeven <geert@linux-m68k.org> - 2015-12-15 11:10 +0100
Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding David Gibson <david@gibson.dropbear.id.au> - 2015-12-17 02:10 +0100
| From | David Gibson <david@gibson.dropbear.id.au> |
|---|---|
| Date | 2015-12-12 09:50 +0100 |
| Subject | Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding |
| Message-ID | <qEO2m-8hM-11@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
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 <jogo@openwrt.org> wrote:
> > > > On Sat, Dec 5, 2015 at 6:19 AM, Brian Norris
> > > > <computersforpeace@gmail.com> wrote:
> > >
> > > >> +
> > > >> +Examples:
> > > >> +
> > > >> +flash@0 {
> > > >> + partitions {
> > > >> + compatible = "google,fmap";
> > > >> + };
> > > >> +};
> > > >
> > > > I wonder if this wouldn't be better served in a separate binding doc
> > > > with its compatible name as the filename, like we do with
> > > > driver^Whardware blocks, especially if we want to add more parsers.
> > >
> > >
> > > I find that *very* counter productive for bindings that go to the same
> > > node. You have a description of a node, and then suddenly there you
> > > have another 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.
>
> Perhaps I'm biased, but I think he was agreeing with the first reply.
> (Particularly, "I find that *very* counter productive" uses the word
> "that" to refer to "separate binding doc[s]".)
>
> > > Also how do you plan to write partitioning schemes with parameters
> > > like with non-zero offset of the partition table.
>
> If you are directing this question at me: I don't have a specific plan
> for it. MTD parsers don't currently take external input for this; many
> scan the whole device, but some might also have conventions built into
> the parser itself too, so this just gets hooked based on "compatible".
> But if the need arose, I would hope we could work out a common binding.
>
> > Presumably with properties in the patitions node. Not seeing the
> > problem here.
>
> I believe Michal is bringing up the (important, IMO) point that if
> distinct partition types are being described in the same node, then any
> use of additional properties *must* be closely coordinated. We can't
> have two parsers "foo" and "bar" defining conflicting uses of the same
> property in the same node, like this:
>
> partitions {
> compatible = "foo", "bar";
> property-baz = ...; // e.g., reg = <...>;
> };
>
> where if "foo" is not found, we fall back to "bar". But what if "foo"
> and "bar" use "property-baz" differently?
Ah.. that is an excellent point, and leads me to realise that using
compatible in this way is wrong. The whole point of compatible is
that the node is, well, compatible with *all* the things in the list,
and therefore the things in the list are compatible with each other.
Using it for a list of entirely different things to attempt in order
is not correct.
> Having everything in one doc would help ensure that the entire
> "partitions" binding is considered as a whole when extending it, in my
> (and an in my interpretation of Michal's) opinion.
>
> Brian
--
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
[toc] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2015-12-14 11:30 +0100 |
| Subject | Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding |
| Message-ID | <qFyyf-4PE-33@gated-at.bofh.it> |
| In reply to | #1290142 |
On Sat, Dec 12, 2015 at 6:51 AM, David Gibson
<david@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: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 <jogo@openwrt.org> wrote:
>> > > > On Sat, Dec 5, 2015 at 6:19 AM, Brian Norris
>> > > > <computersforpeace@gmail.com> wrote:
>> > >
>> > > >> +
>> > > >> +Examples:
>> > > >> +
>> > > >> +flash@0 {
>> > > >> + partitions {
>> > > >> + compatible = "google,fmap";
>> > > >> + };
>> > > >> +};
>> > > >
>> > > > I wonder if this wouldn't be better served in a separate binding doc
>> > > > with its compatible name as the filename, like we do with
>> > > > driver^Whardware blocks, especially if we want to add more parsers.
>> > >
>> > >
>> > > I find that *very* counter productive for bindings that go to the same
>> > > node. You have a description of a node, and then suddenly there you
>> > > have another 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.
>>
>> Perhaps I'm biased, but I think he was agreeing with the first reply.
>> (Particularly, "I find that *very* counter productive" uses the word
>> "that" to refer to "separate binding doc[s]".)
>>
>> > > Also how do you plan to write partitioning schemes with parameters
>> > > like with non-zero offset of the partition table.
>>
>> If you are directing this question at me: I don't have a specific plan
>> for it. MTD parsers don't currently take external input for this; many
>> scan the whole device, but some might also have conventions built into
>> the parser itself too, so this just gets hooked based on "compatible".
>> But if the need arose, I would hope we could work out a common binding.
>>
>> > Presumably with properties in the patitions node. Not seeing the
>> > problem here.
>>
>> I believe Michal is bringing up the (important, IMO) point that if
>> distinct partition types are being described in the same node, then any
>> use of additional properties *must* be closely coordinated. We can't
>> have two parsers "foo" and "bar" defining conflicting uses of the same
>> property in the same node, like this:
>>
>> partitions {
>> compatible = "foo", "bar";
>> property-baz = ...; // e.g., reg = <...>;
>> };
>>
>> where if "foo" is not found, we fall back to "bar". But what if "foo"
>> and "bar" use "property-baz" differently?
>
> Ah.. that is an excellent point, and leads me to realise that using
> compatible in this way is wrong. The whole point of compatible is
> that the node is, well, compatible with *all* the things in the list,
> and therefore the things in the list are compatible with each other.
>
> Using it for a list of entirely different things to attempt in order
> is not correct.
Isn't the idea behind a partition table that all partition information is
stored on the device in a well-known format, so you don't need additional
properties?
If the only property needed is the partition table offset, it can be encoded
in the unit-address, and the "reg" property:
partitions {
partition-table@xxxx {
reg = <0xxxx ...>;
...
};
...
};
If you do need additional properties, you'll have to add separate partition
table nodes.
Where? Outside the "partitions" subnode?
What with multiple partition tables
- some needing properties (outside "partitions"),
- others not (outside/inside "partitions"),
- others needing the offset (inside "partitions"?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchanek <hramrach@gmail.com> |
|---|---|
| Date | 2015-12-14 13:30 +0100 |
| Subject | Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding |
| Message-ID | <qFAql-64X-5@gated-at.bofh.it> |
| In reply to | #1291067 |
On 14 December 2015 at 11:22, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Sat, Dec 12, 2015 at 6:51 AM, David Gibson
> <david@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: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 <jogo@openwrt.org> wrote:
>>> > > > On Sat, Dec 5, 2015 at 6:19 AM, Brian Norris
>>> > > > <computersforpeace@gmail.com> wrote:
>>> > >
>>> > > >> +
>>> > > >> +Examples:
>>> > > >> +
>>> > > >> +flash@0 {
>>> > > >> + partitions {
>>> > > >> + compatible = "google,fmap";
>>> > > >> + };
>>> > > >> +};
>>> > > >
>>> > > > I wonder if this wouldn't be better served in a separate binding doc
>>> > > > with its compatible name as the filename, like we do with
>>> > > > driver^Whardware blocks, especially if we want to add more parsers.
>>> > >
>>> > >
>>> > > I find that *very* counter productive for bindings that go to the same
>>> > > node. You have a description of a node, and then suddenly there you
>>> > > have another 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.
>>>
>>> Perhaps I'm biased, but I think he was agreeing with the first reply.
>>> (Particularly, "I find that *very* counter productive" uses the word
>>> "that" to refer to "separate binding doc[s]".)
>>>
>>> > > Also how do you plan to write partitioning schemes with parameters
>>> > > like with non-zero offset of the partition table.
>>>
>>> If you are directing this question at me: I don't have a specific plan
>>> for it. MTD parsers don't currently take external input for this; many
>>> scan the whole device, but some might also have conventions built into
>>> the parser itself too, so this just gets hooked based on "compatible".
>>> But if the need arose, I would hope we could work out a common binding.
>>>
>>> > Presumably with properties in the patitions node. Not seeing the
>>> > problem here.
>>>
>>> I believe Michal is bringing up the (important, IMO) point that if
>>> distinct partition types are being described in the same node, then any
>>> use of additional properties *must* be closely coordinated. We can't
>>> have two parsers "foo" and "bar" defining conflicting uses of the same
>>> property in the same node, like this:
>>>
>>> partitions {
>>> compatible = "foo", "bar";
>>> property-baz = ...; // e.g., reg = <...>;
>>> };
>>>
>>> where if "foo" is not found, we fall back to "bar". But what if "foo"
>>> and "bar" use "property-baz" differently?
>>
>> Ah.. that is an excellent point, and leads me to realise that using
>> compatible in this way is wrong. The whole point of compatible is
>> that the node is, well, compatible with *all* the things in the list,
>> and therefore the things in the list are compatible with each other.
>>
>> Using it for a list of entirely different things to attempt in order
>> is not correct.
>
> Isn't the idea behind a partition table that all partition information is
> stored on the device in a well-known format, so you don't need additional
> properties?
>
> If the only property needed is the partition table offset, it can be encoded
> in the unit-address, and the "reg" property:
>
> partitions {
>
> partition-table@xxxx {
> reg = <0xxxx ...>;
> ...
> };
>
> ...
> };
>
> If you do need additional properties, you'll have to add separate partition
> table nodes.
> Where? Outside the "partitions" subnode?
> What with multiple partition tables
> - some needing properties (outside "partitions"),
> - others not (outside/inside "partitions"),
> - others needing the offset (inside "partitions"?
Hello,
IIRC there is RedBoot on-flash partition format support in kernel
which has the partition table offset as compile time configuration
parameter. Moving this to DT would make unified kernel for boards with
different RedBoot table offsets possible.
I don't use any board with RedBoot so I would not know if there is
other issue preventing such unified kernel.
It might be an actual use case for both the binding and the extra
argument with current partitioning scheme, though.
Thanks
Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | David Gibson <david@gibson.dropbear.id.au> |
|---|---|
| Date | 2015-12-15 11:00 +0100 |
| Message-ID | <qFUyJ-2kW-1@gated-at.bofh.it> |
| In reply to | #1291067 |
[Multipart message — attachments visible in raw view] — view raw
On Mon, Dec 14, 2015 at 11:22:46AM +0100, Geert Uytterhoeven wrote:
> On Sat, Dec 12, 2015 at 6:51 AM, David Gibson
> <david@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: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 <jogo@openwrt.org> wrote:
> >> > > > On Sat, Dec 5, 2015 at 6:19 AM, Brian Norris
> >> > > > <computersforpeace@gmail.com> wrote:
> >> > >
> >> > > >> +
> >> > > >> +Examples:
> >> > > >> +
> >> > > >> +flash@0 {
> >> > > >> + partitions {
> >> > > >> + compatible = "google,fmap";
> >> > > >> + };
> >> > > >> +};
> >> > > >
> >> > > > I wonder if this wouldn't be better served in a separate binding doc
> >> > > > with its compatible name as the filename, like we do with
> >> > > > driver^Whardware blocks, especially if we want to add more parsers.
> >> > >
> >> > >
> >> > > I find that *very* counter productive for bindings that go to the same
> >> > > node. You have a description of a node, and then suddenly there you
> >> > > have another 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.
> >>
> >> Perhaps I'm biased, but I think he was agreeing with the first reply.
> >> (Particularly, "I find that *very* counter productive" uses the word
> >> "that" to refer to "separate binding doc[s]".)
> >>
> >> > > Also how do you plan to write partitioning schemes with parameters
> >> > > like with non-zero offset of the partition table.
> >>
> >> If you are directing this question at me: I don't have a specific plan
> >> for it. MTD parsers don't currently take external input for this; many
> >> scan the whole device, but some might also have conventions built into
> >> the parser itself too, so this just gets hooked based on "compatible".
> >> But if the need arose, I would hope we could work out a common binding.
> >>
> >> > Presumably with properties in the patitions node. Not seeing the
> >> > problem here.
> >>
> >> I believe Michal is bringing up the (important, IMO) point that if
> >> distinct partition types are being described in the same node, then any
> >> use of additional properties *must* be closely coordinated. We can't
> >> have two parsers "foo" and "bar" defining conflicting uses of the same
> >> property in the same node, like this:
> >>
> >> partitions {
> >> compatible = "foo", "bar";
> >> property-baz = ...; // e.g., reg = <...>;
> >> };
> >>
> >> where if "foo" is not found, we fall back to "bar". But what if "foo"
> >> and "bar" use "property-baz" differently?
> >
> > Ah.. that is an excellent point, and leads me to realise that using
> > compatible in this way is wrong. The whole point of compatible is
> > that the node is, well, compatible with *all* the things in the list,
> > and therefore the things in the list are compatible with each other.
> >
> > Using it for a list of entirely different things to attempt in order
> > is not correct.
>
> Isn't the idea behind a partition table that all partition information is
> stored on the device in a well-known format, so you don't need additional
> properties?
I guess that's the idea, but I wouldn't like to count on it.
And more importantly, it's still abusing the 'compatible' property. A
node is supposed to be compatible with *everything* in 'compatible',
not just one of the things listed there.
> If the only property needed is the partition table offset, it can be encoded
> in the unit-address, and the "reg" property:
>
> partitions {
>
> partition-table@xxxx {
> reg = <0xxxx ...>;
> ...
> };
>
> ...
> };
Urgh.. and that's abusing the unit address.
--
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
[toc] | [prev] | [next] | [standalone]
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Date | 2015-12-15 11:10 +0100 |
| Subject | Re: [RFC PATCH 3/7] doc: dt: mtd: partition: add on-flash format binding |
| Message-ID | <qFUIr-2DP-25@gated-at.bofh.it> |
| In reply to | #1291991 |
Hi David,
On Tue, Dec 15, 2015 at 7:00 AM, David Gibson
<david@gibson.dropbear.id.au> wrote:
>> If the only property needed is the partition table offset, it can be encoded
>> in the unit-address, and the "reg" property:
>>
>> partitions {
>>
>> partition-table@xxxx {
>> reg = <0xxxx ...>;
>> ...
>> };
>>
>> ...
>> };
>
> Urgh.. and that's abusing the unit address.
Why? The partition is part of the FLASH. In this respect, it doesn't differ
from other hardcoded partitions using the same DT syntax.
It would just have a compatible value indicating it's a partition table.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | David Gibson <david@gibson.dropbear.id.au> |
|---|---|
| Date | 2015-12-17 02:10 +0100 |
| Message-ID | <qGveX-WJ-47@gated-at.bofh.it> |
| In reply to | #1292010 |
[Multipart message — attachments visible in raw view] — view raw
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
> <david@gibson.dropbear.id.au> wrote:
> >> If the only property needed is the partition table offset, it can be encoded
> >> in the unit-address, and the "reg" property:
> >>
> >> partitions {
> >>
> >> partition-table@xxxx {
> >> reg = <0xxxx ...>;
> >> ...
> >> };
> >>
> >> ...
> >> };
> >
> > Urgh.. and that's abusing the unit address.
>
> Why? The partition is part of the FLASH. In this respect, it doesn't differ
> from other hardcoded partitions using the same DT syntax.
> It would just have a compatible value indicating it's a partition
> table.
Ah.. yes, fair enough. I'd forgotten that the encoding of explicit
partitions in the device tree already established the address space
here as being the flash blocks. So, no, it's not an abuse of unit
address.
Doesn't help for partition table types which require scanning the
device, of course.
--
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web