From patchwork Mon Oct 27 18:20:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janne Grunau X-Patchwork-Id: 5164531 Return-Path: X-Original-To: patchwork-ceph-devel@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 021C79F349 for ; Mon, 27 Oct 2014 18:21:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 47614201D3 for ; Mon, 27 Oct 2014 18:20:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 509E82020E for ; Mon, 27 Oct 2014 18:20:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752279AbaJ0SUw (ORCPT ); Mon, 27 Oct 2014 14:20:52 -0400 Received: from soltyk.jannau.net ([185.27.253.110]:59343 "EHLO soltyk.jannau.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751888AbaJ0SUn (ORCPT ); Mon, 27 Oct 2014 14:20:43 -0400 Received: from coburn.home.jannau.net (55d44062.access.ecotel.net [85.212.64.98]) by soltyk.jannau.net (Postfix) with ESMTPSA id B444E3E1ADE for ; Mon, 27 Oct 2014 19:20:42 +0100 (CET) From: Janne Grunau To: ceph-devel@vger.kernel.org Subject: [PATCH 3/5] aarch64: add support for HW_CAP based neon runtime detection Date: Mon, 27 Oct 2014 19:20:34 +0100 Message-Id: <1414434036-29313-4-git-send-email-j@jannau.net> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1414434036-29313-1-git-send-email-j@jannau.net> References: <1414434036-29313-1-git-send-email-j@jannau.net> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 --- src/arch/neon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/arch/neon.c b/src/arch/neon.c index 32c1f62..aa46595 100644 --- a/src/arch/neon.c +++ b/src/arch/neon.c @@ -10,7 +10,7 @@ int ceph_arch_neon = 0; #include #include // ElfW macro -#if __arm__ +#if __arm__ || __aarch64__ #include #endif // __arm__ @@ -42,6 +42,8 @@ int ceph_arch_neon_probe(void) { #if __arm__ && __linux__ ceph_arch_neon = (get_hwcap() & HWCAP_NEON) == HWCAP_NEON; +#elif __aarch64__ && __linux__ + ceph_arch_neon = (get_hwcap() & HWCAP_ASIMD) == HWCAP_ASIMD; #else if (0) get_hwcap(); // make compiler shut up