From patchwork Wed Jan 7 05:52:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 5582531 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 F289DBF6C3 for ; Wed, 7 Jan 2015 06:03:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29EAA201BC for ; Wed, 7 Jan 2015 06:03:15 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 14151200F4 for ; Wed, 7 Jan 2015 06:03:14 +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 1Y8jfT-0007ce-Nv; Wed, 07 Jan 2015 06:00:31 +0000 Received: from mail-pa0-f42.google.com ([209.85.220.42]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y8jY0-0001CH-4P for linux-arm-kernel@lists.infradead.org; Wed, 07 Jan 2015 05:52:49 +0000 Received: by mail-pa0-f42.google.com with SMTP id et14so2678332pad.1 for ; Tue, 06 Jan 2015 21:52:25 -0800 (PST) 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=2Tzb+EvZ18ANPJYNPJAF1OPq0EduBEn57GoLVEQLc3s=; b=LHSDWlKL0yfLw+4gYlsP+i3N2N6wzLuM/JcqBeVMUIVk3Jno7JxV7Sgq0tswuVIDbF oHyM0LyHS+UbF+RXaG08NCK/MFYI/4/N0JyQ8iHq01Vd1YnTJEaQ5+4CYrWcz+VaMyDP bTqqOVEi4QTKu9Ojb4CqMTdDcFT6KLbYmbAWqhuyGIr+01Q4Hex9+/WkQ8ddQhM0fZhA CH65/bDpK/IFhNETxd4fByl/cGNf/JmAoMXk6E8N46iZBmTOv5L1vm9SpMJxw+88RbXW 6riszXunq6BGATNcgNpK+RVnX/5agzzjp1Shx/UIPQizrcsoe4Q7iXDvGKlt1kOhE39b D5Jg== X-Gm-Message-State: ALoCoQkh/GntrFiSTrqXDHU22FVezv5wMChEFqEJoUoP6ms8zGA76gxSycEk7lDJuB6kVyKkaAcW X-Received: by 10.68.224.101 with SMTP id rb5mr1969648pbc.67.1420609945537; Tue, 06 Jan 2015 21:52:25 -0800 (PST) Received: from localhost.localdomain ([180.150.157.4]) by mx.google.com with ESMTPSA id xl12sm592852pac.41.2015.01.06.21.52.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Jan 2015 21:52:25 -0800 (PST) From: Leo Yan To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon Subject: [PATCH] arm64: mm: support instruction SETEND Date: Wed, 7 Jan 2015 13:52:10 +0800 Message-Id: <1420609930-1689-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150106_215248_279176_18865AC7 X-CRM114-Status: UNSURE ( 9.52 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Xiaolong Ye , Leo Yan X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Currently kernel has set the bit SCTLR_EL1.SED, so the SETEND instruction will be treated as UNALLOCATED; this error can be reproduced when ARMv8 cpu runs with EL1/aarch64 and EL0/aarch32 mode, finally kernel will trap the exception if the userspace libs use SETEND instruction. So this patch clears bit SCTLR_EL1.SED to support SETEND instruction. Signed-off-by: Leo Yan Signed-off-by: Xiaolong Ye --- arch/arm64/mm/proc.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 4e778b1..66a7363 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -249,9 +249,9 @@ ENDPROC(__cpu_setup) * CE0 XWHW CZ ME TEEA S * .... .IEE .... NEAI TE.I ..AD DEN0 ACAM * 0011 0... 1101 ..0. ..0. 10.. .... .... < hardware reserved - * .... .1.. .... 01.1 11.1 ..01 0001 1101 < software settings + * .... .1.. .... 01.1 11.1 ..00 0001 1101 < software settings */ .type crval, #object crval: - .word 0x000802e2 // clear - .word 0x0405d11d // set + .word 0x000803e2 // clear + .word 0x0405d01d // set