Advertisement
Guest User

Untitled

a guest
Oct 21st, 2015
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.44 KB | None | 0 0
  1. diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
  2. index 8648438..cddbf02 100644
  3. --- a/arch/x86/xen/smp.c
  4. +++ b/arch/x86/xen/smp.c
  5. @@ -55,6 +55,25 @@ static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id);
  6.  static irqreturn_t xen_call_function_single_interrupt(int irq, void *dev_id);
  7.  static irqreturn_t xen_irq_work_interrupt(int irq, void *dev_id);
  8.  
  9. +static bool xen_simple_topology;
  10. +static __init int xen_parse_topology(char *arg)
  11. +{
  12. +   xen_simple_topology = true;
  13. +   return 0;
  14. +}
  15. +early_param("xen_simple_topology", xen_parse_topology);
  16. +
  17. +static void xen_set_cpu_sibling_map(int cpu)
  18. +{
  19. +   if (xen_simple_topology) {
  20. +       cpumask_set_cpu(cpu, topology_thread_cpumask(cpu));
  21. +       cpumask_set_cpu(cpu, cpu_llc_shared_mask(cpu));
  22. +       cpumask_set_cpu(cpu, topology_core_cpumask(cpu));
  23. +   } else {
  24. +       set_cpu_sibling_map(cpu);
  25. +   }
  26. +}
  27. +
  28.  /*
  29.   * Reschedule call back.
  30.   */
  31. @@ -82,7 +101,7 @@ static void cpu_bringup(void)
  32.     cpu = smp_processor_id();
  33.     smp_store_cpu_info(cpu);
  34.     cpu_data(cpu).x86_max_cores = 1;
  35. -   set_cpu_sibling_map(cpu);
  36. +   xen_set_cpu_sibling_map(cpu);
  37.  
  38.     xen_setup_cpu_clockevents();
  39.  
  40. @@ -333,7 +352,7 @@ static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
  41.         zalloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL);
  42.         zalloc_cpumask_var(&per_cpu(cpu_llc_shared_map, i), GFP_KERNEL);
  43.     }
  44. -   set_cpu_sibling_map(0);
  45. +   xen_set_cpu_sibling_map(0);
  46.  
  47.     if (xen_smp_intr_init(0))
  48.         BUG();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement