From patchwork Sat Jun 10 16:22:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 103556 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp270787qgd; Sat, 10 Jun 2017 09:23:10 -0700 (PDT) X-Received: by 10.84.239.23 with SMTP id w23mr46603892plk.73.1497111790284; Sat, 10 Jun 2017 09:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497111790; cv=none; d=google.com; s=arc-20160816; b=oCLdnFoxfulA/SAdmYwreUaaSqfBI+TzAkxg0xHZiJCUwfoyA9FjMEney7DcaArqD+ QygIr/jD48JrQAdOQ0mWB09bGw4w73q4KUXprSwQnUVMQiXQOYKf3fLH/DYb+Ot2dNW0 7KFKdpW/r873/GgoPmBXHAW8FrTbNj+Km894uhfpQIf40DkluoPbcx9NU5A/kmWKnCAK 8aXeQO/4mLZKxhLYLXP6oVE72T8ks9HoqZ77dutyKXvF2YHfTEO0jHI0Ru71luGWJOxI y6VNpxWrSK0v3SDb7YxYw/YFl/KOA/vXNAjPsgv++QEBabXP32r74/EywCuV0c0ZjASv Ucqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=HK9nGCQgsimstC2hIWRHEAkPVWQ3KTwx63WBWB9ZNNY=; b=WMVXJ7jp+KOKqnk0QqraqNzOOk6ZQBxmJwVKRwqHxu7pEYCjX/a/hW1fSJ/3LS2AHF An4reTD1EpJLsAW9zR/nx8D9lFVjpyNz9bPG7Yf66CLI0ENAjLjAqhuot35DpekOOdyV JJxFK5TuJvpVvXvDISdY/7nw43Q9XupxPx92xUIOmyDL6Z+r9+NhU44zHLCM9BAVnlMy G5Kd1nHCHt9twwrX6WueOsbkdHdOo+RLCEOdIb0mbDAeXcVlLHhWUFf6EPIiuCLIALK3 1oAfH0sB93hnbnTGmY/qK5vmP9X6CRXJVMYres/2LEE3ckuFH6G5+tMZ0IZ1mMUzyV2Z Zd3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11si9340618pgc.389.2017.06.10.09.23.10; Sat, 10 Jun 2017 09:23:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752111AbdFJQXJ (ORCPT + 1 other); Sat, 10 Jun 2017 12:23:09 -0400 Received: from mail-wr0-f170.google.com ([209.85.128.170]:35985 "EHLO mail-wr0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752070AbdFJQXI (ORCPT ); Sat, 10 Jun 2017 12:23:08 -0400 Received: by mail-wr0-f170.google.com with SMTP id v111so58814317wrc.3 for ; Sat, 10 Jun 2017 09:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HK9nGCQgsimstC2hIWRHEAkPVWQ3KTwx63WBWB9ZNNY=; b=Ckk5ySy90TqVCDvOsigExqfEwlMHsFuhMrOAgOLBe98Tla56zJZ4nSJVzkZUTcmlRK YDkHND/CywWCmvtr0+wTnu4cTbJJQ3AZTrzO4ezOv9GeKedF0IerzHwcfu3kK2bd5XgT waSH4TNSoPkv6wdfnMV+VZnr0P6xF6Fo+yLkI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HK9nGCQgsimstC2hIWRHEAkPVWQ3KTwx63WBWB9ZNNY=; b=M3OJGgurMh7Ihz/zsNr2Lwt8sVb6n6SM7t4rUQYkqtBIl6pWv6mVIISeEBHHPve+Im bF0slDvSu+4VdJJ9KZawqdCJmnm2nOGYn8xYJ/ziG/JRA27rgQ6lww4Ld8xHpB5M5BlT PlUCOAXYNqgGMtHyTaAjFo5rYLcTLa60x8ELKrH7ko3LVIA0mMmi66HuvP9vrCer0oLG lcucY9CmV/iKy9SCInY77qarhAztbGOXtubNRp8iQZesTCIbxAWY7m/xhb5AuGkFTPcc IkHfFiyY7yG4qKwTku35Un0IWbv1OWSD/WQMfkmiA6mLmSEiC0htwoS2Sud50IQJT4nm BTPA== X-Gm-Message-State: AKS2vOwtOsrl8DRhqTzGIKM1aF/5eLRbtcKlxzAoJrsO9WV5hiGE8qbq 9UPiUyxvw/pqwN7JCnJ4yA== X-Received: by 10.28.135.82 with SMTP id j79mr3299779wmd.10.1497111787044; Sat, 10 Jun 2017 09:23:07 -0700 (PDT) Received: from localhost.localdomain ([160.165.120.116]) by smtp.gmail.com with ESMTPSA id k35sm4440181wre.9.2017.06.10.09.23.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 10 Jun 2017 09:23:06 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, dave.martin@arm.com Cc: Ard Biesheuvel Subject: [PATCH 01/12] arm64: neon: replace generic definition of may_use_simd() Date: Sat, 10 Jun 2017 16:22:47 +0000 Message-Id: <1497111778-4210-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497111778-4210-1-git-send-email-ard.biesheuvel@linaro.org> References: <1497111778-4210-1-git-send-email-ard.biesheuvel@linaro.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org In preparation of modifying the logic that decides whether kernel mode NEON is allowable, which is required for SVE support, introduce an implementation of may_use_simd() that reflects the current reality, i.e., that SIMD is allowed in any context. Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/Kbuild | 1 - arch/arm64/include/asm/simd.h | 24 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild index a7a97a608033..3c469b557ee8 100644 --- a/arch/arm64/include/asm/Kbuild +++ b/arch/arm64/include/asm/Kbuild @@ -31,7 +31,6 @@ generic-y += sembuf.h generic-y += serial.h generic-y += set_memory.h generic-y += shmbuf.h -generic-y += simd.h generic-y += sizes.h generic-y += socket.h generic-y += sockios.h diff --git a/arch/arm64/include/asm/simd.h b/arch/arm64/include/asm/simd.h new file mode 100644 index 000000000000..f8aa7b3a0140 --- /dev/null +++ b/arch/arm64/include/asm/simd.h @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2017 Linaro Ltd. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#ifndef __ASM_SIMD_H +#define __ASM_SIMD_H + +#include +#include + +/* + * may_use_simd - whether it is allowable at this time to issue SIMD + * instructions or access the SIMD register file + */ +static __must_check inline bool may_use_simd(void) +{ + return true; +} + +#endif