mcexec: --enable-hfi1 to runtime enable/disable HFI1 driver
Conflicts: executer/user/mcexec.c
This commit is contained in:
@ -221,6 +221,7 @@ static int mpol_no_stack = 0;
|
||||
static int mpol_no_bss = 0;
|
||||
static int mpol_shm_premap = 0;
|
||||
static int no_bind_ikc_map = 0;
|
||||
static int hfi1_enabled = 0;
|
||||
static unsigned long mpol_threshold = 0;
|
||||
static unsigned long heap_extension = (4*1024);
|
||||
static int profile = 0;
|
||||
@ -1753,6 +1754,12 @@ static struct option mcexec_options[] = {
|
||||
.flag = &disable_sched_yield,
|
||||
.val = 1,
|
||||
},
|
||||
{
|
||||
.name = "enable-hfi1",
|
||||
.has_arg = no_argument,
|
||||
.flag = &hfi1_enabled,
|
||||
.val = 1,
|
||||
},
|
||||
{
|
||||
.name = "extend-heap-by",
|
||||
.has_arg = required_argument,
|
||||
@ -2535,6 +2542,11 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
desc->mcexec_flags = 0;
|
||||
if (hfi1_enabled) {
|
||||
desc->mcexec_flags |= MCEXEC_HFI1;
|
||||
}
|
||||
|
||||
if (ioctl(fd, MCEXEC_UP_PREPARE_IMAGE, (unsigned long)desc) != 0) {
|
||||
perror("prepare");
|
||||
close(fd);
|
||||
|
||||
Reference in New Issue
Block a user