Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp339566imu; Thu, 3 Jan 2019 21:32:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/U0pWP7FkOu0mtuq0YIPaqYIXTgKEEOwYe5wB9V8/IqcmsCXbEDuF6qExGkC6Ha6JLMbdE6 X-Received: by 2002:a62:68c5:: with SMTP id d188mr52426563pfc.194.1546579946328; Thu, 03 Jan 2019 21:32:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546579946; cv=none; d=google.com; s=arc-20160816; b=eadJ7q2Jq6h25N6xtHo6FaXU/ewp+MEqXRvwP0kkMMEkO0ivwC7Oorf8GM1PBprhg9 BYU7nSXJsqFbGDV3aW5HWj32NQsVp1HXXhYvOycrRe7G8iogZD7VkpIICq4QgqCfsKYt jAIMBMbzUfK0V+BX0j+0Z1h60PVJGSRBOOQHXykVZ7ZFNYQuODUuMK41uJRjPpz87aKy nCUly4DYBpUL8WT/6YAalOQ9N46Ut4aY+xgnl85E+1HXRD1PPvBpP+NRRTFSvROkBlJy 8UDHDqGXNvdtSUDTbduxRVfLUt0FWrcTZZ2G3MJKl8novLQ6ZF0bpOVXBRb5gZl7oi9n fXvA== 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=sH696XfMqLRQ1tRvrc7Fi9lOpjV2QeG6g65JbjgrN0o=; b=EfJsbpeNDUGWRlWQ6FRFTNenPrtaS7NrjLYz5c0hjU9IRgAHZAErjTYKXVCYI7JUkr TdWOE24m9prEmjH7Z5HRFr0b2rigOIJH4P3R+j7pVjjTjQIgylVEjnR6Yv3h4cx6sDxl UuIqZ25gQ/48aqgSjmqNksc5B+ukzWzxi2l1d/X6G/xBVcT9lh7zSPmcY9sOqwU1Bet1 mEqgk3ukErnxd1J4Or9LAQKYh0/lRR2vxgk/VqzqBJiG6mWR8xwOL52CQ+LT/0er2h6a u47mwTtaetT1bTzu2CiLlvpBS77b0DurVqnXXAla/J8+7v+lqcibtzmJvZnkcL4qfGiK rqRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=B6J9fOp3; 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 a23si22890237plm.334.2019.01.03.21.32.11; Thu, 03 Jan 2019 21:32:26 -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=B6J9fOp3; 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 S1729142AbfADAgY (ORCPT + 99 others); Thu, 3 Jan 2019 19:36:24 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:46357 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726034AbfADAgY (ORCPT ); Thu, 3 Jan 2019 19:36:24 -0500 Received: by mail-pl1-f194.google.com with SMTP id t13so16592993ply.13 for ; Thu, 03 Jan 2019 16:36:24 -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=sH696XfMqLRQ1tRvrc7Fi9lOpjV2QeG6g65JbjgrN0o=; b=B6J9fOp38YeW6xFrZDaVgQ9j69DE8ZH7irSliG5g2loIrXzWMOLx+VFHHWDY84sCyw ZCJCreI5Q6A4YSSe/EnME/RmhcS4NoVdJZt70efYDkn6+HLTXUs4KjINN6Xemej0aXs9 JNqIvBBmAzkMmDwtDJDzL92fKPcUwmUsqIqPmzgjOUI07M2OHwVNzFijtsZGjlMSWXT6 Pb5Zpcjr+Czcm/cdTNLWFTaJ3hHyJmsrQEQlA/64KO1ufM/yS3Y6GS8THA2doMPhqwsZ vOgmMRYWYZEepX9NI8ZgJ/ce2N028oPIG0fLBppKfdhoXxpFMUyVA8wG62aHRKxVftpf VcrQ== 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=sH696XfMqLRQ1tRvrc7Fi9lOpjV2QeG6g65JbjgrN0o=; b=QE7faQuzUOxrsc4NnVrf0SkoesmVEpl36kQ9rv7J9Lg4P6nAI4ukUVHbxazVuL4M4+ wzddezNVRs9m+Dw6bh6vbelQId+fQ7WBsPqCvuTwsLc+I3A438ZZdYhbCRvp6bfOTRZj PNka/N/QzHOe/rn/f5Vj/ynPbM1re8vXC4Fu+IJgeGYq8MtToyh5QFPaA5liQ/i3S/zf tObDvIPMNeCblTtTm70M2JBV2dWE20shc3k9siSwaJD49duNl3shcJVPk8q/zwl5IH+v LyvPXi3hYpsqWpX7dln+r6LGHcow++cOMHYCBSvdMZKGi/6JkA/CShtBc8RsBOL01/dV 5TyQ== X-Gm-Message-State: AJcUukfIGqOTj1mZfv4gwB+QxTvyVkk4pVQckgDHcEV0TGmtqyEhyJNZ dsGcM6ScNPR5a606/mxF1bPi3w== X-Received: by 2002:a17:902:24a2:: with SMTP id w31mr48185166pla.216.1546562183309; Thu, 03 Jan 2019 16:36:23 -0800 (PST) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id i184sm78920216pfc.41.2019.01.03.16.36.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Jan 2019 16:36:22 -0800 (PST) Date: Thu, 03 Jan 2019 16:36:22 -0800 (PST) X-Google-Original-Date: Thu, 03 Jan 2019 16:35:55 PST (-0800) Subject: Re: [PATCH v2 1/4] dt-bindings: Correct RISC-V's timebase-frequency In-Reply-To: <5d652370-4782-23b2-9896-b9666b3cc1e7@linaro.org> CC: atish.patra@wdc.com, linux-kernel@vger.kernel.org, Christoph Hellwig , aou@eecs.berkeley.edu, 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, Christoph Hellwig From: Palmer Dabbelt To: daniel.lezcano@linaro.org 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 Fri, 14 Dec 2018 01:17:24 PST (-0800), daniel.lezcano@linaro.org wrote: > On 14/12/2018 00:14, Atish Patra wrote: >> From: Palmer Dabbelt >> >> In RISC-V systems, timebase-frequency is per cpu instead of one >> instance for entire SOC as there is a individual timer per each CPU. >> Fix the DT binding accordingly. > > Why not use a fixed-clock instead of this timebase property which forces > to declare a global variable to be exported from arch/riscv to > drivers/clocksource ? That makes sense to me. I've always disliked this global variable and a big part of why my original version got delayed forever is that I'd hoped to get rid of it. Given that this is all a mess anyway I'm OK breaking backwards compatibility here. Is there an example of how to do this? > In addition, please add the 'Fixes' tag > >> Signed-off-by: Palmer Dabbelt >> Signed-off-by: Christoph Hellwig >> [Atish: Update the commit text] >> Signed-off-by: Atish Patra >> 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>;