File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -1922,14 +1922,22 @@ static int kvmppc_handle_exit_hv(struct kvm_vcpu *vcpu,
1922
1922
1923
1923
r = EMULATE_FAIL ;
1924
1924
if (cpu_has_feature (CPU_FTR_ARCH_300 )) {
1925
- if (cause == FSCR_MSGP_LG )
1925
+ switch (cause ) {
1926
+ case FSCR_MSGP_LG :
1926
1927
r = kvmppc_emulate_doorbell_instr (vcpu );
1927
- if (cause == FSCR_PM_LG )
1928
+ break ;
1929
+ case FSCR_PM_LG :
1928
1930
r = kvmppc_pmu_unavailable (vcpu );
1929
- if (cause == FSCR_EBB_LG )
1931
+ break ;
1932
+ case FSCR_EBB_LG :
1930
1933
r = kvmppc_ebb_unavailable (vcpu );
1931
- if (cause == FSCR_TM_LG )
1934
+ break ;
1935
+ case FSCR_TM_LG :
1932
1936
r = kvmppc_tm_unavailable (vcpu );
1937
+ break ;
1938
+ default :
1939
+ break ;
1940
+ }
1933
1941
}
1934
1942
if (r == EMULATE_FAIL ) {
1935
1943
kvmppc_core_queue_program (vcpu , SRR1_PROGILL |
@@ -4049,7 +4057,6 @@ static noinline void kvmppc_run_core(struct kvmppc_vcore *vc)
4049
4057
/* Return to whole-core mode if we split the core earlier */
4050
4058
if (cmd_bit ) {
4051
4059
unsigned long hid0 = mfspr (SPRN_HID0 );
4052
- unsigned long loops = 0 ;
4053
4060
4054
4061
hid0 &= ~HID0_POWER8_DYNLPARDIS ;
4055
4062
stat_bit = HID0_POWER8_2LPARMODE | HID0_POWER8_4LPARMODE ;
@@ -4061,7 +4068,6 @@ static noinline void kvmppc_run_core(struct kvmppc_vcore *vc)
4061
4068
if (!(hid0 & stat_bit ))
4062
4069
break ;
4063
4070
cpu_relax ();
4064
- ++ loops ;
4065
4071
}
4066
4072
split_info .do_nap = 0 ;
4067
4073
}
You can’t perform that action at this time.
0 commit comments