All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Ivan Gorinov <ivan.gorinov@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH v4 3/4] of: Documentation: Add x86 local APIC ID property
Date: Wed, 7 Mar 2018 19:34:09 -0600	[thread overview]
Message-ID: <CAL_JsqK+raaenSBMWYE-Qzc+Y7xVpur0UZj5X47n+64ipwAWhg@mail.gmail.com> (raw)
In-Reply-To: <1520471460.55728.73.camel@intel.com>

On Wed, Mar 7, 2018 at 7:11 PM, Ivan Gorinov <ivan.gorinov@intel.com> wrote:
> On Wed, 2018-03-07 at 14:23 -0600, Rob Herring wrote:
>
>> > Add new "intel,apic-id" property to allow using CPU descriptions
>> > in Device Tree data provided by the U-Boot loader.
>> > Address specified in 'reg' to be used as default local APIC ID
>> > to avoid breaking existing systems with DTB provided by firmware.
>> Is there some reason to not always use reg? For when the numbering of
>> cpus and timers is different?
>
> Yes, local APIC ID may differ from CPU number.
> For example, in Atom E38xx (u-boot/arch/x86/dts/minnowmax.dts):
>
>         cpus {
>                 #address-cells = <1>;
>                 #size-cells = <0>;
>
>                 cpu@0 {
>                         device_type = "cpu";
>                         compatible = "intel,baytrail-cpu";
>                         reg = <0>;
>                         intel,apic-id = <0>;
>                 };
>
>                 cpu@1 {
>                         device_type = "cpu";
>                         compatible = "intel,baytrail-cpu";
>                         reg = <1>;
>                         intel,apic-id = <4>;
>                 };
>         };
>
>> Of course, we do have the situation on ARM with the GIC that the GIC
>> CPU IDs may be
>> >
>> >
>> > Signed-off-by: Ivan Gorinov <ivan.gorinov@intel.com>
>> > ---
>> >  Documentation/devicetree/bindings/x86/ce4100.txt | 6 ++++++
>> >  1 file changed, 6 insertions(+)
>> >
>> > diff --git a/Documentation/devicetree/bindings/x86/ce4100.txt b/Documentation/devicetree/bindings/x86/ce4100.txt
>> > index b49ae59..d15de48 100644
>> > --- a/Documentation/devicetree/bindings/x86/ce4100.txt
>> > +++ b/Documentation/devicetree/bindings/x86/ce4100.txt
>> > @@ -14,11 +14,17 @@ The CPU node
>> >                 compatible = "intel,ce4100";
>> >                 reg = <0>;
>> >                 lapic = <&lapic0>;
>> Isn't this enough? I can't tell because whatever this points to has no
>> binding documentation.
>
> Local APIC is a part of CPU, not an external device (except for 486 and early Pentium).
> Every CPU has access to its own local APIC registers at the same base address (0xfee00000).
> Therefore, one "lapic" device node can work for all processors in the system.

Do you need a lapic node then? If you typically don't have a node,
then just having the id should be fine.

> With more changes in the code, the local APIC description could be made optional
> because every processor can always read its local APIC base address from MSR 0x1b.
> And when x2APIC mode is enabled, the local APIC registers are accessed as model
> specific registers instead of memory-mapped I/O.
>
>> You could perhaps extend it and add a cell with the id value.
>
> This may require different DT data for Linux and U-Boot, or changes in the latter.

The latter case. There's one upstream for DT binding reviews.

Rob

  reply	other threads:[~2018-03-08  1:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 19:45 [PATCH v4 0/4] x86/devicetree: Re-enable x86-specific implementation Ivan Gorinov
2018-03-07 19:46 ` [PATCH v4 1/4] x86/devicetree: Initialize device tree before using it Ivan Gorinov
2018-03-08  9:03   ` [tip:x86/platform] " tip-bot for Ivan Gorinov
2018-03-07 19:46 ` [PATCH v4 2/4] x86/devicetree: Fix device IRQ settings in DT Ivan Gorinov
2018-03-08  9:04   ` [tip:x86/platform] " tip-bot for Ivan Gorinov
2018-03-07 19:47 ` [PATCH v4 3/4] of: Documentation: Add x86 local APIC ID property Ivan Gorinov
2018-03-07 20:23   ` Rob Herring
2018-03-08  1:11     ` Ivan Gorinov
2018-03-08  1:34       ` Rob Herring [this message]
2018-03-07 19:47 ` [PATCH v4 4/4] x86/devicetree: Enable multiprocessing in DT Ivan Gorinov
2018-03-08  2:16 ` [PATCH v4 0/4] x86/devicetree: Re-enable x86-specific implementation Frank Rowand
2018-03-13 16:08   ` Andy Shevchenko

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=CAL_JsqK+raaenSBMWYE-Qzc+Y7xVpur0UZj5X47n+64ipwAWhg@mail.gmail.com \
    --to=robh+dt@kernel.org \
    --cc=ivan.gorinov@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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.