From patchwork Wed Jan 13 07:08:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 59654 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3188012lbb; Tue, 12 Jan 2016 23:10:18 -0800 (PST) X-Received: by 10.98.67.14 with SMTP id q14mr40781102pfa.137.1452669018627; Tue, 12 Jan 2016 23:10:18 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id g7si16302pat.11.2016.01.12.23.10.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jan 2016 23:10:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@cavium-com.20150623.gappssmtp.com 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 1aJFY8-0005HX-Fb; Wed, 13 Jan 2016 07:08:56 +0000 Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aJFXy-0005CH-Oh for linux-arm-kernel@lists.infradead.org; Wed, 13 Jan 2016 07:08:47 +0000 Received: by mail-io0-x230.google.com with SMTP id 1so362348937ion.1 for ; Tue, 12 Jan 2016 23:08:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cavium-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nGPkFw4ISEW4zTbzK9dFyc2u6BhM9sNWEAKLAp6XHVs=; b=jfQYO8s2sm4BrWNWdPEoFjIbNj96NVwSflavDPw0ZLD48uBsJcLflOWVV7djgYf58Z va+G1Ib9iQPOlbWqK6hGuDYcm3aM+PzUlIXKMoRph5zBFv+/Jgpk4O/zKFNDGXRridlM o6fgBCXW0VoBbkanzW+fNf3uenZF9OYKX/71fA+Ivx4k4RrVIFxXgbD4ZL5/sfy4gECR B+KBeXgLxkFPmOomxtudJABCjh6UdBXxwgYemWml6x8+NvFrpYhIjj761F3x7bgh8wq2 keVz7VjAhB7rzC0K7FNSD26MTTi9IU38oRSzxH75BoRHW7U4+8dmN3hEWMzpLPUaS6Xi UkNQ== 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:in-reply-to :references; bh=nGPkFw4ISEW4zTbzK9dFyc2u6BhM9sNWEAKLAp6XHVs=; b=b9HSIPKPRxkOdZIGNEXMXkzmfd+5mw5UL0NDRxp+hLCU8uCNjInH+xMLELEJEm9iTM bkdxTyghhuZzZNjYj4AAcdMKmIdkKRzA1bk/4RDcuWIlXOhhI2rAYSAY/67LqJkDvmdJ w6MFeGk5vhqPK34S1QlzRdED1RES99fk/e3XqYMdDxgVEyetbG1APOGeyywfgs1YtMeJ w++6tv0dZL/HWnm251ztN80OmWD30Sg32WK96Nkd3Hozw0WCiVmxjZjFK7RZbbaAStcb 4fSuiEHJOiWZ0IBIM5UTlEtI9VIfBxXC5c7hdahs6qmZqHLvbblw8IVNTsgPAschlMgL 0R5A== X-Gm-Message-State: ALoCoQlHGthlpyvq1Zj+xG00EZcdy/YQhAZjMZbtkMlFikW9XOKctB0TlB17yuDOVQm0c5yNgGBgZjiOtXnpvPZJeD6DXbZMJA== X-Received: by 10.107.16.95 with SMTP id y92mr138571418ioi.194.1452668905839; Tue, 12 Jan 2016 23:08:25 -0800 (PST) Received: from localhost.localdomain ([64.2.3.194]) by smtp.gmail.com with ESMTPSA id ee9sm544417igb.7.2016.01.12.23.08.24 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 12 Jan 2016 23:08:25 -0800 (PST) Received: from localhost.localdomain (apinskidesktop [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3/Debian-9.4) with ESMTP id u0D78NEQ003618 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Tue, 12 Jan 2016 23:08:23 -0800 Received: (from apinski@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id u0D78NgY003617; Tue, 12 Jan 2016 23:08:23 -0800 From: Andrew Pinski To: pinskia@gmail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Will Deacon Subject: [PATCH 3/5] ARM64: Add Needs software prefetching cap Date: Tue, 12 Jan 2016 23:08:17 -0800 Message-Id: <1452668899-3553-4-git-send-email-apinski@cavium.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1452668899-3553-1-git-send-email-apinski@cavium.com> References: <1452668899-3553-1-git-send-email-apinski@cavium.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160112_230846_973293_1F483198 X-CRM114-Status: GOOD ( 13.42 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:4001:c06:0:0:0:230 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: Andrew Pinski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org On ThunderX T88 pass 1 and pass 2 does not include a hardware prefetching so the memory copying functions are slower than necessary. This adds a cpu feature for this. The next patch will add the use in both copy_page and copy_from_user/copy_to_user. Signed-off-by: Andrew Pinski --- arch/arm64/include/asm/cpufeature.h | 3 ++- arch/arm64/kernel/cpufeature.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletions(-) -- 1.7.2.5 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h index 92aaac6..784bc63 100644 --- a/arch/arm64/include/asm/cpufeature.h +++ b/arch/arm64/include/asm/cpufeature.h @@ -32,8 +32,9 @@ #define ARM64_WORKAROUND_CAVIUM_23154 6 #define ARM64_WORKAROUND_834220 7 #define ARM64_WORKAROUND_CAVIUM_27456 8 +#define ARM64_NEEDS_PREFETCH_128 9 -#define ARM64_NCAPS 9 +#define ARM64_NCAPS 10 #ifndef __ASSEMBLY__ diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index b0ee60e..13cda09 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -651,6 +651,12 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .min_field_value = 2, }, #endif /* CONFIG_AS_LSE && CONFIG_ARM64_LSE_ATOMICS */ + { + .desc = "Needs prefetching (128 byte cache line) for copying: ThunderX T88 pass 1.x and 2.x", + .capability = ARM64_NEEDS_PREFETCH_128, + MIDR_RANGE(MIDR_THUNDERX, 0, + (1 << MIDR_VARIANT_SHIFT) | MIDR_REVISION_MASK), + }, {}, };