Marc Zyngier | 9e2c986 | 2016-04-11 09:57:53 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 ARM Limited, All Rights Reserved. |
| 3 | * Author: Marc Zyngier <marc.zyngier@arm.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 as |
| 7 | * published by the Free Software Foundation. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ |
| 17 | |
| 18 | #include <linux/fwnode.h> |
| 19 | #include <linux/cpumask.h> |
| 20 | #include <linux/irqdomain.h> |
| 21 | |
| 22 | struct partition_affinity { |
| 23 | cpumask_t mask; |
| 24 | void *partition_id; |
| 25 | }; |
| 26 | |
| 27 | struct partition_desc; |
| 28 | |
| 29 | #ifdef CONFIG_PARTITION_PERCPU |
| 30 | int partition_translate_id(struct partition_desc *desc, void *partition_id); |
| 31 | struct partition_desc *partition_create_desc(struct fwnode_handle *fwnode, |
| 32 | struct partition_affinity *parts, |
| 33 | int nr_parts, |
| 34 | int chained_irq, |
| 35 | const struct irq_domain_ops *ops); |
| 36 | struct irq_domain *partition_get_domain(struct partition_desc *dsc); |
| 37 | #else |
| 38 | static inline int partition_translate_id(struct partition_desc *desc, |
| 39 | void *partition_id) |
| 40 | { |
| 41 | return -EINVAL; |
| 42 | } |
| 43 | |
| 44 | static inline |
| 45 | struct partition_desc *partition_create_desc(struct fwnode_handle *fwnode, |
| 46 | struct partition_affinity *parts, |
| 47 | int nr_parts, |
| 48 | int chained_irq, |
| 49 | const struct irq_domain_ops *ops) |
| 50 | { |
| 51 | return NULL; |
| 52 | } |
| 53 | |
| 54 | static inline |
| 55 | struct irq_domain *partition_get_domain(struct partition_desc *dsc) |
| 56 | { |
| 57 | return NULL; |
| 58 | } |
| 59 | #endif |