All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Rob Herring <robh@kernel.org>, Michal Simek <michal.simek@xilinx.com>
Cc: <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 08/21] microblaze: get cpu node with of_get_cpu_node
Date: Tue, 11 Sep 2018 14:15:41 +0200	[thread overview]
Message-ID: <57c78c6e-995d-29cb-fde5-8621610ea9a8@xilinx.com> (raw)
In-Reply-To: <CAL_JsqKWy8dmfF2zCAsEVkDdFM14niKtapqnR_K45Kr3-mZhqQ@mail.gmail.com>

On 10.9.2018 22:49, Rob Herring wrote:
> On Mon, Sep 10, 2018 at 9:56 AM Michal Simek <michal.simek@xilinx.com> wrote:
>>
>> On 5.9.2018 21:37, Rob Herring wrote:
>>> "device_type" use is deprecated for FDT though it has continued to be used
>>> for nodes like cpu nodes. Use of_get_cpu_node() instead which works using
>>> node names by default. This will allow the eventually removal of cpu
>>> device_type properties.
>>>
>>> Also, fix a leaked reference by adding a missing of_node_put.
>>>
>>> Cc: Michal Simek <monstr@monstr.eu>
>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>> ---
>>> Please ack and I will take via the DT tree. This is dependent on the
>>> first 2 patches.
>>
>> I have tested it and it is align with the spec and all dtses generated
>> before 2015 will work without any issue.
>> In 2015 new device tree generator was introduced and it is not adding
>> reg property to cpu node which is required by this change.
>> This will be fixed but that means that all generated dtses from 2015 are
>> affected.
> 
> Patch 2 was supposed to handle that case. However, it does expect that
> there should be an #address-cells equal to 0 in that case. Is that not
> a valid assumption?

as you can expect we have

#address-cells = <0x1>;
#cpus = <0x1>;
#size-cells = <0x0>;
cpu@0 {
	/* no reg property */
};

That missing reg property was even reported by dtc but none has fixed
that. This will be fixed for xilinx releases.


>> That's why will be great if you can also change that pr_err message to
>> mentioned to also check reg property to give users a chance to fix it
>> properly. Error log below.
> 
> I don't think breaking users is good.
> 
> I could make this a find by path (/cpus/cpu) instead or just drop it
> for microblaze. It doesn't really affect my plans for removing
> device_node.type ptr.

If this is fine for you that will be the best solution.

Thanks,
Michal

WARNING: multiple messages have this Message-ID (diff)
From: Michal Simek <michal.simek@xilinx.com>
To: Rob Herring <robh@kernel.org>, Michal Simek <michal.simek@xilinx.com>
Cc: devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 08/21] microblaze: get cpu node with of_get_cpu_node
Date: Tue, 11 Sep 2018 14:15:41 +0200	[thread overview]
Message-ID: <57c78c6e-995d-29cb-fde5-8621610ea9a8@xilinx.com> (raw)
In-Reply-To: <CAL_JsqKWy8dmfF2zCAsEVkDdFM14niKtapqnR_K45Kr3-mZhqQ@mail.gmail.com>

On 10.9.2018 22:49, Rob Herring wrote:
> On Mon, Sep 10, 2018 at 9:56 AM Michal Simek <michal.simek@xilinx.com> wrote:
>>
>> On 5.9.2018 21:37, Rob Herring wrote:
>>> "device_type" use is deprecated for FDT though it has continued to be used
>>> for nodes like cpu nodes. Use of_get_cpu_node() instead which works using
>>> node names by default. This will allow the eventually removal of cpu
>>> device_type properties.
>>>
>>> Also, fix a leaked reference by adding a missing of_node_put.
>>>
>>> Cc: Michal Simek <monstr@monstr.eu>
>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>> ---
>>> Please ack and I will take via the DT tree. This is dependent on the
>>> first 2 patches.
>>
>> I have tested it and it is align with the spec and all dtses generated
>> before 2015 will work without any issue.
>> In 2015 new device tree generator was introduced and it is not adding
>> reg property to cpu node which is required by this change.
>> This will be fixed but that means that all generated dtses from 2015 are
>> affected.
> 
> Patch 2 was supposed to handle that case. However, it does expect that
> there should be an #address-cells equal to 0 in that case. Is that not
> a valid assumption?

as you can expect we have

#address-cells = <0x1>;
#cpus = <0x1>;
#size-cells = <0x0>;
cpu@0 {
	/* no reg property */
};

That missing reg property was even reported by dtc but none has fixed
that. This will be fixed for xilinx releases.


>> That's why will be great if you can also change that pr_err message to
>> mentioned to also check reg property to give users a chance to fix it
>> properly. Error log below.
> 
> I don't think breaking users is good.
> 
> I could make this a find by path (/cpus/cpu) instead or just drop it
> for microblaze. It doesn't really affect my plans for removing
> device_node.type ptr.

If this is fine for you that will be the best solution.

Thanks,
Michal

  reply	other threads:[~2018-09-11 12:16 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05 19:37 [PATCH 00/21] DT cpu node iterator Rob Herring
2018-09-05 19:37 ` [OpenRISC] " Rob Herring
2018-09-05 19:37 ` Rob Herring
2018-09-05 19:37 ` Rob Herring
2018-09-05 19:37 ` Rob Herring
2018-09-05 19:37 ` Rob Herring
2018-09-05 19:37 ` Rob Herring
2018-09-05 19:37 ` [PATCH 01/21] of: Add cpu node iterator for_each_of_cpu_node() Rob Herring
2018-09-06  8:45   ` Geert Uytterhoeven
2018-09-06  8:45     ` Geert Uytterhoeven
2018-10-30 14:18   ` Michael Ellerman
2018-10-30 14:20     ` Michael Ellerman
2018-10-30 15:00       ` Rob Herring
2018-10-30 15:00         ` Rob Herring
2018-11-01 10:52         ` Michael Ellerman
2018-11-01 10:52           ` Michael Ellerman
2018-11-01 15:12           ` Segher Boessenkool
2018-11-01 15:12             ` Segher Boessenkool
2018-11-01 15:57             ` Rob Herring
2018-11-01 15:57               ` Rob Herring
2018-09-05 19:37 ` [PATCH 02/21] of: Support matching cpu nodes with no 'reg' property Rob Herring
2018-09-05 19:37 ` [PATCH 03/21] ARM: use for_each_of_cpu_node iterator Rob Herring
2018-09-05 19:37   ` Rob Herring
2018-09-05 19:37 ` [PATCH 04/21] ARM: topology: remove unneeded check for /cpus node Rob Herring
2018-09-05 19:37   ` Rob Herring
2018-09-05 19:37 ` [PATCH 05/21] ARM: shmobile: use for_each_of_cpu_node iterator Rob Herring
2018-09-05 19:37   ` Rob Herring
2018-09-06  8:52   ` Geert Uytterhoeven
2018-09-06  8:52     ` Geert Uytterhoeven
2018-09-06  8:52     ` Geert Uytterhoeven
2018-09-06  8:56   ` Simon Horman
2018-09-06  8:56     ` Simon Horman
2018-09-05 19:37 ` [PATCH 06/21] arm64: " Rob Herring
2018-09-05 19:37   ` Rob Herring
2018-09-06 10:04   ` Will Deacon
2018-09-06 10:04     ` Will Deacon
2018-09-05 19:37 ` [PATCH 07/21] c6x: " Rob Herring
2018-09-05 19:37 ` [PATCH 08/21] microblaze: get cpu node with of_get_cpu_node Rob Herring
2018-09-10 14:56   ` Michal Simek
2018-09-10 14:56     ` Michal Simek
2018-09-10 20:49     ` Rob Herring
2018-09-11 12:15       ` Michal Simek [this message]
2018-09-11 12:15         ` Michal Simek
2018-09-05 19:37 ` [PATCH 09/21] nios2: " Rob Herring
2018-09-05 19:37 ` [PATCH 10/21] openrisc: use for_each_of_cpu_node iterator Rob Herring
2018-09-05 19:37   ` [OpenRISC] " Rob Herring
2018-09-06  9:12   ` Stafford Horne
2018-09-06  9:12     ` [OpenRISC] " Stafford Horne
2018-09-05 19:37 ` [PATCH 11/21] powerpc: " Rob Herring
2018-09-05 19:37 ` [PATCH 12/21] powerpc: 4xx: get cpu node with of_get_cpu_node Rob Herring
2018-09-05 19:37 ` [PATCH 13/21] powerpc: 8xx: " Rob Herring
2018-09-05 19:37 ` [PATCH 14/21] riscv: use for_each_of_cpu_node iterator Rob Herring
2018-09-05 19:37   ` Rob Herring
2018-09-10 13:37   ` Christoph Hellwig
2018-09-10 13:37     ` Christoph Hellwig
2018-09-10 13:51     ` Rob Herring
2018-09-10 13:51       ` Rob Herring
2018-09-18 22:53   ` Palmer Dabbelt
2018-09-18 22:53     ` Palmer Dabbelt
2018-09-05 19:37 ` [PATCH 15/21] SH: " Rob Herring
2018-09-05 19:37   ` Rob Herring
2018-09-05 19:37 ` [PATCH 16/21] x86: DT: " Rob Herring
2018-09-06  8:15   ` Thomas Gleixner
2018-09-05 19:37 ` [PATCH 17/21] clk: mvebu: " Rob Herring
2018-09-06  1:47   ` Stephen Boyd
2018-09-06  1:47     ` Stephen Boyd
2018-09-05 19:37 ` [PATCH 18/21] edac: cpc925: " Rob Herring
2018-09-05 19:37   ` [18/21] " Rob Herring
2018-09-06  8:35   ` [PATCH 18/21] " Borislav Petkov
2018-09-06  8:35     ` [18/21] " Borislav Petkov
2018-09-06 11:12     ` [PATCH 18/21] " Rob Herring
2018-09-06 11:12       ` [18/21] " Rob Herring
2018-09-06 12:20       ` [PATCH 18/21] " Borislav Petkov
2018-09-06 12:20         ` [18/21] " Borislav Petkov
2018-09-05 19:37 ` [PATCH 19/21] iommu: fsl_pamu: " Rob Herring
2018-09-05 19:37   ` Rob Herring
2018-09-05 19:37 ` [PATCH 20/21] of: " Rob Herring
2018-10-31 12:46   ` NXP P50XX/e5500 secondary CPUs not onlined with current mainline (was [PATCH 20/21] of: use for_each_of_cpu_node iterator) Michael Ellerman
2018-10-31 14:25     ` Rob Herring
2018-11-01 10:55       ` Michael Ellerman
2018-11-01 10:55         ` Michael Ellerman
2018-09-05 19:37 ` [PATCH 21/21] fbdev: fsl-diu: get cpu node with of_get_cpu_node Rob Herring
2018-09-05 19:37   ` Rob Herring
2018-09-05 19:37   ` Rob Herring
2018-09-11  3:34   ` Timur Tabi
2018-09-11  3:34     ` Timur Tabi
2018-09-11  3:34     ` Timur Tabi
     [not found] ` <20180905193738.19325-1-robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2018-09-07 12:54   ` [PATCH 00/21] DT cpu node iterator Michal Simek
2018-09-07 12:54     ` [OpenRISC] " Michal Simek
2018-09-07 12:54     ` Michal Simek
2018-09-07 13:58     ` Rob Herring
2018-09-07 13:58       ` [OpenRISC] " Rob Herring
2018-09-07 13:58       ` Rob Herring
2018-09-07 13:58       ` Rob Herring
2018-09-07 13:58       ` Rob Herring
2018-09-07 13:58       ` Rob Herring
2018-09-07 13:58       ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57c78c6e-995d-29cb-fde5-8621610ea9a8@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.