mcpm_entry.c 704 B

12345678910111213141516171819202122
  1. /*
  2. * arch/arm/common/mcpm_entry.c -- entry point for multi-cluster PM
  3. *
  4. * Created by: Nicolas Pitre, March 2012
  5. * Copyright: (C) 2012-2013 Linaro Limited
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <asm/mcpm.h>
  12. #include <asm/cacheflush.h>
  13. extern unsigned long mcpm_entry_vectors[MAX_NR_CLUSTERS][MAX_CPUS_PER_CLUSTER];
  14. void mcpm_set_entry_vector(unsigned cpu, unsigned cluster, void *ptr)
  15. {
  16. unsigned long val = ptr ? virt_to_phys(ptr) : 0;
  17. mcpm_entry_vectors[cluster][cpu] = val;
  18. sync_cache_w(&mcpm_entry_vectors[cluster][cpu]);
  19. }