Skip to contentSkip to conversation

target-ppc: remove useless line

PATCH Applied Thomas Monjalon 4 participants 6 messages May 28, 2010 – May 31, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-ppc: remove useless line

From: Thomas Monjalon <[email protected]>

This line was a bit clear.
The next lines set or reset this bit (LE) depending of another bit (ILE). So the first line is useless.

---
 target-ppc/helper.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
target-ppc/helper.c +0 -1
index 3d843b5..dabf1fd 100644
@@ -2591,7 +2591,6 @@ static inline void powerpc_excp(CPUState *env, int excp_model, int excp)
 #if 0 /* Fix this: not on all targets */
     new_msr &= ~((target_ulong)1 << MSR_PMM);
 #endif
-    new_msr &= ~((target_ulong)1 << MSR_LE);
     if (msr_ile)
         new_msr |= (target_ulong)1 << MSR_LE;
     else
Signature · 1 line
1.7.1
Reviewed-by on v1 1/1
#1 lore raw

Am 28.05.2010 um 21:00 schrieb Thomas Monjalon:

Quoted 23 lines

From: Thomas Monjalon <[email protected]>

This line was a bit clear.
The next lines set or reset this bit (LE) depending of another bit (ILE). So the first line is useless.

---
target-ppc/helper.c | 1 -

1 files changed, 0 insertions(+), 1 deletions(-)
target-ppc/helper.c +0 -1
index 3d843b5..dabf1fd 100644
@@ -2591,7 +2591,6 @@ static inline void powerpc_excp(CPUState *env,  
 int excp_model, int excp)
 #if 0 /* Fix this: not on all targets */
    new_msr &= ~((target_ulong)1 << MSR_PMM);
 #endif
-    new_msr &= ~((target_ulong)1 << MSR_LE);
    if (msr_ile)
        new_msr |= (target_ulong)1 << MSR_LE;
Quoted 1 line

else

Following line is

        new_msr &= ~((target_ulong)1 << MSR_LE);

so this should be fine.

Andreas

#2 lore raw
Quoted 27 lines · Andreas Färber

Am 28.05.2010 um 21:00 schrieb Thomas Monjalon:

Quoted 16 lines

From: Thomas Monjalon <[email protected]>

This line was a bit clear.
The next lines set or reset this bit (LE) depending of another bit (ILE). So the first line is useless.

---
target-ppc/helper.c | 1 -

1 files changed, 0 insertions(+), 1 deletions(-)
target-ppc/helper.c +0 -0
index 3d843b5..dabf1fd 100644

target-ppc/helper.c static inline void powerpc_excp(CPUState *env, int excp_model, int excp) · line 2596

Quoted 7 lines
target-ppc/helper.c +0 -1
@@ -2591,7 +2591,6 @@ static inline void powerpc_excp(CPUState *env, int excp_model, int excp)
 #if 0 /* Fix this: not on all targets */
   new_msr &= ~((target_ulong)1 << MSR_PMM);
 #endif
-    new_msr &= ~((target_ulong)1 << MSR_LE);
   if (msr_ile)
       new_msr |= (target_ulong)1 << MSR_LE;
   else

Following line is

Quoted 4 lines
       new_msr &= ~((target_ulong)1 << MSR_LE);

so this should be fine.

Thomas, have you verified that it still boots a ppc64 guest?

Alex

#3 lore raw
Quoted 1 line · Alexander Graf

Thomas, have you verified that it still boots a ppc64 guest?

No, but I don't see any specific link between ppc64 and this change.

This is the current (pseudo)code:

    LE = 0
    if ILE == 1
        LE = 1
    else
        LE = 0

In all cases, LE will be overwritten after the first line.

I cannot see any justification to keep the first line.

Signature · 1 line
Thomas
#4 lore raw
Quoted 8 lines · Thomas Monjalon
Quoted 2 lines · Alexander Graf

Thomas, have you verified that it still boots a ppc64 guest?

No, but I don't see any specific link between ppc64 and this change.

This is the current (pseudo)code:

Quoted 9 lines
    LE = 0
    if ILE == 1
        LE = 1
    else
        LE = 0

In all cases, LE will be overwritten after the first line.

I cannot see any justification to keep the first line.

I agree.

Alex

#5 lore raw
In reply to Thomas Monjalon
Quoted 5 lines · Thomas Monjalon

From: Thomas Monjalon <[email protected]>

This line was a bit clear.
The next lines set or reset this bit (LE) depending of another bit (ILE). So the first line is useless.

Thanks, applied.

Quoted 24 lines
---
 target-ppc/helper.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
target-ppc/helper.c +0 -1
index 3d843b5..dabf1fd 100644
@@ -2591,7 +2591,6 @@ static inline void powerpc_excp(CPUState *env, int excp_model, int excp)
 #if 0 /* Fix this: not on all targets */
     new_msr &= ~((target_ulong)1 << MSR_PMM);
 #endif
-    new_msr &= ~((target_ulong)1 << MSR_LE);
     if (msr_ile)
         new_msr |= (target_ulong)1 << MSR_LE;
     else
Signature · 1 line
1.7.1
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net