diff options
Diffstat (limited to 'arch/mips/include')
| -rw-r--r-- | arch/mips/include/asm/kvm_host.h | 12 | ||||
| -rw-r--r-- | arch/mips/include/asm/processor.h | 1 | ||||
| -rw-r--r-- | arch/mips/include/asm/r4kcache.h | 3 | ||||
| -rw-r--r-- | arch/mips/include/uapi/asm/unistd.h | 15 |
4 files changed, 21 insertions, 10 deletions
diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h index b0aa95565752..7a3fc67bd7f9 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; |
| @@ -760,7 +764,7 @@ extern int kvm_mips_trans_mtc0(uint32_t inst, uint32_t *opc, | |||
| 760 | struct kvm_vcpu *vcpu); | 764 | struct kvm_vcpu *vcpu); |
| 761 | 765 | ||
| 762 | /* Misc */ | 766 | /* Misc */ |
| 763 | extern int kvm_mips_dump_stats(struct kvm_vcpu *vcpu); | 767 | extern void kvm_mips_dump_stats(struct kvm_vcpu *vcpu); |
| 764 | extern unsigned long kvm_mips_get_ramsize(struct kvm *kvm); | 768 | extern unsigned long kvm_mips_get_ramsize(struct kvm *kvm); |
| 765 | 769 | ||
| 766 | 770 | ||
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index ad70cba8daff..d5098bc554f4 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h | |||
| @@ -367,6 +367,7 @@ unsigned long get_wchan(struct task_struct *p); | |||
| 367 | #define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status) | 367 | #define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status) |
| 368 | 368 | ||
| 369 | #define cpu_relax() barrier() | 369 | #define cpu_relax() barrier() |
| 370 | #define cpu_relax_lowlatency() cpu_relax() | ||
| 370 | 371 | ||
| 371 | /* | 372 | /* |
| 372 | * Return_address is a replacement for __builtin_return_address(count) | 373 | * Return_address is a replacement for __builtin_return_address(count) |
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: |
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h index 5805414777e0..9bc13eaf9d67 100644 --- a/arch/mips/include/uapi/asm/unistd.h +++ b/arch/mips/include/uapi/asm/unistd.h | |||
| @@ -372,16 +372,17 @@ | |||
| 372 | #define __NR_sched_setattr (__NR_Linux + 349) | 372 | #define __NR_sched_setattr (__NR_Linux + 349) |
| 373 | #define __NR_sched_getattr (__NR_Linux + 350) | 373 | #define __NR_sched_getattr (__NR_Linux + 350) |
| 374 | #define __NR_renameat2 (__NR_Linux + 351) | 374 | #define __NR_renameat2 (__NR_Linux + 351) |
| 375 | #define __NR_seccomp (__NR_Linux + 352) | ||
| 375 | 376 | ||
| 376 | /* | 377 | /* |
| 377 | * Offset of the last Linux o32 flavoured syscall | 378 | * Offset of the last Linux o32 flavoured syscall |
| 378 | */ | 379 | */ |
| 379 | #define __NR_Linux_syscalls 351 | 380 | #define __NR_Linux_syscalls 352 |
| 380 | 381 | ||
| 381 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 382 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
| 382 | 383 | ||
| 383 | #define __NR_O32_Linux 4000 | 384 | #define __NR_O32_Linux 4000 |
| 384 | #define __NR_O32_Linux_syscalls 351 | 385 | #define __NR_O32_Linux_syscalls 352 |
| 385 | 386 | ||
| 386 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 387 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
| 387 | 388 | ||
| @@ -701,16 +702,17 @@ | |||
| 701 | #define __NR_sched_setattr (__NR_Linux + 309) | 702 | #define __NR_sched_setattr (__NR_Linux + 309) |
| 702 | #define __NR_sched_getattr (__NR_Linux + 310) | 703 | #define __NR_sched_getattr (__NR_Linux + 310) |
| 703 | #define __NR_renameat2 (__NR_Linux + 311) | 704 | #define __NR_renameat2 (__NR_Linux + 311) |
| 705 | #define __NR_seccomp (__NR_Linux + 312) | ||
| 704 | 706 | ||
| 705 | /* | 707 | /* |
| 706 | * Offset of the last Linux 64-bit flavoured syscall | 708 | * Offset of the last Linux 64-bit flavoured syscall |
| 707 | */ | 709 | */ |
| 708 | #define __NR_Linux_syscalls 311 | 710 | #define __NR_Linux_syscalls 312 |
| 709 | 711 | ||
| 710 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 712 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
| 711 | 713 | ||
| 712 | #define __NR_64_Linux 5000 | 714 | #define __NR_64_Linux 5000 |
| 713 | #define __NR_64_Linux_syscalls 311 | 715 | #define __NR_64_Linux_syscalls 312 |
| 714 | 716 | ||
| 715 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 717 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
| 716 | 718 | ||
| @@ -1034,15 +1036,16 @@ | |||
| 1034 | #define __NR_sched_setattr (__NR_Linux + 313) | 1036 | #define __NR_sched_setattr (__NR_Linux + 313) |
| 1035 | #define __NR_sched_getattr (__NR_Linux + 314) | 1037 | #define __NR_sched_getattr (__NR_Linux + 314) |
| 1036 | #define __NR_renameat2 (__NR_Linux + 315) | 1038 | #define __NR_renameat2 (__NR_Linux + 315) |
| 1039 | #define __NR_seccomp (__NR_Linux + 316) | ||
| 1037 | 1040 | ||
| 1038 | /* | 1041 | /* |
| 1039 | * Offset of the last N32 flavoured syscall | 1042 | * Offset of the last N32 flavoured syscall |
| 1040 | */ | 1043 | */ |
| 1041 | #define __NR_Linux_syscalls 315 | 1044 | #define __NR_Linux_syscalls 316 |
| 1042 | 1045 | ||
| 1043 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 1046 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
| 1044 | 1047 | ||
| 1045 | #define __NR_N32_Linux 6000 | 1048 | #define __NR_N32_Linux 6000 |
| 1046 | #define __NR_N32_Linux_syscalls 315 | 1049 | #define __NR_N32_Linux_syscalls 316 |
| 1047 | 1050 | ||
| 1048 | #endif /* _UAPI_ASM_UNISTD_H */ | 1051 | #endif /* _UAPI_ASM_UNISTD_H */ |
