From patchwork Wed Jul 17 06:48:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tetsuyuki Kobayashi X-Patchwork-Id: 2828470 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5F0CB9F967 for ; Wed, 17 Jul 2013 06:50:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 73D5D20134 for ; Wed, 17 Jul 2013 06:50:37 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BF18120131 for ; Wed, 17 Jul 2013 06:50:34 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UzLZF-0000PI-M8; Wed, 17 Jul 2013 06:50:29 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UzLZD-0001KM-CD; Wed, 17 Jul 2013 06:50:27 +0000 Received: from vrgw3.firstserver.ne.jp ([164.46.1.46]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UzLZ9-0001JV-FG for linux-arm-kernel@lists.infradead.org; Wed, 17 Jul 2013 06:50:25 +0000 Received: from fvrsp111.firstserver.ne.jp (fvrsp111.firstserver.ne.jp [210.168.115.3]) by vrgw3.firstserver.ne.jp (8.13.8/8.13.8/FirstServer) with ESMTP id r6H6mx9e010886; Wed, 17 Jul 2013 15:48:59 +0900 (envelope-from koba@kmckk.co.jp) Received: from 203.137.25.97 (203.137.25.97) by fvrsp111.firstserver.ne.jp (F-Secure/virusgw_smtp/407/fvrsp111.firstserver.ne.jp); Wed, 17 Jul 2013 15:48:59 +0900 (JST) X-Virus-Status: clean(F-Secure/virusgw_smtp/407/fvrsp111.firstserver.ne.jp) Received: from localhost (58-188-103-12f2.kns1.eonet.ne.jp [58.188.103.12]) (authenticated (0 bits)) by mail.kmckk.co.jp (8.14.3/8.11.3) with ESMTP id r6H6mvMa006144; Wed, 17 Jul 2013 15:48:57 +0900 From: Tetsuyuki Kobayashi To: will.deacon@arm.com Subject: [PATCH] ARM: bugfix: Features of /proc/cpuinfo is wrong Date: Wed, 17 Jul 2013 15:48:29 +0900 Message-Id: <1374043709-24770-1-git-send-email-koba@kmckk.co.jp> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130717_025023_922912_E933B263 X-CRM114-Status: UNSURE ( 8.24 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.6 (+) Cc: Tetsuyuki Kobayashi , rmk+kernel@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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=-1.1 required=5.0 tests=BAYES_00, FSL_HELO_BARE_IP_2, RCVD_IN_DNSWL_MED, RCVD_NUMERIC_HELO, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 Array hwcap_str[19] should be "vfpd32" and hwcap_str[20] should be "lpae". But actually "vfpd32" was missing and "lpae" was at wrong place. Signed-off-by: Tetsuyuki Kobayashi Acked-by: Will Deacon --- Hello, The output of features string of /proc/cpuinfo is changed at v3.11-rc1. In case of KZM-A9-GT board, which cpu is ARM Corex-A9 $ grep Features /proc/cpuinfo Features : swp half thumb fastmult vfp edsp neon vfpv3 tls lpae This is wrong. Cortex-A9 does not have lpae (Large Physical Address Extension). I tried git bisect and found this commit is related. a469abd0f868c902b75532579bf87553dcf1b360 ARM: elf: add new hwcap for identifying atomic ldrd/strd instructions Variable elf_hwcap = 0x0008b0d7. This seems good. HWCAP_LPAE (1 << 20) is not set in elf_hwcap. Finally I found "lpae" string was wrong place in the array hwcap_str[]. hwcap_str[19] should be "vfpd32" and hwcap_str[20] should be "lpae". But actually "vfpd32" was missing and "lpae" was at wrong place. After this patch, features of /proc/cpuinfo of the same board is Features : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 I tested only in Cortex-A9. Someone, please test on Cortex-A15 or A7. "lpae" should be appeared. arch/arm/kernel/setup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 63af9a7..96286cb 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -971,6 +971,7 @@ static const char *hwcap_str[] = { "vfpv4", "idiva", "idivt", + "vfpd32", "lpae", NULL };