.. | .. |
---|
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); |
---|
| 265 | +#ifdef __GENKSYMS__ /* Android KABI hack to preserve CRC checker */ |
---|
261 | 266 | struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size, |
---|
| 267 | +#else |
---|
| 268 | +struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, unsigned int size, |
---|
| 269 | +#endif |
---|
262 | 270 | irq_hw_number_t hwirq_max, int direct_max, |
---|
263 | 271 | const struct irq_domain_ops *ops, |
---|
264 | 272 | void *host_data); |
---|
.. | .. |
---|
277 | 285 | enum irq_domain_bus_token bus_token); |
---|
278 | 286 | extern bool irq_domain_check_msi_remap(void); |
---|
279 | 287 | extern void irq_set_default_host(struct irq_domain *host); |
---|
| 288 | +extern struct irq_domain *irq_get_default_host(void); |
---|
280 | 289 | extern int irq_domain_alloc_descs(int virq, unsigned int nr_irqs, |
---|
281 | 290 | irq_hw_number_t hwirq, int node, |
---|
282 | | - const struct cpumask *affinity); |
---|
| 291 | + const struct irq_affinity_desc *affinity); |
---|
283 | 292 | |
---|
284 | 293 | static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *node) |
---|
285 | 294 | { |
---|
.. | .. |
---|
385 | 394 | extern void irq_domain_disassociate(struct irq_domain *domain, |
---|
386 | 395 | unsigned int irq); |
---|
387 | 396 | |
---|
388 | | -extern unsigned int irq_create_mapping(struct irq_domain *host, |
---|
389 | | - irq_hw_number_t hwirq); |
---|
| 397 | +extern unsigned int irq_create_mapping_affinity(struct irq_domain *host, |
---|
| 398 | + irq_hw_number_t hwirq, |
---|
| 399 | + const struct irq_affinity_desc *affinity); |
---|
390 | 400 | extern unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec); |
---|
391 | 401 | extern void irq_dispose_mapping(unsigned int virq); |
---|
| 402 | + |
---|
| 403 | +static inline unsigned int irq_create_mapping(struct irq_domain *host, |
---|
| 404 | + irq_hw_number_t hwirq) |
---|
| 405 | +{ |
---|
| 406 | + return irq_create_mapping_affinity(host, hwirq, NULL); |
---|
| 407 | +} |
---|
| 408 | + |
---|
392 | 409 | |
---|
393 | 410 | /** |
---|
394 | 411 | * irq_linear_revmap() - Find a linux irq from a hw irq number. |
---|
.. | .. |
---|
431 | 448 | const u32 *intspec, unsigned int intsize, |
---|
432 | 449 | irq_hw_number_t *out_hwirq, unsigned int *out_type); |
---|
433 | 450 | |
---|
| 451 | +int irq_domain_translate_twocell(struct irq_domain *d, |
---|
| 452 | + struct irq_fwspec *fwspec, |
---|
| 453 | + unsigned long *out_hwirq, |
---|
| 454 | + unsigned int *out_type); |
---|
| 455 | + |
---|
| 456 | +int irq_domain_translate_onecell(struct irq_domain *d, |
---|
| 457 | + struct irq_fwspec *fwspec, |
---|
| 458 | + unsigned long *out_hwirq, |
---|
| 459 | + unsigned int *out_type); |
---|
| 460 | + |
---|
434 | 461 | /* IPI functions */ |
---|
435 | 462 | int irq_reserve_ipi(struct irq_domain *domain, const struct cpumask *dest); |
---|
436 | 463 | int irq_destroy_ipi(unsigned int irq, const struct cpumask *dest); |
---|
.. | .. |
---|
442 | 469 | irq_hw_number_t hwirq, struct irq_chip *chip, |
---|
443 | 470 | void *chip_data, irq_flow_handler_t handler, |
---|
444 | 471 | void *handler_data, const char *handler_name); |
---|
| 472 | +extern void irq_domain_reset_irq_data(struct irq_data *irq_data); |
---|
445 | 473 | #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY |
---|
446 | 474 | extern struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, |
---|
447 | 475 | unsigned int flags, unsigned int size, |
---|
.. | .. |
---|
462 | 490 | |
---|
463 | 491 | extern int __irq_domain_alloc_irqs(struct irq_domain *domain, int irq_base, |
---|
464 | 492 | unsigned int nr_irqs, int node, void *arg, |
---|
465 | | - bool realloc, const struct cpumask *affinity); |
---|
| 493 | + bool realloc, |
---|
| 494 | + const struct irq_affinity_desc *affinity); |
---|
466 | 495 | extern void irq_domain_free_irqs(unsigned int virq, unsigned int nr_irqs); |
---|
467 | 496 | extern int irq_domain_activate_irq(struct irq_data *irq_data, bool early); |
---|
468 | 497 | extern void irq_domain_deactivate_irq(struct irq_data *irq_data); |
---|
.. | .. |
---|
482 | 511 | irq_hw_number_t hwirq, |
---|
483 | 512 | struct irq_chip *chip, |
---|
484 | 513 | void *chip_data); |
---|
485 | | -extern void irq_domain_reset_irq_data(struct irq_data *irq_data); |
---|
486 | 514 | extern void irq_domain_free_irqs_common(struct irq_domain *domain, |
---|
487 | 515 | unsigned int virq, |
---|
488 | 516 | unsigned int nr_irqs); |
---|
.. | .. |
---|
500 | 528 | unsigned int irq_base, |
---|
501 | 529 | unsigned int nr_irqs); |
---|
502 | 530 | |
---|
| 531 | +extern int irq_domain_disconnect_hierarchy(struct irq_domain *domain, |
---|
| 532 | + unsigned int virq); |
---|
| 533 | + |
---|
503 | 534 | static inline bool irq_domain_is_hierarchy(struct irq_domain *domain) |
---|
504 | 535 | { |
---|
505 | 536 | return domain->flags & IRQ_DOMAIN_FLAG_HIERARCHY; |
---|