diff options
author | Dave Airlie <airlied@redhat.com> | 2012-05-07 16:09:09 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-07 16:09:35 +0100 |
commit | 4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd (patch) | |
tree | 33c02b5e18e79756005a3edfa7c862a47de668d5 /arch/x86/xen/smp.c | |
parent | 4086b1e2b19729eebf632073b9d4ab811726d8eb (diff) | |
parent | dc257cf154be708ecc47b8b89c12ad8cd2cc35e4 (diff) | |
download | blackbird-op-linux-4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd.tar.gz blackbird-op-linux-4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd.zip |
Merge branch 'for-airlied' of git://people.freedesktop.org/~danvet/drm-intel into drm-core-next
Daniel prepared this branch with a back-merge as git was getting
very confused about changes in intel_display.c
Diffstat (limited to 'arch/x86/xen/smp.c')
-rw-r--r-- | arch/x86/xen/smp.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index 5fac6919b957..0503c0c493a9 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c @@ -178,6 +178,7 @@ static void __init xen_fill_possible_map(void) static void __init xen_filter_cpu_maps(void) { int i, rc; + unsigned int subtract = 0; if (!xen_initial_domain()) return; @@ -192,8 +193,22 @@ static void __init xen_filter_cpu_maps(void) } else { set_cpu_possible(i, false); set_cpu_present(i, false); + subtract++; } } +#ifdef CONFIG_HOTPLUG_CPU + /* This is akin to using 'nr_cpus' on the Linux command line. + * Which is OK as when we use 'dom0_max_vcpus=X' we can only + * have up to X, while nr_cpu_ids is greater than X. This + * normally is not a problem, except when CPU hotplugging + * is involved and then there might be more than X CPUs + * in the guest - which will not work as there is no + * hypercall to expand the max number of VCPUs an already + * running guest has. So cap it up to X. */ + if (subtract) + nr_cpu_ids = nr_cpu_ids - subtract; +#endif + } static void __init xen_smp_prepare_boot_cpu(void) |