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: 7652311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1A031BF90C for ; Wed, 18 Nov 2015 19:10:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 37E68205F2 for ; Wed, 18 Nov 2015 19:10:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 648E1205CB for ; Wed, 18 Nov 2015 19:10:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zz85c-0004Vx-MG; Wed, 18 Nov 2015 19:08:20 +0000 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zz85Y-0004Mn-OZ for linux-arm-kernel@lists.infradead.org; Wed, 18 Nov 2015 19:08:18 +0000 Received: by padhx2 with SMTP id hx2so53385103pad.1 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=ZkGNhEF0t2yuJ+Hao0bqJWoA1uGABb1zJCa6bmrHQGQiV3S9nyGDDwpOSNUdxquMP7 hxf113Ks60ajAg9CcY85I6EPrzHs5nL/hyBpWTqSJaSCgXG8PijAPTEhEXaAQztYEKQl sBEhUWUW4EvTipDu00OtN0CXW8GKQmFY/E2etncQN/NbxpdpKCzm/iP7ylp2/U80gfLX GI31elb0okYHXomY+69lgLL8jyHfyNeh2NPKmdhR5SlGhPdSe0N6SyiIY6Eta4RV5WnN wEeh+g5o2G0szonGTC6ljpnKaCJhmYfYiN60xAaFe/c0JT3qzHZMUiGgA6xJUb0Uxp3I AwYg== X-Gm-Message-State: ALoCoQl1WL//tJhXbNc26wubCHJ/zqnZjUAoBpSQfJwN5Bmy7fdbjmIRBtzVe6haZC3mUmIfaDzj 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151118_110816_962415_15CF2246 X-CRM114-Status: GOOD ( 10.89 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stable@vger.kernel.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, yang.shi@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)