]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/linux/irqchip/irq-partition-percpu.h
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-bionic-kernel.git] / include / linux / irqchip / irq-partition-percpu.h
CommitLineData
9e2c986c
MZ
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
22struct partition_affinity {
23 cpumask_t mask;
24 void *partition_id;
25};
26
27struct partition_desc;
28
29#ifdef CONFIG_PARTITION_PERCPU
30int partition_translate_id(struct partition_desc *desc, void *partition_id);
31struct 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);
36struct irq_domain *partition_get_domain(struct partition_desc *dsc);
37#else
38static inline int partition_translate_id(struct partition_desc *desc,
39 void *partition_id)
40{
41 return -EINVAL;
42}
43
44static inline
45struct 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
54static inline
55struct irq_domain *partition_get_domain(struct partition_desc *dsc)
56{
57 return NULL;
58}
59#endif