0001
0002
0003
0004
0005
0006
0007 #ifndef __LINUX_IRQCHIP_IRQ_PARTITION_PERCPU_H
0008 #define __LINUX_IRQCHIP_IRQ_PARTITION_PERCPU_H
0009
0010 #include <linux/fwnode.h>
0011 #include <linux/cpumask.h>
0012 #include <linux/irqdomain.h>
0013
0014 struct partition_affinity {
0015 cpumask_t mask;
0016 void *partition_id;
0017 };
0018
0019 struct partition_desc;
0020
0021 #ifdef CONFIG_PARTITION_PERCPU
0022 int partition_translate_id(struct partition_desc *desc, void *partition_id);
0023 struct partition_desc *partition_create_desc(struct fwnode_handle *fwnode,
0024 struct partition_affinity *parts,
0025 int nr_parts,
0026 int chained_irq,
0027 const struct irq_domain_ops *ops);
0028 struct irq_domain *partition_get_domain(struct partition_desc *dsc);
0029 #else
0030 static inline int partition_translate_id(struct partition_desc *desc,
0031 void *partition_id)
0032 {
0033 return -EINVAL;
0034 }
0035
0036 static inline
0037 struct partition_desc *partition_create_desc(struct fwnode_handle *fwnode,
0038 struct partition_affinity *parts,
0039 int nr_parts,
0040 int chained_irq,
0041 const struct irq_domain_ops *ops)
0042 {
0043 return NULL;
0044 }
0045
0046 static inline
0047 struct irq_domain *partition_get_domain(struct partition_desc *dsc)
0048 {
0049 return NULL;
0050 }
0051 #endif
0052
0053 #endif