]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'arm-mpidr/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 00:44:02 +0000 (10:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 00:44:02 +0000 (10:44 +1000)
Conflicts:
arch/arm/kernel/suspend.c

1  2 
arch/arm/include/asm/smp_plat.h
arch/arm/kernel/setup.c
arch/arm/kernel/suspend.c

Simple merge
index 2d06a0ab6170a1c6f2a7d4553ffa45180ec14ed1,8bf1b19eafeb26c938e3292eab4f04ba213dcf97..f38029a1a443790a59a3155f31a8fca439e414a3
@@@ -822,16 -862,11 +888,17 @@@ void __init setup_arch(char **cmdline_p
        unflatten_device_tree();
  
        arm_dt_init_cpu_maps();
 +      psci_init();
  #ifdef CONFIG_SMP
        if (is_smp()) {
 -              smp_set_ops(mdesc->smp);
 +              if (!mdesc->smp_init || !mdesc->smp_init()) {
 +                      if (psci_smp_available())
 +                              smp_set_ops(&psci_smp_ops);
 +                      else if (mdesc->smp)
 +                              smp_set_ops(mdesc->smp);
 +              }
                smp_init_cpus();
+               smp_build_mpidr_hash();
        }
  #endif
  
index 38a50676213bb133ebe1ac120a8517625b2854fc,17d02f64f612df530983744ee97b9347364cb00b..41cf3cbf756de473be3bb1ebb268445aeacadc5d
@@@ -82,3 -49,48 +85,20 @@@ void __cpu_suspend_save(u32 *ptr, u32 p
        outer_clean_range(virt_to_phys(save_ptr),
                          virt_to_phys(save_ptr) + sizeof(*save_ptr));
  }
 -/*
 - * Hide the first two arguments to __cpu_suspend - these are an implementation
 - * detail which platform code shouldn't have to know about.
 - */
 -int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
 -{
 -      struct mm_struct *mm = current->active_mm;
 -      int ret;
 -
 -      if (!idmap_pgd)
 -              return -EINVAL;
 -
 -      /*
 -       * Provide a temporary page table with an identity mapping for
 -       * the MMU-enable code, required for resuming.  On successful
 -       * resume (indicated by a zero return code), we need to switch
 -       * back to the correct page tables.
 -       */
 -      ret = __cpu_suspend(arg, fn);
 -      if (ret == 0) {
 -              cpu_switch_mm(mm->pgd, mm);
 -              local_flush_bp_all();
 -              local_flush_tlb_all();
 -      }
 -
 -      return ret;
 -}
 -
+ extern struct sleep_save_sp sleep_save_sp;
+ static int cpu_suspend_alloc_sp(void)
+ {
+       void *ctx_ptr;
+       /* ctx_ptr is an array of physical addresses */
+       ctx_ptr = kcalloc(mpidr_hash_size(), sizeof(u32), GFP_KERNEL);
+       if (WARN_ON(!ctx_ptr))
+               return -ENOMEM;
+       sleep_save_sp.save_ptr_stash = ctx_ptr;
+       sleep_save_sp.save_ptr_stash_phys = virt_to_phys(ctx_ptr);
+       sync_cache_w(&sleep_save_sp);
+       return 0;
+ }
+ early_initcall(cpu_suspend_alloc_sp);