Nicolas Pitre | e8db288 | 2012-04-12 02:45:22 -0400 | [diff] [blame^] | 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 | |
| 12 | #include <asm/mcpm.h> |
| 13 | #include <asm/cacheflush.h> |
| 14 | |
| 15 | extern unsigned long mcpm_entry_vectors[MAX_NR_CLUSTERS][MAX_CPUS_PER_CLUSTER]; |
| 16 | |
| 17 | void mcpm_set_entry_vector(unsigned cpu, unsigned cluster, void *ptr) |
| 18 | { |
| 19 | unsigned long val = ptr ? virt_to_phys(ptr) : 0; |
| 20 | mcpm_entry_vectors[cluster][cpu] = val; |
| 21 | sync_cache_w(&mcpm_entry_vectors[cluster][cpu]); |
| 22 | } |