.. | .. |
---|
44 | 44 | struct irq_data; |
---|
45 | 45 | struct cpumask; |
---|
46 | 46 | struct seq_file; |
---|
| 47 | +struct irq_affinity_desc; |
---|
47 | 48 | |
---|
48 | 49 | /* Number of irqs reserved for a legacy isa controller */ |
---|
49 | 50 | #define NUM_ISA_INTERRUPTS 16 |
---|
.. | .. |
---|
76 | 77 | enum irq_domain_bus_token { |
---|
77 | 78 | DOMAIN_BUS_ANY = 0, |
---|
78 | 79 | DOMAIN_BUS_WIRED, |
---|
| 80 | + DOMAIN_BUS_GENERIC_MSI, |
---|
79 | 81 | DOMAIN_BUS_PCI_MSI, |
---|
80 | 82 | DOMAIN_BUS_PLATFORM_MSI, |
---|
81 | 83 | DOMAIN_BUS_NEXUS, |
---|
82 | 84 | DOMAIN_BUS_IPI, |
---|
83 | 85 | DOMAIN_BUS_FSL_MC_MSI, |
---|
| 86 | + DOMAIN_BUS_TI_SCI_INTA_MSI, |
---|
84 | 87 | DOMAIN_BUS_WAKEUP, |
---|
| 88 | + DOMAIN_BUS_VMD_MSI, |
---|
85 | 89 | }; |
---|
86 | 90 | |
---|
87 | 91 | /** |
---|
.. | .. |
---|
231 | 235 | |
---|
232 | 236 | #ifdef CONFIG_IRQ_DOMAIN |
---|
233 | 237 | struct fwnode_handle *__irq_domain_alloc_fwnode(unsigned int type, int id, |
---|
234 | | - const char *name, void *data); |
---|
| 238 | + const char *name, phys_addr_t *pa); |
---|
235 | 239 | |
---|
236 | 240 | enum { |
---|
237 | 241 | IRQCHIP_FWNODE_REAL, |
---|
.. | .. |
---|
252 | 256 | NULL); |
---|
253 | 257 | } |
---|
254 | 258 | |
---|
255 | | -static inline struct fwnode_handle *irq_domain_alloc_fwnode(void *data) |
---|
| 259 | +static inline struct fwnode_handle *irq_domain_alloc_fwnode(phys_addr_t *pa) |
---|
256 | 260 | { |
---|
257 | | - return __irq_domain_alloc_fwnode(IRQCHIP_FWNODE_REAL, 0, NULL, data); |
---|
| 261 | + return __irq_domain_alloc_fwnode(IRQCHIP_FWNODE_REAL, 0, NULL, pa); |
---|
258 | 262 | } |
---|
259 | 263 | |
---|
260 | 264 | void irq_domain_free_fwnode(struct fwnode_handle *fwnode); |
---|
.. | .. |
---|
277 | 281 | enum irq_domain_bus_token bus_token); |
---|
278 | 282 | extern bool irq_domain_check_msi_remap(void); |
---|
279 | 283 | extern void irq_set_default_host(struct irq_domain *host); |
---|
| 284 | +extern struct irq_domain *irq_get_default_host(void); |
---|
280 | 285 | extern int irq_domain_alloc_descs(int virq, unsigned int nr_irqs, |
---|
281 | 286 | irq_hw_number_t hwirq, int node, |
---|
282 | | - const struct cpumask *affinity); |
---|
| 287 | + const struct irq_affinity_desc *affinity); |
---|
283 | 288 | |
---|
284 | 289 | static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *node) |
---|
285 | 290 | { |
---|
.. | .. |
---|
385 | 390 | extern void irq_domain_disassociate(struct irq_domain *domain, |
---|
386 | 391 | unsigned int irq); |
---|
387 | 392 | |
---|
388 | | -extern unsigned int irq_create_mapping(struct irq_domain *host, |
---|
389 | | - irq_hw_number_t hwirq); |
---|
| 393 | +extern unsigned int irq_create_mapping_affinity(struct irq_domain *host, |
---|
| 394 | + irq_hw_number_t hwirq, |
---|
| 395 | + const struct irq_affinity_desc *affinity); |
---|
390 | 396 | extern unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec); |
---|
391 | 397 | extern void irq_dispose_mapping(unsigned int virq); |
---|
| 398 | + |
---|
| 399 | +static inline unsigned int irq_create_mapping(struct irq_domain *host, |
---|
| 400 | + irq_hw_number_t hwirq) |
---|
| 401 | +{ |
---|
| 402 | + return irq_create_mapping_affinity(host, hwirq, NULL); |
---|
| 403 | +} |
---|
| 404 | + |
---|
392 | 405 | |
---|
393 | 406 | /** |
---|
394 | 407 | * irq_linear_revmap() - Find a linux irq from a hw irq number. |
---|
.. | .. |
---|
431 | 444 | const u32 *intspec, unsigned int intsize, |
---|
432 | 445 | irq_hw_number_t *out_hwirq, unsigned int *out_type); |
---|
433 | 446 | |
---|
| 447 | +int irq_domain_translate_twocell(struct irq_domain *d, |
---|
| 448 | + struct irq_fwspec *fwspec, |
---|
| 449 | + unsigned long *out_hwirq, |
---|
| 450 | + unsigned int *out_type); |
---|
| 451 | + |
---|
| 452 | +int irq_domain_translate_onecell(struct irq_domain *d, |
---|
| 453 | + struct irq_fwspec *fwspec, |
---|
| 454 | + unsigned long *out_hwirq, |
---|
| 455 | + unsigned int *out_type); |
---|
| 456 | + |
---|
434 | 457 | /* IPI functions */ |
---|
435 | 458 | int irq_reserve_ipi(struct irq_domain *domain, const struct cpumask *dest); |
---|
436 | 459 | int irq_destroy_ipi(unsigned int irq, const struct cpumask *dest); |
---|
.. | .. |
---|
442 | 465 | irq_hw_number_t hwirq, struct irq_chip *chip, |
---|
443 | 466 | void *chip_data, irq_flow_handler_t handler, |
---|
444 | 467 | void *handler_data, const char *handler_name); |
---|
| 468 | +extern void irq_domain_reset_irq_data(struct irq_data *irq_data); |
---|
445 | 469 | #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY |
---|
446 | 470 | extern struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, |
---|
447 | 471 | unsigned int flags, unsigned int size, |
---|
.. | .. |
---|
462 | 486 | |
---|
463 | 487 | extern int __irq_domain_alloc_irqs(struct irq_domain *domain, int irq_base, |
---|
464 | 488 | unsigned int nr_irqs, int node, void *arg, |
---|
465 | | - bool realloc, const struct cpumask *affinity); |
---|
| 489 | + bool realloc, |
---|
| 490 | + const struct irq_affinity_desc *affinity); |
---|
466 | 491 | extern void irq_domain_free_irqs(unsigned int virq, unsigned int nr_irqs); |
---|
467 | 492 | extern int irq_domain_activate_irq(struct irq_data *irq_data, bool early); |
---|
468 | 493 | extern void irq_domain_deactivate_irq(struct irq_data *irq_data); |
---|
.. | .. |
---|
482 | 507 | irq_hw_number_t hwirq, |
---|
483 | 508 | struct irq_chip *chip, |
---|
484 | 509 | void *chip_data); |
---|
485 | | -extern void irq_domain_reset_irq_data(struct irq_data *irq_data); |
---|
486 | 510 | extern void irq_domain_free_irqs_common(struct irq_domain *domain, |
---|
487 | 511 | unsigned int virq, |
---|
488 | 512 | unsigned int nr_irqs); |
---|
.. | .. |
---|
500 | 524 | unsigned int irq_base, |
---|
501 | 525 | unsigned int nr_irqs); |
---|
502 | 526 | |
---|
| 527 | +extern int irq_domain_disconnect_hierarchy(struct irq_domain *domain, |
---|
| 528 | + unsigned int virq); |
---|
| 529 | + |
---|
503 | 530 | static inline bool irq_domain_is_hierarchy(struct irq_domain *domain) |
---|
504 | 531 | { |
---|
505 | 532 | return domain->flags & IRQ_DOMAIN_FLAG_HIERARCHY; |
---|