From 3de0f5ea1929ff14e933d7448983bad9656af8e2 Mon Sep 17 00:00:00 2001 From: Balazs Gerofi Date: Fri, 10 Feb 2017 06:36:29 +0900 Subject: [PATCH] mcreboot-smp: introduction of ikc_map argument --- arch/x86/tools/mcreboot-smp-x86.sh.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/x86/tools/mcreboot-smp-x86.sh.in b/arch/x86/tools/mcreboot-smp-x86.sh.in index c72f4d41..f76b0b86 100644 --- a/arch/x86/tools/mcreboot-smp-x86.sh.in +++ b/arch/x86/tools/mcreboot-smp-x86.sh.in @@ -22,6 +22,7 @@ ENABLE_MCOVERLAYFS="@ENABLE_MCOVERLAYFS@" mem="512M@0" cpus="" +ikc_map="" if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then echo "You need at least bash-4.0 to run this script." >&2 @@ -41,7 +42,7 @@ fi turbo="" -while getopts :ti:k:c:m:o:f: OPT +while getopts :ti:k:c:m:o:f:r: OPT do case ${OPT} in f) facility=${OPTARG} @@ -78,6 +79,8 @@ do ;; m) mem=${OPTARG} ;; + r) ikc_map=${OPTARG} + ;; t) turbo="turbo" ;; *) echo "invalid option -${OPT}" >&2 @@ -370,6 +373,14 @@ if ! ${SBINDIR}/ihkosctl 0 assign cpu ${cpus}; then error_exit "os_created" fi +if [ "$ikc_map" != "" ]; then + # Specify IKC map + if ! ${SBINDIR}/ihkosctl 0 ikc_map ${ikc_map}; then + echo "error: assign CPUs" >&2 + error_exit "os_created" + fi +fi + # Assign memory if ! ${SBINDIR}/ihkosctl 0 assign mem ${mem}; then echo "error: assign memory" >&2