All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: openrisc@lists.librecores.org
Subject: [OpenRISC] [PATCH v2 9/9] openrisc: include l.swa in check for write data pagefault
Date: Mon, 14 Nov 2016 22:30:39 +0900	[thread overview]
Message-ID: <a9fae5563e34217ff99efafde7e7bf607a5d5ec6.1479128947.git.shorne@gmail.com> (raw)
In-Reply-To: <1479130239-30707-1-git-send-email-shorne@gmail.com>

From: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>

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 <stefan.kristiansson@saunalahti.fi>
[shorne at gmail.com: expanded a bit on the comment]

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 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



WARNING: multiple messages have this Message-ID (diff)
From: Stafford Horne <shorne@gmail.com>
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	[thread overview]
Message-ID: <a9fae5563e34217ff99efafde7e7bf607a5d5ec6.1479128947.git.shorne@gmail.com> (raw)
In-Reply-To: <1479130239-30707-1-git-send-email-shorne@gmail.com>
In-Reply-To: <cover.1479128947.git.shorne@gmail.com>

From: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>

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 <stefan.kristiansson@saunalahti.fi>
[shorne@gmail.com: expanded a bit on the comment]

Signed-off-by: Stafford Horne <shorne@gmail.com>
---
 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

  parent reply	other threads:[~2016-11-14 13:30 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1479128947.git.shorne@gmail.com>
2016-11-14 13:30 ` [OpenRISC] [PATCH v2 0/9] openrisc: Misc fixes from backlog Stafford Horne
2016-11-14 13:30   ` Stafford Horne
2016-11-14 13:30   ` [OpenRISC] [PATCH v2 1/9] openrisc: fix PTRS_PER_PGD define Stafford Horne
2016-11-14 13:30     ` Stafford Horne
2016-11-14 13:30   ` [OpenRISC] [PATCH v2 2/9] openrisc: restore all regs on rt_sigreturn Stafford Horne
2016-11-14 13:30     ` Stafford Horne
2016-11-14 13:30   ` [OpenRISC] [PATCH v2 3/9] openrisc: Add thread-local storage (TLS) support Stafford Horne
2016-11-14 13:30     ` Stafford Horne
2016-11-14 13:30   ` [OpenRISC] [PATCH v2 4/9] openrisc: Support both old (or32) and new (or1k) toolchain Stafford Horne
2016-11-14 13:30     ` Stafford Horne
2016-11-14 13:30   ` [OpenRISC] [PATCH v2 5/9] openrisc: add NR_CPUS Kconfig default value Stafford Horne
2016-11-14 13:30     ` Stafford Horne
2016-11-14 13:30   ` [OpenRISC] [PATCH v2 6/9] openrisc: remove the redundant of_platform_populate Stafford Horne
2016-11-14 13:30     ` Stafford Horne
2016-11-14 13:30   ` [OpenRISC] [PATCH v2 7/9] openrisc: Consolidate setup to use memblock instead of bootmem Stafford Horne
2016-11-14 13:30     ` Stafford Horne
2016-11-14 13:30   ` [OpenRISC] [PATCH v2 8/9] openrisc: Updates after openrisc.net has been lost Stafford Horne
2016-11-14 13:30     ` Stafford Horne
2016-11-16  7:13     ` [OpenRISC] " Olof Kindgren
2016-11-16  7:13       ` Olof Kindgren
2016-12-14  8:57     ` Geert Uytterhoeven
2016-12-14  8:57       ` Geert Uytterhoeven
2016-12-14 11:44       ` [OpenRISC] " Stafford Horne
2016-12-14 11:44         ` Stafford Horne
2016-11-14 13:30   ` Stafford Horne [this message]
2016-11-14 13:30     ` [PATCH v2 9/9] openrisc: include l.swa in check for write data pagefault Stafford Horne
2016-11-30  1:23   ` [OpenRISC] [PATCH v2 0/9] openrisc: Misc fixes from backlog Guenter Roeck
2016-11-30  1:23     ` Guenter Roeck
2016-11-30 12:40     ` [OpenRISC] " Stafford Horne
2016-11-30 12:40       ` Stafford Horne
2016-11-30 14:21       ` [OpenRISC] " Guenter Roeck
2016-11-30 14:21         ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a9fae5563e34217ff99efafde7e7bf607a5d5ec6.1479128947.git.shorne@gmail.com \
    --to=shorne@gmail.com \
    --cc=openrisc@lists.librecores.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.