Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932194AbcKNNfq (ORCPT ); Mon, 14 Nov 2016 08:35:46 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:36188 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751512AbcKNNdE (ORCPT ); Mon, 14 Nov 2016 08:33:04 -0500 From: Stafford Horne To: stefan.kristiansson@saunalahti.fi, shorne@gmail.com, jonas@southpole.se Cc: linux@roeck-us.net, blue@cmd.nu, robh@kernel.org, linux-kernel@vger.kernel.org, openrisc@lists.librecores.org Subject: [PATCH v2 9/9] openrisc: include l.swa in check for write data pagefault Date: Mon, 14 Nov 2016 22:30:39 +0900 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479130239-30707-1-git-send-email-shorne@gmail.com> References: <1479130239-30707-1-git-send-email-shorne@gmail.com> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1147 Lines: 33 From: Stefan Kristiansson During page fault handling we check the last instruction to understand if the fault was for a read or for a write. By default we fall back to read. New instructions were added to the openrisc 1.1 spec for an atomic load/store pair (l.lwa/l.swa). This patch adds the opcode for l.swa (0x33) allowing it to be treated as a write operation. Signed-off-by: Stefan Kristiansson [shorne@gmail.com: expanded a bit on the comment] Signed-off-by: Stafford Horne --- arch/openrisc/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/openrisc/kernel/entry.S b/arch/openrisc/kernel/entry.S index 572d223..aac0bde 100644 --- a/arch/openrisc/kernel/entry.S +++ b/arch/openrisc/kernel/entry.S @@ -264,7 +264,7 @@ EXCEPTION_ENTRY(_data_page_fault_handler) l.srli r6,r6,26 // check opcode for write access #endif - l.sfgeui r6,0x34 // check opcode for write access + l.sfgeui r6,0x33 // check opcode for write access l.bnf 1f l.sfleui r6,0x37 l.bnf 1f -- 2.7.4