diff mbox

[v2] Remove duplicate setting of the B field in tlbie

Message ID f706a4d0-40d5-2eaa-67d9-8fb02475ca4d@gmail.com
State Accepted
Headers show

Commit Message

Balbir Singh Sept. 16, 2016, 7:25 a.m. UTC
Remove duplicate setting of the the "B" field when doing a tlbie(l).
In compute_tlbie_rb(), the "B" field is set again just before
returning the rb value to be used for tlbie(l).

Signed-off-by: Balbir Singh <bsingharora@gmail.com>
---
Changelog - Leave the more readable version around

 arch/powerpc/include/asm/kvm_book3s_64.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Paul Mackerras Sept. 27, 2016, 5:46 a.m. UTC | #1
On Fri, Sep 16, 2016 at 05:25:50PM +1000, Balbir Singh wrote:
> 
> Remove duplicate setting of the the "B" field when doing a tlbie(l).
> In compute_tlbie_rb(), the "B" field is set again just before
> returning the rb value to be used for tlbie(l).
> 
> Signed-off-by: Balbir Singh <bsingharora@gmail.com>

Thanks, applied to kvm-ppc-next.

Paul.
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/kvm_book3s_64.h b/arch/powerpc/include/asm/kvm_book3s_64.h
index 88d17b4..aa7d4fd 100644
--- a/arch/powerpc/include/asm/kvm_book3s_64.h
+++ b/arch/powerpc/include/asm/kvm_book3s_64.h
@@ -159,7 +159,6 @@  static inline unsigned long compute_tlbie_rb(unsigned long v, unsigned long r,
 	/* This covers 14..54 bits of va*/
 	rb = (v & ~0x7fUL) << 16;		/* AVA field */
 
-	rb |= (v >> HPTE_V_SSIZE_SHIFT) << 8;	/*  B field */
 	/*
 	 * AVA in v had cleared lower 23 bits. We need to derive
 	 * that from pteg index
@@ -211,7 +210,7 @@  static inline unsigned long compute_tlbie_rb(unsigned long v, unsigned long r,
 		break;
 	}
 	}
-	rb |= (v >> 54) & 0x300;		/* B field */
+	rb |= (v >> HPTE_V_SSIZE_SHIFT) << 8;	/* B field */
 	return rb;
 }