0001
0002
0003
0004
0005
0006
0007
0008
0009 #undef DEBUG
0010
0011 #include <linux/types.h>
0012 #include <linux/compiler.h>
0013 #include <asm/paca.h>
0014 #include <asm/hmi.h>
0015 #include <asm/processor.h>
0016
0017 void wait_for_subcore_guest_exit(void)
0018 {
0019 int i;
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 if (!local_paca->sibling_subcore_state)
0035 return;
0036
0037 for (i = 0; i < MAX_SUBCORE_PER_CORE; i++)
0038 while (local_paca->sibling_subcore_state->in_guest[i])
0039 cpu_relax();
0040 }
0041
0042 void wait_for_tb_resync(void)
0043 {
0044 if (!local_paca->sibling_subcore_state)
0045 return;
0046
0047 while (test_bit(CORE_TB_RESYNC_REQ_BIT,
0048 &local_paca->sibling_subcore_state->flags))
0049 cpu_relax();
0050 }