treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234
[linux-2.6-block.git] / include / linux / irqchip / irq-partition-percpu.h
CommitLineData
caab277b 1/* SPDX-License-Identifier: GPL-2.0-only */
9e2c986c
MZ
2/*
3 * Copyright (C) 2016 ARM Limited, All Rights Reserved.
4 * Author: Marc Zyngier <marc.zyngier@arm.com>
9e2c986c
MZ
5 */
6
7#include <linux/fwnode.h>
8#include <linux/cpumask.h>
9#include <linux/irqdomain.h>
10
11struct partition_affinity {
12 cpumask_t mask;
13 void *partition_id;
14};
15
16struct partition_desc;
17
18#ifdef CONFIG_PARTITION_PERCPU
19int partition_translate_id(struct partition_desc *desc, void *partition_id);
20struct partition_desc *partition_create_desc(struct fwnode_handle *fwnode,
21 struct partition_affinity *parts,
22 int nr_parts,
23 int chained_irq,
24 const struct irq_domain_ops *ops);
25struct irq_domain *partition_get_domain(struct partition_desc *dsc);
26#else
27static inline int partition_translate_id(struct partition_desc *desc,
28 void *partition_id)
29{
30 return -EINVAL;
31}
32
33static inline
34struct partition_desc *partition_create_desc(struct fwnode_handle *fwnode,
35 struct partition_affinity *parts,
36 int nr_parts,
37 int chained_irq,
38 const struct irq_domain_ops *ops)
39{
40 return NULL;
41}
42
43static inline
44struct irq_domain *partition_get_domain(struct partition_desc *dsc)
45{
46 return NULL;
47}
48#endif