Received: by 10.223.185.116 with SMTP id b49csp5735335wrg; Wed, 7 Mar 2018 17:36:32 -0800 (PST) X-Google-Smtp-Source: AG47ELtT7by1nDs/C736mFB5uj7XyeG0aUb3J5uhZ0zMP4iExwJdSjZPcjtnDAZ5irT6hNWBgnTy X-Received: by 2002:a17:902:2006:: with SMTP id n6-v6mr22298119pla.149.1520472992785; Wed, 07 Mar 2018 17:36:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520472992; cv=none; d=google.com; s=arc-20160816; b=MAmTJT5YK9u91qVjEc0DJdD2SoZPJokTHAGzdPeBYr/Ht709BCKb2Hl08pbrCKBkCk e6gLXQ1UBFyeu8s1A3/w+Cqk39tr/kZXvIK3poqCwOx0JrU78X6hLGw0SH6bv8L9amVY Iltr2SZVgQsUlsOXkwjt86jRHKZR4a2GhgqvclT3L1nFCU589mYUwcGW/55UYP0DlGQr 7ssamd1ZOXhGkLSonLrOdIn2Z+6mjlzHX+Z0kxy/cqG70p7mLzuMpqBL/TKD0bz5AR1m MoyBW+TozMRYalAMqtrDDIYGxyDH3LyS324YRVZlT3DycrTfv5nzSwl1r7ylxYqq2hqg wQDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=lp4onqmql5WodQjJ6unOi9RM5zTIj9DyR3Or3IR03tw=; b=RVPnARyScta8trIS4PwuEu8KMq7mZQMfyW27lxjRI+qV9GWgL0w/xyuRIC/svgKVhJ JcN7tgqk1RkZ0enr4gP9qwWNas0iZ4kxkum3OIgLxpPbvkQ1EPlKAda721pSkehDDy1I 7pv0DVKJecjsfUR9vd7unDEyCltcvXqjlE1F0MSIRuqV6MCg8R58Wd8UTh7A0CKSYVEq N/jza9Rn5OjUnP56oge1Pm+aLxgNFLvaeiLyc15O4vt39sk98GXDxXDxuobfH+rYvY64 JpKwJehD5YI0RBdrDSwhMgt2ZLbC84cbSXxUHWqZR6NeD2stXvo9qzzYIkKlap2PF+Ch mRbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21si14914891pfj.306.2018.03.07.17.36.18; Wed, 07 Mar 2018 17:36:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934613AbeCHBed (ORCPT + 99 others); Wed, 7 Mar 2018 20:34:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:60498 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933575AbeCHBec (ORCPT ); Wed, 7 Mar 2018 20:34:32 -0500 Received: from mail-qk0-f179.google.com (mail-qk0-f179.google.com [209.85.220.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E7F8F2177B for ; Thu, 8 Mar 2018 01:34:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7F8F2177B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh+dt@kernel.org Received: by mail-qk0-f179.google.com with SMTP id 130so5039448qkd.13 for ; Wed, 07 Mar 2018 17:34:31 -0800 (PST) X-Gm-Message-State: AElRT7HfTAIzJnhLw4BzY/fWQJPT/oa6Dh3GFKWYRymcPIjQh0niRjCm HKKK80TaRywRHKlMeK1RHvCOCf898fQsV2ABAg== X-Received: by 10.55.31.163 with SMTP id n35mr36905960qkh.147.1520472871100; Wed, 07 Mar 2018 17:34:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.166.129 with HTTP; Wed, 7 Mar 2018 17:34:09 -0800 (PST) In-Reply-To: <1520471460.55728.73.camel@intel.com> References: <3a0359afad71abc0c0d682bfcd0dd66055f5d7e5.1520450752.git.ivan.gorinov@intel.com> <1520471460.55728.73.camel@intel.com> From: Rob Herring Date: Wed, 7 Mar 2018 19:34:09 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 3/4] of: Documentation: Add x86 local APIC ID property To: Ivan Gorinov Cc: Thomas Gleixner , Linux Kernel Mailing List , Ingo Molnar , Mark Rutland Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 7, 2018 at 7:11 PM, Ivan Gorinov 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 >> > --- >> > 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