Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933467AbbKRTH6 (ORCPT ); Wed, 18 Nov 2015 14:07:58 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:36301 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754959AbbKRTH4 (ORCPT ); Wed, 18 Nov 2015 14:07:56 -0500 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: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1714 Lines: 53 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(+) 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) -- 2.0.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/