From: Michal Simek Date: Tue, 9 Sep 2014 07:43:50 +0000 (+0200) Subject: zynqmp: Do not run Linux SMP on more then 2 cpus on QEMU X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bfcda714d8724ed21bfee4e6553f4cc6025acbfc;p=thirdparty%2Fu-boot.git zynqmp: Do not run Linux SMP on more then 2 cpus on QEMU Limit number of cpus in the kernel running on QEMU to 2 to ensure that stalls are not reported by the kernel. ZynqMP QEMU is single-threaded and it runs the VCPUs in round-robin. It takes longer between the CPUs get to run when more VCPUs are used. Signed-off-by: Michal Simek --- diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 293642058f4..d80457e1d7a 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -93,9 +93,14 @@ int board_mmc_init(bd_t *bd) } #endif +#ifndef CONFIG_LINUX_CMDLINE_SIZE +# define CONFIG_LINUX_CMDLINE_SIZE 120 +#endif + int board_late_init(void) { u32 reg = 0; + char args[CONFIG_LINUX_CMDLINE_SIZE]; u8 bootmode; u32 ver = zynqmp_get_silicon_version(); @@ -107,6 +112,10 @@ int board_late_init(void) break; case ZYNQMP_CSU_VERSION_QEMU: default: + strcpy(args, getenv("bootargs")); + strncat(args, " maxcpus=2", CONFIG_LINUX_CMDLINE_SIZE); + setenv("bootargs", args); + setenv("serverip", "10.0.2.2"); setenv("ipaddr", "10.0.2.15"); }