diff mbox

TBL register permissions for PPC

Message ID 4aa8564b1003251731o2e0dc66ci603cefa86d70d87@mail.gmail.com
State New
Headers show

Commit Message

Dmitry Ilyevsky March 26, 2010, 12:31 a.m. UTC
On Thu, Mar 25, 2010 at 10:53 AM, Alexander Graf <agraf@suse.de> wrote:
>
> On 24.03.2010, at 22:56, Dmitry Ilyevsky wrote:
>
>>
>> Hello All,
>>
>> Please review patch for TBL SPR read access for generic PPC.
>>
>> Description:
>>
>> POWER specification docs define TBL/TBU SPRs as readable in user and privileged modes. Therefore SPRs permissions were changed in gen_tbl function in target-ppc/translate_init.c file.
>>
>> Testing:
>>
>> Tested with vxworks-6.2 bsp and OS on custom qemu board that includes ppc405 emulated core
>
> A couple of comments to this patch.
>
> 1) Please don't top-post.
> 2) Always put a Signed-off-by: in the patch
> 3) Put the patch description into the patch, so git knows what to do with it
> 4) Don't use html features in mail :-)
>
> The patch looks good otherwise.
>
>
> Alex
>
>

Corrected.

Thanks,
Dmitry I.

Comments

Alexander Graf March 26, 2010, 1:15 a.m. UTC | #1
On 26.03.2010, at 01:31, Dmitry Ilyevsky wrote:

> On Thu, Mar 25, 2010 at 10:53 AM, Alexander Graf <agraf@suse.de> wrote:
>> 
>> On 24.03.2010, at 22:56, Dmitry Ilyevsky wrote:
>> 
>>> 
>>> Hello All,
>>> 
>>> Please review patch for TBL SPR read access for generic PPC.
>>> 
>>> Description:
>>> 
>>> POWER specification docs define TBL/TBU SPRs as readable in user and privileged modes. Therefore SPRs permissions were changed in gen_tbl function in target-ppc/translate_init.c file.
>>> 
>>> Testing:
>>> 
>>> Tested with vxworks-6.2 bsp and OS on custom qemu board that includes ppc405 emulated core
>> 
>> A couple of comments to this patch.
>> 
>> 1) Please don't top-post.
>> 2) Always put a Signed-off-by: in the patch
>> 3) Put the patch description into the patch, so git knows what to do with it
>> 4) Don't use html features in mail :-)
>> 
>> The patch looks good otherwise.
>> 
>> 
>> Alex
>> 
>> 
> 
> Corrected.
> 
> Thanks,
> Dmitry I.
> <0001-Generic-PowerPC-TBL.patch>

Acked-by: Alexander Graf <agraf@suse.de>
Aurelien Jarno March 26, 2010, 10:42 p.m. UTC | #2
On Fri, Mar 26, 2010 at 03:31:25AM +0300, Dmitry Ilyevsky wrote:
> On Thu, Mar 25, 2010 at 10:53 AM, Alexander Graf <agraf@suse.de> wrote:
> >
> > On 24.03.2010, at 22:56, Dmitry Ilyevsky wrote:
> >
> >>
> >> Hello All,
> >>
> >> Please review patch for TBL SPR read access for generic PPC.
> >>
> >> Description:
> >>
> >> POWER specification docs define TBL/TBU SPRs as readable in user and privileged modes. Therefore SPRs permissions were changed in gen_tbl function in target-ppc/translate_init.c file.
> >>
> >> Testing:
> >>
> >> Tested with vxworks-6.2 bsp and OS on custom qemu board that includes ppc405 emulated core
> >
> > A couple of comments to this patch.
> >
> > 1) Please don't top-post.
> > 2) Always put a Signed-off-by: in the patch
> > 3) Put the patch description into the patch, so git knows what to do with it
> > 4) Don't use html features in mail :-)
> >
> > The patch looks good otherwise.
> >
> >
> > Alex
> >
> >
> 
> Corrected.
> 
> Thanks,
> Dmitry I.

Thanks, applied.

> From b5846b7df136c1eff7df8dada8800c81e1799cf4 Mon Sep 17 00:00:00 2001
> From: Dmitry Ilyevsky <ilyevsky@gmail.com>
> Date: Fri, 26 Mar 2010 03:25:36 +0300
> Subject: Generic PowerPC TBL
> 
> Time base SPRs TBL/TBU should be accessible in user/priv modes for reading as specified in POWER ISA documentation. Therefore SPRs permissions were changed in gen_tbl function.
> 
> Signed-off-by: Dmitry Ilyevsky <ilyevsky@gmail.com>
> ---
>  target-ppc/translate_init.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index db4dc17..e8eadf4 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
> @@ -777,16 +777,16 @@ static void gen_tbl (CPUPPCState *env)
>                   &spr_read_tbl, SPR_NOACCESS,
>                   0x00000000);
>      spr_register(env, SPR_TBL,   "TBL",
> -                 SPR_NOACCESS, SPR_NOACCESS,
> -                 SPR_NOACCESS, &spr_write_tbl,
> +                 &spr_read_tbl, SPR_NOACCESS,
> +                 &spr_read_tbl, &spr_write_tbl,
>                   0x00000000);
>      spr_register(env, SPR_VTBU,  "TBU",
>                   &spr_read_tbu, SPR_NOACCESS,
>                   &spr_read_tbu, SPR_NOACCESS,
>                   0x00000000);
>      spr_register(env, SPR_TBU,   "TBU",
> -                 SPR_NOACCESS, SPR_NOACCESS,
> -                 SPR_NOACCESS, &spr_write_tbu,
> +                 &spr_read_tbu, SPR_NOACCESS,
> +                 &spr_read_tbu, &spr_write_tbu,
>                   0x00000000);
>  }
>  
> -- 
> 1.7.0
>
diff mbox

Patch

From b5846b7df136c1eff7df8dada8800c81e1799cf4 Mon Sep 17 00:00:00 2001
From: Dmitry Ilyevsky <ilyevsky@gmail.com>
Date: Fri, 26 Mar 2010 03:25:36 +0300
Subject: Generic PowerPC TBL

Time base SPRs TBL/TBU should be accessible in user/priv modes for reading as specified in POWER ISA documentation. Therefore SPRs permissions were changed in gen_tbl function.

Signed-off-by: Dmitry Ilyevsky <ilyevsky@gmail.com>
---
 target-ppc/translate_init.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index db4dc17..e8eadf4 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -777,16 +777,16 @@  static void gen_tbl (CPUPPCState *env)
                  &spr_read_tbl, SPR_NOACCESS,
                  0x00000000);
     spr_register(env, SPR_TBL,   "TBL",
-                 SPR_NOACCESS, SPR_NOACCESS,
-                 SPR_NOACCESS, &spr_write_tbl,
+                 &spr_read_tbl, SPR_NOACCESS,
+                 &spr_read_tbl, &spr_write_tbl,
                  0x00000000);
     spr_register(env, SPR_VTBU,  "TBU",
                  &spr_read_tbu, SPR_NOACCESS,
                  &spr_read_tbu, SPR_NOACCESS,
                  0x00000000);
     spr_register(env, SPR_TBU,   "TBU",
-                 SPR_NOACCESS, SPR_NOACCESS,
-                 SPR_NOACCESS, &spr_write_tbu,
+                 &spr_read_tbu, SPR_NOACCESS,
+                 &spr_read_tbu, &spr_write_tbu,
                  0x00000000);
 }
 
-- 
1.7.0