Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5324376imm; Tue, 21 Aug 2018 09:47:11 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwsD2hqTuqCjNnyaSIvBjEQPYBR2F84ra6alfdZwTxSDeeoaudvFNFD11P0NBuPLyVKDlBb X-Received: by 2002:a17:902:127:: with SMTP id 36-v6mr7093254plb.178.1534870031741; Tue, 21 Aug 2018 09:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534870031; cv=none; d=google.com; s=arc-20160816; b=sBrtMmd9SYxAEaJdEw+vW5MdR3Mj1WVgKz2USssR4CfmpAWko/wAV2FwH4LeN6HO5c IQH+oTqRFTSyogil32f943TIMcb07HS2irLu5+5gCKEp7WEhvuel/MgcLjf4f+7pHkjK 8ZSSxipX6jj2KUmEPXGcYKlyAOzZhBXgn8RMR73akRHL6aQq7F3AdClxu1AOfpVWeDT0 LcXK4c0iT+mzgvg//s+HQEl6aoqeCbAwSWHtc/rFn1NMT+Z1T2OjU1x69wFYYByQfOsZ Q+kpmMeGZv7VjiTeP8OIMpyLVQFqn8au0A1VGwiwCsiWIjI4RFFYt4B678HiSzdNg/Zm 2Geg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=lFOHFpR+amS5x9JJ70VCAqgX8mu7REL4MivPg0W8qQs=; b=USmNuo4jK07xNVvogubQyiwRYvE8cokonoGtGwfRC75p73R6T1z1TetjCT83SrWeSE VmouBJfo2FtlOpHHMCFytCyi9mKQprfZT6L9rra0Q7/RXTr0iJEbEzk+FttP8Pxw6ARA d3rZIplPdhhdJBIAtoI/U2OKMB7qcPFHG8LBRoEcniDSJ0QkupELJcKLpFRcWGGGzyH3 FV1goz7vWN94dPcCFsjN6eHELgqqgYYFLXxQZ4Omesgl3gA4hKm7S/Wd5sAHx9dlYQdr wYYXtnHJQ8xyf2239xuS8zXG3RgvsBx6uw0E+9jg8y5Gd629Gt7FvyOyRdV0Ps7THlzL WQ7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=THyZtBVk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 18-v6si10707371pgy.277.2018.08.21.09.46.56; Tue, 21 Aug 2018 09:47:11 -0700 (PDT) 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=@linaro.org header.s=google header.b=THyZtBVk; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726899AbeHUUC1 (ORCPT + 99 others); Tue, 21 Aug 2018 16:02:27 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35167 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726860AbeHUUC1 (ORCPT ); Tue, 21 Aug 2018 16:02:27 -0400 Received: by mail-wr1-f68.google.com with SMTP id j26-v6so592791wre.2 for ; Tue, 21 Aug 2018 09:41:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=lFOHFpR+amS5x9JJ70VCAqgX8mu7REL4MivPg0W8qQs=; b=THyZtBVkw0x53a14WAFgTnz3v6p60e5IDwa3P+1sHdJL7wzE1SutmJg0Ujt5mi/jK7 bhk1vXf7kRlxGD5F1c4+78pT6JMFl0vqklzjvvmgmxcMPZfVn6O5sdwaQAY17LGBaKKo ODeIW27jOkyDzvNxLTBPo/inm9si3QgA0ewW8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lFOHFpR+amS5x9JJ70VCAqgX8mu7REL4MivPg0W8qQs=; b=f96BbyRorUNDPUW2ogJRFNy1jCzMTQ7nAeuiFJPz1HZJQiUasa0R7sE3gtzpNeyc9T VEHES6fBq9phVbtkUmFLg1/pT8Y1xV0pIbYd2PBn12Eqq9lQhXqjfDNQYONSF9N/Q0mk UYoSd5uLn76AH1NxrOeEX72F2BxCOKcoEF4DKK8Le7gzp70bzIoMx9ONquwm9nlVtppn Q9Q9/8ztTX9UoZUmiS9lKu5wj4NxfzYsUxkhEw0HNVMLQ9Av0l0ZLLvA0Mjqk+GB5+Dc zLcT9uarqStmDhD1Qdif5QemoQGA81UQqe4RlG41o4h3UsasSf8N6F97M4LLUOU8IDI8 KZCA== X-Gm-Message-State: APzg51B6qnEnK9csTM1tNktW6LkOdoOCUoRg5CVAfvVQI14tbLAMT8QP slEbsoXDOe1xRzjGPMGrBgDQzw== X-Received: by 2002:adf:fa4d:: with SMTP id y13-v6mr9706329wrr.155.1534869694602; Tue, 21 Aug 2018 09:41:34 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:f:6020:3439:d494:ce42:6719]) by smtp.gmail.com with ESMTPSA id l16-v6sm2165294wmc.38.2018.08.21.09.41.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Aug 2018 09:41:33 -0700 (PDT) From: Vincent Guittot To: robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, punit.agrawal@arm.com Cc: edubezval@gmail.com, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Vincent Guittot Subject: [PATCH] dt-binding: arm/cpus.txt: fix dynamic-power-coefficient unit Date: Tue, 21 Aug 2018 18:41:25 +0200 Message-Id: <1534869685-22221-1-git-send-email-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The unit of dynamic-power-coefficient is described as mW/MHz/uV^2 whereas its usage in the code assumes that unit is mW/GHz/V^2 In drivers/thermal/cpu_cooling.c, the code is : power = (u64)capacitance * freq_mhz * voltage_mv * voltage_mv; do_div(power, 1000000000); which can be summarized as : power (mW) = capacitance * freq_mhz/1000 * (voltage_mv/1000)^2 Furthermore, if we test basic values like : voltage_mv = 1000mV = 1V freq_mhz = 1000Mhz = 1Ghz The minimum possible power, when dynamic-power-coefficient equals 1, will be : min power = 1 * 1000 * (1000000)^2 = 10^15 mW which is not realistic With the unit used by the code, the min power is min power = 1 * 1 * 1^2 = 1mW which is far more realistic Signed-off-by: Vincent Guittot --- Documentation/devicetree/bindings/arm/cpus.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index 29e1dc5..0148d7d 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt @@ -274,7 +274,7 @@ described below. Usage: optional Value type: Definition: A u32 value that represents the running time dynamic - power coefficient in units of mW/MHz/uV^2. The + power coefficient in units of mW/GHz/V^2. The coefficient can either be calculated from power measurements or derived by analysis. @@ -285,7 +285,7 @@ described below. Pdyn = dynamic-power-coefficient * V^2 * f - where voltage is in uV, frequency is in MHz. + where voltage is in V, frequency is in GHz. Example 1 (dual-cluster big.LITTLE system 32-bit): -- 2.7.4