From patchwork Wed Nov 18 18:48:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 56952 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2744630lbb; Wed, 18 Nov 2015 11:07:58 -0800 (PST) X-Received: by 10.66.141.73 with SMTP id rm9mr4428542pab.96.1447873677969; Wed, 18 Nov 2015 11:07:57 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id eg4si6172242pbc.189.2015.11.18.11.07.57; Wed, 18 Nov 2015 11:07:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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 stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755247AbbKRTH5 (ORCPT + 2 others); Wed, 18 Nov 2015 14:07:57 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:33278 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754016AbbKRTH4 (ORCPT ); Wed, 18 Nov 2015 14:07:56 -0500 Received: by pabfh17 with SMTP id fh17so55218609pab.0 for ; Wed, 18 Nov 2015 11:07:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=+CkG1Nx/Zk0jK9ro8zX2ADFTT3PH4s0vuMkZyp9lo5Q=; b=ogyqWXW7UDahBLqpcU0PY2/F/UdLdS+5h0/oSB6LBjby/PfM5rMrdaQLLoeACs0zdR vGKS1vEqK+CB7xcPbs/iJfphg5Emea6UkLQDHmEv6QSp92hufEubPW+k6+U6fP/Zp7Xb 4KFzMrH3zcfvhi9ogGtTC3o0E9XIX9FrgBPzswRyYuCPl3eVmPiiFAWIHb8f2Gc6BvWU q3DEkHd7yu5Y6/T3TQxfv/anrwgRLiCFq3n8bdL4nKZ3pIoMddVSRmYe1jMysgS6vgSo NDkPltA4XLCCvYNrm1LLO39MXaj48l7qcCJ39nYw02OAaA+cEv3Q/FNnqw4A+wuNkXZM 4MoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+CkG1Nx/Zk0jK9ro8zX2ADFTT3PH4s0vuMkZyp9lo5Q=; b=eutEpof73QfIevPaL11Sw0KxpzEqgonKINUe774kOPAbtwbXfkU8D4s/5sX5bPbTIE qhauOOXBVuKmf+nKZlnoIcwVNJq2XrjRAGq2uVX/25j2cpOzDoT1rIlXUKVkYug8UbbB 3Y47Jw87wtPtjRy28iITJZY1m4cJu8olwZTASTOBfJAy7dnWnxYhC6fJ6W6lf3kxYKVZ sHn6N1ObKuoU1XqL5BC+nZhrCBO/p7bxa6C/mrnFkk6bhsu04O6lmmzIOQpnHEJAOzX8 uRtNa2LXBND7jqLQb6V7lAmlkflfD4RGwm5sjH1X0Lkggdbdr/xcGoQZgXiO2CaEb2pU IjbA== X-Gm-Message-State: ALoCoQl5SemRZvjdjvqteOzzvzxlbKoxu98C3F3zp9n2cp0NTXHj/j1MluPhi/arPJ7AhrUYzrnw X-Received: by 10.66.155.74 with SMTP id vu10mr4436156pab.80.1447873675734; Wed, 18 Nov 2015 11:07:55 -0800 (PST) Received: from yshi-Precision-T5600.corp.ad.wrs.com (unknown-216-82.windriver.com. [147.11.216.82]) by smtp.gmail.com with ESMTPSA id ix1sm5712204pbd.40.2015.11.18.11.07.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Nov 2015 11:07:54 -0800 (PST) From: Yang Shi To: Will.Deacon@arm.com, Catalin.Marinas@arm.com Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, stable@vger.kernel.org, yang.shi@linaro.org Subject: [V2 PATCH] arm64: restore bogomips information in /proc/cpuinfo Date: Wed, 18 Nov 2015 10:48:55 -0800 Message-Id: <1447872535-31117-1-git-send-email-yang.shi@linaro.org> X-Mailer: git-send-email 2.0.2 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org As what Pavel Machek reported [1], some userspace applications depend on bogomips showed by /proc/cpuinfo. Although there is much less legacy impact on aarch64 than arm, but it does break libvirt. Basically, this patch reverts commit 326b16db9f69fd0d279be873c6c00f88c0a4aad5 ("arm64: delay: don't bother reporting bogomips in /proc/cpuinfo"), but with some tweak due to context change. [1] https://lkml.org/lkml/2015/1/4/132 Acked-by: Will Deacon Cc: #3.12+ Signed-off-by: Yang Shi --- V2 --> V1: * Remove double new line and unnecessary bogomips sum info arch/arm64/kernel/cpuinfo.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.0.2 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c index 706679d..212ae63 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c @@ -30,6 +30,7 @@ #include #include #include +#include /* * In case the boot CPU is hotpluggable, we record its initial state and @@ -112,6 +113,10 @@ static int c_show(struct seq_file *m, void *v) */ seq_printf(m, "processor\t: %d\n", i); + seq_printf(m, "BogoMIPS\t: %lu.%02lu\n", + loops_per_jiffy / (500000UL/HZ), + loops_per_jiffy / (5000UL/HZ) % 100); + /* * Dump out the common processor features in a single line. * Userspace should read the hwcaps with getauxval(AT_HWCAP)