All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Alexandre Courbot <gnurou@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target-sh4: update PTEH upon MMU exception
Date: Tue, 25 Jan 2011 09:05:10 +0100	[thread overview]
Message-ID: <20110125080510.GD23331@hall.aurel32.net> (raw)
In-Reply-To: <1295931077-29499-2-git-send-email-gnurou@gmail.com>

On Tue, Jan 25, 2011 at 01:51:17PM +0900, Alexandre Courbot wrote:
> Update the PTEH register to contain the VPN at which an MMU
> exception occured as specified by the SH4 reference.
> ---
>  target-sh4/helper.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/target-sh4/helper.c b/target-sh4/helper.c
> index 2d76f22..c34d2f5 100644
> --- a/target-sh4/helper.c
> +++ b/target-sh4/helper.c
> @@ -453,6 +453,9 @@ int cpu_sh4_handle_mmu_fault(CPUState * env, target_ulong address, int rw,
>  
>      if (ret != MMU_OK) {
>  	env->tea = address;
> +	if (ret != MMU_DTLB_MULTIPLE && ret != MMU_ITLB_MULTIPLE)
> +	    env->pteh = (env->pteh & PTEH_ASID_MASK) |
> +		    (address & PTEH_VPN_MASK);

The code in itself is correct, however you should follow CODING_STYLE
and write the if the following way:

    if () {
    }

>  	switch (ret) {
>  	case MMU_ITLB_MISS:
>  	case MMU_DTLB_MISS_READ:
> -- 
> 1.7.3.5
> 
> 
> 

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2011-01-25  8:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25  4:51 [Qemu-devel] [PATCH] target-sh4: fix index of address read error exception Alexandre Courbot
2011-01-25  4:51 ` [Qemu-devel] [PATCH] target-sh4: update PTEH upon MMU exception Alexandre Courbot
2011-01-25  8:05   ` Aurelien Jarno [this message]
2011-01-26  2:57     ` [Qemu-devel] [PATCH v2] " Alexandre Courbot
2011-01-26 13:31       ` Aurelien Jarno
2011-01-25  8:03 ` [Qemu-devel] [PATCH] target-sh4: fix index of address read error exception Aurelien Jarno

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=20110125080510.GD23331@hall.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=gnurou@gmail.com \
    --cc=qemu-devel@nongnu.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.