ihk_ikc_recv: Record channel to packet for release

ihk_ikc_release_packet takes the channel and puts the packet into its
free-list.  This fix makes it easy and safe to identify the proper
channel.

Change-Id: I5584b1e8a3ed675c2f9d68f0b5ed331b909197f6
Fujitsu: POSTK_DEBUG_TEMP_FIX_89
This commit is contained in:
Masamichi Takagi
2018-10-19 18:07:26 +09:00
committed by Dominique Martinet
parent 10dc87dd3f
commit ae9a1f39df
7 changed files with 20 additions and 52 deletions

View File

@@ -779,7 +779,7 @@ static int syscall_packet_handler(struct ihk_ikc_channel_desc *c,
}
ihk_ikc_release_packet((struct ihk_ikc_free_packet *)packet, c);
ihk_ikc_release_packet((struct ihk_ikc_free_packet *)packet);
return ret;
}
@@ -787,7 +787,7 @@ static int dummy_packet_handler(struct ihk_ikc_channel_desc *c,
void *__packet, void *__os)
{
struct ikc_scd_packet *packet = __packet;
ihk_ikc_release_packet((struct ihk_ikc_free_packet *)packet, c);
ihk_ikc_release_packet((struct ihk_ikc_free_packet *)packet);
return 0;
}

View File

@@ -17,6 +17,7 @@
#include <ihk/atomic.h>
#include <ihk/context.h>
#include <ihk/memconst.h>
#include <ihk/ikc.h>
#include <rlimit.h>
#include <time.h>
@@ -242,6 +243,7 @@ enum mcctrl_os_cpu_operation {
};
struct ikc_scd_packet {
struct ihk_ikc_packet_header header;
int msg;
int err;
void *reply;
@@ -286,7 +288,7 @@ struct ikc_scd_packet {
int *spin_sleep; /* 1: waiting in linux_wait_event() 0: woken up by someone else */
} futex;
};
char padding[8];
/* char padding[8]; */ /* We want the size to be 128 bytes */
};
#define IHK_SCD_REQ_THREAD_SPINNING 0