diff options
author | Deng-Cheng Zhu <dengcheng.zhu@imgtec.com> | 2014-06-26 15:11:34 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-06-30 10:52:01 -0400 |
commit | d116e812f9026e3cca46ce1009e577afec62916d (patch) | |
tree | 2a8f60c6beb6c5489d777cb0e2b8a92cf42127b0 /arch/mips/include | |
parent | 85949977a5b499efca661fb80993693acbfac64d (diff) |
MIPS: KVM: Reformat code and comments
No logic changes inside.
Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/kvm_host.h | 10 | ||||
-rw-r--r-- | arch/mips/include/asm/r4kcache.h | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h index b0aa95565752..3f813f295134 100644 --- a/arch/mips/include/asm/kvm_host.h +++ b/arch/mips/include/asm/kvm_host.h | |||
@@ -359,13 +359,17 @@ enum emulation_result { | |||
359 | #define MIPS3_PG_FRAME 0x3fffffc0 | 359 | #define MIPS3_PG_FRAME 0x3fffffc0 |
360 | 360 | ||
361 | #define VPN2_MASK 0xffffe000 | 361 | #define VPN2_MASK 0xffffe000 |
362 | #define TLB_IS_GLOBAL(x) (((x).tlb_lo0 & MIPS3_PG_G) && \ | 362 | #define TLB_IS_GLOBAL(x) (((x).tlb_lo0 & MIPS3_PG_G) && \ |
363 | ((x).tlb_lo1 & MIPS3_PG_G)) | 363 | ((x).tlb_lo1 & MIPS3_PG_G)) |
364 | #define TLB_VPN2(x) ((x).tlb_hi & VPN2_MASK) | 364 | #define TLB_VPN2(x) ((x).tlb_hi & VPN2_MASK) |
365 | #define TLB_ASID(x) ((x).tlb_hi & ASID_MASK) | 365 | #define TLB_ASID(x) ((x).tlb_hi & ASID_MASK) |
366 | #define TLB_IS_VALID(x, va) (((va) & (1 << PAGE_SHIFT)) \ | 366 | #define TLB_IS_VALID(x, va) (((va) & (1 << PAGE_SHIFT)) \ |
367 | ? ((x).tlb_lo1 & MIPS3_PG_V) \ | 367 | ? ((x).tlb_lo1 & MIPS3_PG_V) \ |
368 | : ((x).tlb_lo0 & MIPS3_PG_V)) | 368 | : ((x).tlb_lo0 & MIPS3_PG_V)) |
369 | #define TLB_HI_VPN2_HIT(x, y) ((TLB_VPN2(x) & ~(x).tlb_mask) == \ | ||
370 | ((y) & VPN2_MASK & ~(x).tlb_mask)) | ||
371 | #define TLB_HI_ASID_HIT(x, y) (TLB_IS_GLOBAL(x) || \ | ||
372 | TLB_ASID(x) == ((y) & ASID_MASK)) | ||
369 | 373 | ||
370 | struct kvm_mips_tlb { | 374 | struct kvm_mips_tlb { |
371 | long tlb_mask; | 375 | long tlb_mask; |
diff --git a/arch/mips/include/asm/r4kcache.h b/arch/mips/include/asm/r4kcache.h index 0b8bd28a0df1..4520adc8699b 100644 --- a/arch/mips/include/asm/r4kcache.h +++ b/arch/mips/include/asm/r4kcache.h | |||
@@ -19,6 +19,9 @@ | |||
19 | #include <asm/mipsmtregs.h> | 19 | #include <asm/mipsmtregs.h> |
20 | #include <asm/uaccess.h> /* for segment_eq() */ | 20 | #include <asm/uaccess.h> /* for segment_eq() */ |
21 | 21 | ||
22 | extern void (*r4k_blast_dcache)(void); | ||
23 | extern void (*r4k_blast_icache)(void); | ||
24 | |||
22 | /* | 25 | /* |
23 | * This macro return a properly sign-extended address suitable as base address | 26 | * This macro return a properly sign-extended address suitable as base address |
24 | * for indexed cache operations. Two issues here: | 27 | * for indexed cache operations. Two issues here: |