diff mbox

[12/13] KVM: arm: avoid binary number literals for gcc-4.2

Message ID 20161216105634.235457-13-arnd@arndb.de (mailing list archive)
State New, archived
Headers show

Commit Message

Arnd Bergmann Dec. 16, 2016, 10:56 a.m. UTC
Old gcc versions prior to 4.3 don't understand the 0b... syntax for
numbers, and this seems to be the only instance in the kernel, so better
use hexadecimal instead.

arch/arm/include/asm/kvm_mmu.h:127:38: error: invalid suffix "b101" on integer constant

Fixes: 159793001d7d ("ARM: KVM: force cache clean on page fault when caches are off")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/include/asm/kvm_mmu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoffer Dall Jan. 4, 2017, 10:39 a.m. UTC | #1
On Fri, Dec 16, 2016 at 11:56:33AM +0100, Arnd Bergmann wrote:
> Old gcc versions prior to 4.3 don't understand the 0b... syntax for
> numbers, and this seems to be the only instance in the kernel, so better
> use hexadecimal instead.
> 
> arch/arm/include/asm/kvm_mmu.h:127:38: error: invalid suffix "b101" on integer constant
> 
> Fixes: 159793001d7d ("ARM: KVM: force cache clean on page fault when caches are off")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Same as before:
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" 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/arm/include/asm/kvm_mmu.h b/arch/arm/include/asm/kvm_mmu.h
index 74a44727f8e1..61121300174f 100644
--- a/arch/arm/include/asm/kvm_mmu.h
+++ b/arch/arm/include/asm/kvm_mmu.h
@@ -124,7 +124,7 @@  struct kvm;
 
 static inline bool vcpu_has_cache_enabled(struct kvm_vcpu *vcpu)
 {
-	return (vcpu_cp15(vcpu, c1_SCTLR) & 0b101) == 0b101;
+	return (vcpu_cp15(vcpu, c1_SCTLR) & 0x5) == 0x5;
 }
 
 static inline void __coherent_cache_guest_page(struct kvm_vcpu *vcpu,