diff options
-rw-r--r-- | include/linux/irq.h | 6 | ||||
-rw-r--r-- | kernel/irq/chip.c | 48 |
2 files changed, 54 insertions, 0 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index 0adcbbbf2e87..fad4bf6f15f6 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -446,6 +446,12 @@ extern void handle_nested_irq(unsigned int irq); | |||
446 | #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY | 446 | #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY |
447 | extern void irq_chip_ack_parent(struct irq_data *data); | 447 | extern void irq_chip_ack_parent(struct irq_data *data); |
448 | extern int irq_chip_retrigger_hierarchy(struct irq_data *data); | 448 | extern int irq_chip_retrigger_hierarchy(struct irq_data *data); |
449 | extern void irq_chip_mask_parent(struct irq_data *data); | ||
450 | extern void irq_chip_unmask_parent(struct irq_data *data); | ||
451 | extern void irq_chip_eoi_parent(struct irq_data *data); | ||
452 | extern int irq_chip_set_affinity_parent(struct irq_data *data, | ||
453 | const struct cpumask *dest, | ||
454 | bool force); | ||
449 | #endif | 455 | #endif |
450 | 456 | ||
451 | /* Handling of unhandled and spurious interrupts: */ | 457 | /* Handling of unhandled and spurious interrupts: */ |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index dd1d3c4c93a2..47f4c6469a43 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -863,6 +863,54 @@ void irq_chip_ack_parent(struct irq_data *data) | |||
863 | } | 863 | } |
864 | 864 | ||
865 | /** | 865 | /** |
866 | * irq_chip_mask_parent - Mask the parent interrupt | ||
867 | * @data: Pointer to interrupt specific data | ||
868 | */ | ||
869 | void irq_chip_mask_parent(struct irq_data *data) | ||
870 | { | ||
871 | data = data->parent_data; | ||
872 | data->chip->irq_mask(data); | ||
873 | } | ||
874 | |||
875 | /** | ||
876 | * irq_chip_unmask_parent - Unmask the parent interrupt | ||
877 | * @data: Pointer to interrupt specific data | ||
878 | */ | ||
879 | void irq_chip_unmask_parent(struct irq_data *data) | ||
880 | { | ||
881 | data = data->parent_data; | ||
882 | data->chip->irq_unmask(data); | ||
883 | } | ||
884 | |||
885 | /** | ||
886 | * irq_chip_eoi_parent - Invoke EOI on the parent interrupt | ||
887 | * @data: Pointer to interrupt specific data | ||
888 | */ | ||
889 | void irq_chip_eoi_parent(struct irq_data *data) | ||
890 | { | ||
891 | data = data->parent_data; | ||
892 | data->chip->irq_eoi(data); | ||
893 | } | ||
894 | |||
895 | /** | ||
896 | * irq_chip_set_affinity_parent - Set affinity on the parent interrupt | ||
897 | * @data: Pointer to interrupt specific data | ||
898 | * @dest: The affinity mask to set | ||
899 | * @force: Flag to enforce setting (disable online checks) | ||
900 | * | ||
901 | * Conditinal, as the underlying parent chip might not implement it. | ||
902 | */ | ||
903 | int irq_chip_set_affinity_parent(struct irq_data *data, | ||
904 | const struct cpumask *dest, bool force) | ||
905 | { | ||
906 | data = data->parent_data; | ||
907 | if (data->chip->irq_set_affinity) | ||
908 | return data->chip->irq_set_affinity(data, dest, force); | ||
909 | |||
910 | return -ENOSYS; | ||
911 | } | ||
912 | |||
913 | /** | ||
866 | * irq_chip_retrigger_hierarchy - Retrigger an interrupt in hardware | 914 | * irq_chip_retrigger_hierarchy - Retrigger an interrupt in hardware |
867 | * @data: Pointer to interrupt specific data | 915 | * @data: Pointer to interrupt specific data |
868 | * | 916 | * |