hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/acpi/irq.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * ACPI GSI IRQ layer
34 *
45 * Copyright (C) 2015 ARM Ltd.
56 * Author: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 */
118 #include <linux/acpi.h>
129 #include <linux/irq.h>
....@@ -196,7 +193,7 @@
196193 fwnode = acpi_gsi_domain_id;
197194 acpi_irq_parse_one_match(fwnode, irq->interrupts[ctx->index],
198195 irq->triggering, irq->polarity,
199
- irq->sharable, ctx);
196
+ irq->shareable, ctx);
200197 return AE_CTRL_TERMINATE;
201198 case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
202199 eirq = &ares->data.extended_irq;
....@@ -209,7 +206,7 @@
209206 fwnode = acpi_get_irq_source_fwhandle(&eirq->resource_source);
210207 acpi_irq_parse_one_match(fwnode, eirq->interrupts[ctx->index],
211208 eirq->triggering, eirq->polarity,
212
- eirq->sharable, ctx);
209
+ eirq->shareable, ctx);
213210 return AE_CTRL_TERMINATE;
214211 }
215212
....@@ -295,3 +292,29 @@
295292 acpi_irq_model = model;
296293 acpi_gsi_domain_id = fwnode;
297294 }
295
+
296
+/**
297
+ * acpi_irq_create_hierarchy - Create a hierarchical IRQ domain with the default
298
+ * GSI domain as its parent.
299
+ * @flags: Irq domain flags associated with the domain
300
+ * @size: Size of the domain.
301
+ * @fwnode: Optional fwnode of the interrupt controller
302
+ * @ops: Pointer to the interrupt domain callbacks
303
+ * @host_data: Controller private data pointer
304
+ */
305
+struct irq_domain *acpi_irq_create_hierarchy(unsigned int flags,
306
+ unsigned int size,
307
+ struct fwnode_handle *fwnode,
308
+ const struct irq_domain_ops *ops,
309
+ void *host_data)
310
+{
311
+ struct irq_domain *d = irq_find_matching_fwnode(acpi_gsi_domain_id,
312
+ DOMAIN_BUS_ANY);
313
+
314
+ if (!d)
315
+ return NULL;
316
+
317
+ return irq_domain_create_hierarchy(d, flags, size, fwnode, ops,
318
+ host_data);
319
+}
320
+EXPORT_SYMBOL_GPL(acpi_irq_create_hierarchy);