Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp762533imu; Fri, 7 Dec 2018 08:30:42 -0800 (PST) X-Google-Smtp-Source: AFSGD/WQvEygLNO7M4XQbypSPhSPmzticnZXav8fOs9KnU9M4tL3vSXgFUD5nICvM4+rRjGVO1kl X-Received: by 2002:a62:ab0d:: with SMTP id p13mr2870955pff.211.1544200242909; Fri, 07 Dec 2018 08:30:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544200242; cv=none; d=google.com; s=arc-20160816; b=atGzj8wrbcTQJC9f8q+ImBVwwdJCk7Ac80oojtKWTyOv/a8g0Hb1bTMjwBIHSlVMWD DU+4RIFv63IAuUXmEcuXiUz02kWAsNmKs+MC8dx9RwCIrOSkJhgyVBqmKlCgUjF2FMgE cOvqJ4JbAjyrfrnSo9L/MKKBcLumQYsLUjfyvUExALq6YW10xgcWYw+YFYHmuWapEZEo KxfbJtSjjjgJm/8NjKr6rczbpqjURi+pJX1NE5QII3WhTDpR/pxyOVYOqGChvHjy6E5+ ht0K8HazJUZSxmjT9vnDgT6AXGz1M3soxciloswrLi4baRukwg4X+DrKw4Pm9TMGZwJ2 wxAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature; bh=X2pu8p3WZy3f+AE9epItTKGjPmNG8+ItYYTRAcx7W+g=; b=FQseWUJe2MHP1I0PxvSNNWltjd+kM/CO5ZG+jZIbqtCIW08yBohf4BJO7FChOiiERC Vq4myxL8i+hn160uH3wxMF4+KbHUYa2ZSy35m/Z9ZY/8bffVHpl7UisDGcEHlTg2k9op jTE3CavBziYqgaW2nb8603uDx1DSsbTT1Y2/dx+C+5qT18XTykIBeg7v7Qgi+RBeu0tH EzE3egOH92wmoG3OtwbvpxlPC3LkOvUKJ06GwcvryqqTdLOv7VuF4Sy6VflZKAH7UPyi N4tymqIpL2WZWqQgaPvJYkSjcscX4N/1SqSeO7s3SLTqe4ddZp4cI4NWMPDwO739ZfhZ XJow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=QqWh8jvD; 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 e4si3204750pgk.127.2018.12.07.08.30.13; Fri, 07 Dec 2018 08:30:42 -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; dkim=pass header.i=@sifive.com header.s=google header.b=QqWh8jvD; 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 S1726084AbeLGQ30 (ORCPT + 99 others); Fri, 7 Dec 2018 11:29:26 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:44570 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726034AbeLGQ3Z (ORCPT ); Fri, 7 Dec 2018 11:29:25 -0500 Received: by mail-pl1-f196.google.com with SMTP id k8so2045343pls.11 for ; Fri, 07 Dec 2018 08:29:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=X2pu8p3WZy3f+AE9epItTKGjPmNG8+ItYYTRAcx7W+g=; b=QqWh8jvDePAOhofuVQh0swZUyA8wlLQxcP6G07/2c8ZcESSxdI9GUqiDoXsymf8GQl rMN5a73555bUpsR0RbLU2GK7F2K9gGwnOwB4Kt3ZjdV3vb2t9Y8FBrmjFQlsCh1r9Cec vokBs5WxtgwVmFlt1gzu23Anf6ODsjc08PotZzDOn588ukXJYHrd7MocKk7z+m5kxeh7 tmg1ZdxjC6EhHhP1TxKTjK+/ROTYEoGJta3Z9XdlGuQjtiknQWKbGpi1Fgk3FVfzh7zX +U0oHPhdmIpRjbhUAxLKZP+UHBrVnTcMxLffnOtc/5GdETNFyp3YMr+P9XJBrcMLytud YnFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=X2pu8p3WZy3f+AE9epItTKGjPmNG8+ItYYTRAcx7W+g=; b=p7Ns+rYQ4sUXanoU3+7QCRFKRsKyNkatVQ1pZ/7KdAJNc5L9WonPYrpfOEspKtIg/O w4nHjRVDpHy9cXcC/IXIN4hhafPLmon6oE5aMQ8MGKN6TyLQwFwT5cLsAvZNA72LeRd+ O0yo5GUQ+K2EbP9foo6+tsObWb0/GNVlTVyl3js3rKzxMZ2T1v21cJQhfIBZiH05N1nj 9EVYWhuKuWRl/pn4hSz09JM7Snqzissg2PhORTYSvf4N7m9UmowPHTuWPnMsAVstRAvw VKEcJJ+RpJE+ukAaE5WHmxyZ39m43FX8z1ouffd8+eegVypvnyKqPCfiCnhQ3vb3A9WP LBZQ== X-Gm-Message-State: AA+aEWbqqaMC+2oHLuoYC5EX8IBR94XyHqmazmdYoPkZWqhwe/QoYvor TirulygkiUbAs1BXFUNJspydzWYS120= X-Received: by 2002:a17:902:a6:: with SMTP id a35mr2734632pla.201.1544200164102; Fri, 07 Dec 2018 08:29:24 -0800 (PST) Received: from localhost ([216.3.10.7]) by smtp.gmail.com with ESMTPSA id g2sm4750135pfi.95.2018.12.07.08.29.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 08:29:23 -0800 (PST) Date: Fri, 07 Dec 2018 08:29:23 -0800 (PST) X-Google-Original-Date: Fri, 07 Dec 2018 08:23:54 PST (-0800) Subject: Re: [PATCH 1/4] dt-bindings: Correct RISC-V's timebase-frequency In-Reply-To: <1543870651-16669-2-git-send-email-atish.patra@wdc.com> CC: linux-kernel@vger.kernel.org, Christoph Hellwig , aou@eecs.berkeley.edu, atish.patra@wdc.com, daniel.lezcano@linaro.org, devicetree@vger.kernel.org, dmitriy@oss-tech.org, linux-riscv@lists.infradead.org, mark.rutland@arm.com, robh+dt@kernel.org, tglx@linutronix.de, anup@brainfault.org, Damien.LeMoal@wdc.com From: Palmer Dabbelt To: atish.patra@wdc.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 03 Dec 2018 12:57:28 PST (-0800), atish.patra@wdc.com wrote: > From: Palmer Dabbelt > > Someone must have read the device tree specification incorrectly, > because we were putting timebase-frequency in the wrong place. This > corrects the issue, moving it from > > / { > cpus { > timebase-frequency = X; > } > } > > to > > / { > cpus { > cpu@0 { > timebase-frequency = X; > } > } > } > > This is great, because the timer's frequency should really be a per-cpu > quantity on RISC-V systems since there's a timer per CPU. This should > lead to some cleanups in our timer driver. I think I was actually wrong here: the top version is preferred if timebase-frequency is the same between all CPUs, while the bottom is if it's different. Updating the documentation is still good, because it matches the hardware, but the commit message should be a bit less assertive... :) > Signed-off-by: Palmer Dabbelt > Signed-off-by: Christoph Hellwig > Reviewed-by: Rob Herring > --- > Documentation/devicetree/bindings/riscv/cpus.txt | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/riscv/cpus.txt b/Documentation/devicetree/bindings/riscv/cpus.txt > index adf7b7af..b0b038d6 100644 > --- a/Documentation/devicetree/bindings/riscv/cpus.txt > +++ b/Documentation/devicetree/bindings/riscv/cpus.txt > @@ -93,9 +93,9 @@ Linux is allowed to run on. > cpus { > #address-cells = <1>; > #size-cells = <0>; > - timebase-frequency = <1000000>; > cpu@0 { > clock-frequency = <1600000000>; > + timebase-frequency = <1000000>; > compatible = "sifive,rocket0", "riscv"; > device_type = "cpu"; > i-cache-block-size = <64>; > @@ -113,6 +113,7 @@ Linux is allowed to run on. > }; > cpu@1 { > clock-frequency = <1600000000>; > + timebase-frequency = <1000000>; > compatible = "sifive,rocket0", "riscv"; > d-cache-block-size = <64>; > d-cache-sets = <64>; > @@ -145,6 +146,7 @@ Example: Spike ISA Simulator with 1 Hart > This device tree matches the Spike ISA golden model as run with `spike -p1`. > > cpus { > + timebase-frequency = <1000000>; > cpu@0 { > device_type = "cpu"; > reg = <0x00000000>;