linux-mips
[Top] [All Lists]

Re: [PATCH] mips: fix execution hazard during watchpoint register probe

To: Paul Burton <paul.burton@imgtec.com>
Subject: Re: [PATCH] mips: fix execution hazard during watchpoint register probe
From: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 18 Jun 2013 16:42:53 +0200
Cc: linux-mips@linux-mips.org, Chris Dearman <chris.dearman@imgtec.com>
In-reply-to: <1371314080-48198-1-git-send-email-paul.burton@imgtec.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1371314080-48198-1-git-send-email-paul.burton@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
On Sat, Jun 15, 2013 at 05:34:40PM +0100, Paul Burton wrote:

> Writing a value to a WatchLo* register creates an execution hazard, so
> if its value is then read before that hazard is cleared then said value
> may be invalid. The mips_probe_watch_registers function must therefore
> clear the execution hazard between setting the match bits in a WatchLo*
> register & reading the register back in order to check which are set.
> 
> This fixes intermittent incorrect watchpoint register probing on some
> MIPS cores such as interAptiv & proAptiv.

Obviously correct.  Did somebody once have a tool to test for this kind
of back-to-back cp0 issues?

  Ralf

<Prev in Thread] Current Thread [Next in Thread>