Commit 5947a64a authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq updates from Thomas Gleixner:
 "The interrupt brigade came up with the following updates:

   - Driver for the Marvell System Error Interrupt machinery

   - Overhaul of the GIC-V3 ITS driver

   - Small updates and fixes all over the place"

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits)
  genirq: Fix race on spurious interrupt detection
  softirq: Fix typo in __do_softirq() comments
  genirq: Fix grammar s/an /a /
  irqchip/gic: Unify GIC priority definitions
  irqchip/gic-v3: Remove acknowledge loop
  dt-bindings/interrupt-controller: Add documentation for Marvell SEI controller
  dt-bindings/interrupt-controller: Update Marvell ICU bindings
  irqchip/irq-mvebu-icu: Add support for System Error Interrupts (SEI)
  arm64: marvell: Enable SEI driver
  irqchip/irq-mvebu-sei: Add new driver for Marvell SEI
  irqchip/irq-mvebu-icu: Support ICU subnodes
  irqchip/irq-mvebu-icu: Disociate ICU and NSR
  irqchip/irq-mvebu-icu: Clarify the reset operation of configured interrupts
  irqchip/irq-mvebu-icu: Fix wrong private data retrieval
  dt-bindings/interrupt-controller: Fix Marvell ICU length in the example
  genirq/msi: Allow creation of a tree-based irqdomain for platform-msi
  dt-bindings: irqchip: renesas-irqc: Document r8a7744 support
  dt-bindings: irqchip: renesas-irqc: Document R-Car E3 support
  irqchip/pdc: Setup all edge interrupts as rising edge at GIC
  irqchip/gic-v3-its: Allow use of LPI tables in reserved memory
  ...
parents 4dcb9239 746a923b
...@@ -5,6 +5,8 @@ The Marvell ICU (Interrupt Consolidation Unit) controller is ...@@ -5,6 +5,8 @@ The Marvell ICU (Interrupt Consolidation Unit) controller is
responsible for collecting all wired-interrupt sources in the CP and responsible for collecting all wired-interrupt sources in the CP and
communicating them to the GIC in the AP, the unit translates interrupt communicating them to the GIC in the AP, the unit translates interrupt
requests on input wires to MSG memory mapped transactions to the GIC. requests on input wires to MSG memory mapped transactions to the GIC.
These messages will access a different GIC memory area depending on
their type (NSR, SR, SEI, REI, etc).
Required properties: Required properties:
...@@ -12,20 +14,23 @@ Required properties: ...@@ -12,20 +14,23 @@ Required properties:
- reg: Should contain ICU registers location and length. - reg: Should contain ICU registers location and length.
- #interrupt-cells: Specifies the number of cells needed to encode an Subnodes: Each group of interrupt is declared as a subnode of the ICU,
interrupt source. The value shall be 3. with their own compatible.
Required properties for the icu_nsr/icu_sei subnodes:
The 1st cell is the group type of the ICU interrupt. Possible group - compatible: Should be one of:
types are: * "marvell,cp110-icu-nsr"
* "marvell,cp110-icu-sr"
* "marvell,cp110-icu-sei"
* "marvell,cp110-icu-rei"
ICU_GRP_NSR (0x0) : Shared peripheral interrupt, non-secure - #interrupt-cells: Specifies the number of cells needed to encode an
ICU_GRP_SR (0x1) : Shared peripheral interrupt, secure interrupt source. The value shall be 2.
ICU_GRP_SEI (0x4) : System error interrupt
ICU_GRP_REI (0x5) : RAM error interrupt
The 2nd cell is the index of the interrupt in the ICU unit. The 1st cell is the index of the interrupt in the ICU unit.
The 3rd cell is the type of the interrupt. See arm,gic.txt for The 2nd cell is the type of the interrupt. See arm,gic.txt for
details. details.
- interrupt-controller: Identifies the node as an interrupt - interrupt-controller: Identifies the node as an interrupt
...@@ -35,17 +40,73 @@ Required properties: ...@@ -35,17 +40,73 @@ Required properties:
that allows to trigger interrupts using MSG memory mapped that allows to trigger interrupts using MSG memory mapped
transactions. transactions.
Note: each 'interrupts' property referring to any 'icu_xxx' node shall
have a different number within [0:206].
Example: Example:
icu: interrupt-controller@1e0000 { icu: interrupt-controller@1e0000 {
compatible = "marvell,cp110-icu"; compatible = "marvell,cp110-icu";
reg = <0x1e0000 0x10>; reg = <0x1e0000 0x440>;
CP110_LABEL(icu_nsr): interrupt-controller@10 {
compatible = "marvell,cp110-icu-nsr";
reg = <0x10 0x20>;
#interrupt-cells = <2>;
interrupt-controller;
msi-parent = <&gicp>;
};
CP110_LABEL(icu_sei): interrupt-controller@50 {
compatible = "marvell,cp110-icu-sei";
reg = <0x50 0x10>;
#interrupt-cells = <2>;
interrupt-controller;
msi-parent = <&sei>;
};
};
node1 {
interrupt-parent = <&icu_nsr>;
interrupts = <106 IRQ_TYPE_LEVEL_HIGH>;
};
node2 {
interrupt-parent = <&icu_sei>;
interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
};
/* Would not work with the above nodes */
node3 {
interrupt-parent = <&icu_nsr>;
interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
};
The legacy bindings were different in this way:
- #interrupt-cells: The value was 3.
The 1st cell was the group type of the ICU interrupt. Possible
group types were:
ICU_GRP_NSR (0x0) : Shared peripheral interrupt, non-secure
ICU_GRP_SR (0x1) : Shared peripheral interrupt, secure
ICU_GRP_SEI (0x4) : System error interrupt
ICU_GRP_REI (0x5) : RAM error interrupt
The 2nd cell was the index of the interrupt in the ICU unit.
The 3rd cell was the type of the interrupt. See arm,gic.txt for
details.
Example:
icu: interrupt-controller@1e0000 {
compatible = "marvell,cp110-icu";
reg = <0x1e0000 0x440>;
#interrupt-cells = <3>; #interrupt-cells = <3>;
interrupt-controller; interrupt-controller;
msi-parent = <&gicp>; msi-parent = <&gicp>;
}; };
usb3h0: usb3@500000 { node1 {
interrupt-parent = <&icu>; interrupt-parent = <&icu>;
interrupts = <ICU_GRP_NSR 106 IRQ_TYPE_LEVEL_HIGH>; interrupts = <ICU_GRP_NSR 106 IRQ_TYPE_LEVEL_HIGH>;
}; };
Marvell SEI (System Error Interrupt) Controller
-----------------------------------------------
Marvell SEI (System Error Interrupt) controller is an interrupt
aggregator. It receives interrupts from several sources and aggregates
them to a single interrupt line (an SPI) on the parent interrupt
controller.
This interrupt controller can handle up to 64 SEIs, a set comes from the
AP and is wired while a second set comes from the CPs by the mean of
MSIs.
Required properties:
- compatible: should be one of:
* "marvell,ap806-sei"
- reg: SEI registers location and length.
- interrupts: identifies the parent IRQ that will be triggered.
- #interrupt-cells: number of cells to define an SEI wired interrupt
coming from the AP, should be 1. The cell is the IRQ
number.
- interrupt-controller: identifies the node as an interrupt controller
for AP interrupts.
- msi-controller: identifies the node as an MSI controller for the CPs
interrupts.
Example:
sei: interrupt-controller@3f0200 {
compatible = "marvell,ap806-sei";
reg = <0x3f0200 0x40>;
interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
#interrupt-cells = <1>;
interrupt-controller;
msi-controller;
};
...@@ -2,10 +2,12 @@ DT bindings for the R-Mobile/R-Car/RZ/G interrupt controller ...@@ -2,10 +2,12 @@ DT bindings for the R-Mobile/R-Car/RZ/G interrupt controller
Required properties: Required properties:
- compatible: has to be "renesas,irqc-<soctype>", "renesas,irqc" as fallback. - compatible: must be "renesas,irqc-<soctype>" or "renesas,intc-ex-<soctype>",
and "renesas,irqc" as fallback.
Examples with soctypes are: Examples with soctypes are:
- "renesas,irqc-r8a73a4" (R-Mobile APE6) - "renesas,irqc-r8a73a4" (R-Mobile APE6)
- "renesas,irqc-r8a7743" (RZ/G1M) - "renesas,irqc-r8a7743" (RZ/G1M)
- "renesas,irqc-r8a7744" (RZ/G1N)
- "renesas,irqc-r8a7745" (RZ/G1E) - "renesas,irqc-r8a7745" (RZ/G1E)
- "renesas,irqc-r8a77470" (RZ/G1C) - "renesas,irqc-r8a77470" (RZ/G1C)
- "renesas,irqc-r8a7790" (R-Car H2) - "renesas,irqc-r8a7790" (R-Car H2)
...@@ -19,6 +21,7 @@ Required properties: ...@@ -19,6 +21,7 @@ Required properties:
- "renesas,intc-ex-r8a77965" (R-Car M3-N) - "renesas,intc-ex-r8a77965" (R-Car M3-N)
- "renesas,intc-ex-r8a77970" (R-Car V3M) - "renesas,intc-ex-r8a77970" (R-Car V3M)
- "renesas,intc-ex-r8a77980" (R-Car V3H) - "renesas,intc-ex-r8a77980" (R-Car V3H)
- "renesas,intc-ex-r8a77990" (R-Car E3)
- "renesas,intc-ex-r8a77995" (R-Car D3) - "renesas,intc-ex-r8a77995" (R-Car D3)
- #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in - #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in
interrupts.txt in this directory interrupts.txt in this directory
......
...@@ -128,6 +128,7 @@ config ARCH_MVEBU ...@@ -128,6 +128,7 @@ config ARCH_MVEBU
select MVEBU_ICU select MVEBU_ICU
select MVEBU_ODMI select MVEBU_ODMI
select MVEBU_PIC select MVEBU_PIC
select MVEBU_SEI
select OF_GPIO select OF_GPIO
select PINCTRL select PINCTRL
select PINCTRL_ARMADA_37XX select PINCTRL_ARMADA_37XX
......
...@@ -321,11 +321,12 @@ void *platform_msi_get_host_data(struct irq_domain *domain) ...@@ -321,11 +321,12 @@ void *platform_msi_get_host_data(struct irq_domain *domain)
* Returns an irqdomain for @nvec interrupts * Returns an irqdomain for @nvec interrupts
*/ */
struct irq_domain * struct irq_domain *
platform_msi_create_device_domain(struct device *dev, __platform_msi_create_device_domain(struct device *dev,
unsigned int nvec, unsigned int nvec,
irq_write_msi_msg_t write_msi_msg, bool is_tree,
const struct irq_domain_ops *ops, irq_write_msi_msg_t write_msi_msg,
void *host_data) const struct irq_domain_ops *ops,
void *host_data)
{ {
struct platform_msi_priv_data *data; struct platform_msi_priv_data *data;
struct irq_domain *domain; struct irq_domain *domain;
...@@ -336,7 +337,8 @@ platform_msi_create_device_domain(struct device *dev, ...@@ -336,7 +337,8 @@ platform_msi_create_device_domain(struct device *dev,
return NULL; return NULL;
data->host_data = host_data; data->host_data = host_data;
domain = irq_domain_create_hierarchy(dev->msi_domain, 0, nvec, domain = irq_domain_create_hierarchy(dev->msi_domain, 0,
is_tree ? 0 : nvec,
dev->fwnode, ops, data); dev->fwnode, ops, data);
if (!domain) if (!domain)
goto free_priv; goto free_priv;
......
...@@ -310,6 +310,9 @@ config MVEBU_ODMI ...@@ -310,6 +310,9 @@ config MVEBU_ODMI
config MVEBU_PIC config MVEBU_PIC
bool bool
config MVEBU_SEI
bool
config LS_SCFG_MSI config LS_SCFG_MSI
def_bool y if SOC_LS1021A || ARCH_LAYERSCAPE def_bool y if SOC_LS1021A || ARCH_LAYERSCAPE
depends on PCI && PCI_MSI depends on PCI && PCI_MSI
......
...@@ -76,6 +76,7 @@ obj-$(CONFIG_MVEBU_GICP) += irq-mvebu-gicp.o ...@@ -76,6 +76,7 @@ obj-$(CONFIG_MVEBU_GICP) += irq-mvebu-gicp.o
obj-$(CONFIG_MVEBU_ICU) += irq-mvebu-icu.o obj-$(CONFIG_MVEBU_ICU) += irq-mvebu-icu.o
obj-$(CONFIG_MVEBU_ODMI) += irq-mvebu-odmi.o obj-$(CONFIG_MVEBU_ODMI) += irq-mvebu-odmi.o
obj-$(CONFIG_MVEBU_PIC) += irq-mvebu-pic.o obj-$(CONFIG_MVEBU_PIC) += irq-mvebu-pic.o
obj-$(CONFIG_MVEBU_SEI) += irq-mvebu-sei.o
obj-$(CONFIG_LS_SCFG_MSI) += irq-ls-scfg-msi.o obj-$(CONFIG_LS_SCFG_MSI) += irq-ls-scfg-msi.o
obj-$(CONFIG_EZNPS_GIC) += irq-eznps.o obj-$(CONFIG_EZNPS_GIC) += irq-eznps.o
obj-$(CONFIG_ARCH_ASPEED) += irq-aspeed-vic.o irq-aspeed-i2c-ic.o obj-$(CONFIG_ARCH_ASPEED) += irq-aspeed-vic.o irq-aspeed-i2c-ic.o
......
This diff is collapsed.
...@@ -348,48 +348,45 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs ...@@ -348,48 +348,45 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs
{ {
u32 irqnr; u32 irqnr;
do { irqnr = gic_read_iar();
irqnr = gic_read_iar();
if (likely(irqnr > 15 && irqnr < 1020) || irqnr >= 8192) { if (likely(irqnr > 15 && irqnr < 1020) || irqnr >= 8192) {
int err; int err;
if (static_branch_likely(&supports_deactivate_key)) if (static_branch_likely(&supports_deactivate_key))
gic_write_eoir(irqnr);
else
isb();
err = handle_domain_irq(gic_data.domain, irqnr, regs);
if (err) {
WARN_ONCE(true, "Unexpected interrupt received!\n");
if (static_branch_likely(&supports_deactivate_key)) {
if (irqnr < 8192)
gic_write_dir(irqnr);
} else {
gic_write_eoir(irqnr); gic_write_eoir(irqnr);
else
isb();
err = handle_domain_irq(gic_data.domain, irqnr, regs);
if (err) {
WARN_ONCE(true, "Unexpected interrupt received!\n");
if (static_branch_likely(&supports_deactivate_key)) {
if (irqnr < 8192)
gic_write_dir(irqnr);
} else {
gic_write_eoir(irqnr);
}
} }
continue;
} }
if (irqnr < 16) { return;
gic_write_eoir(irqnr); }
if (static_branch_likely(&supports_deactivate_key)) if (irqnr < 16) {
gic_write_dir(irqnr); gic_write_eoir(irqnr);
if (static_branch_likely(&supports_deactivate_key))
gic_write_dir(irqnr);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* /*
* Unlike GICv2, we don't need an smp_rmb() here. * Unlike GICv2, we don't need an smp_rmb() here.
* The control dependency from gic_read_iar to * The control dependency from gic_read_iar to
* the ISB in gic_write_eoir is enough to ensure * the ISB in gic_write_eoir is enough to ensure
* that any shared data read by handle_IPI will * that any shared data read by handle_IPI will
* be read after the ACK. * be read after the ACK.
*/ */
handle_IPI(irqnr, regs); handle_IPI(irqnr, regs);
#else #else
WARN_ONCE(true, "Unexpected SGI received!\n"); WARN_ONCE(true, "Unexpected SGI received!\n");
#endif #endif
continue; }
}
} while (irqnr != ICC_IAR1_EL1_SPURIOUS);
} }
static void __init gic_dist_init(void) static void __init gic_dist_init(void)
...@@ -653,7 +650,9 @@ early_param("irqchip.gicv3_nolpi", gicv3_nolpi_cfg); ...@@ -653,7 +650,9 @@ early_param("irqchip.gicv3_nolpi", gicv3_nolpi_cfg);
static int gic_dist_supports_lpis(void) static int gic_dist_supports_lpis(void)
{ {
return !!(readl_relaxed(gic_data.dist_base + GICD_TYPER) & GICD_TYPER_LPIS) && !gicv3_nolpi; return (IS_ENABLED(CONFIG_ARM_GIC_V3_ITS) &&
!!(readl_relaxed(gic_data.dist_base + GICD_TYPER) & GICD_TYPER_LPIS) &&
!gicv3_nolpi);
} }
static void gic_cpu_init(void) static void gic_cpu_init(void)
...@@ -673,10 +672,6 @@ static void gic_cpu_init(void) ...@@ -673,10 +672,6 @@ static void gic_cpu_init(void)
gic_cpu_config(rbase, gic_redist_wait_for_rwp); gic_cpu_config(rbase, gic_redist_wait_for_rwp);
/* Give LPIs a spin */
if (IS_ENABLED(CONFIG_ARM_GIC_V3_ITS) && gic_dist_supports_lpis())
its_cpu_init();
/* initialise system registers */ /* initialise system registers */
gic_cpu_sys_reg_init(); gic_cpu_sys_reg_init();
} }
...@@ -689,6 +684,10 @@ static void gic_cpu_init(void) ...@@ -689,6 +684,10 @@ static void gic_cpu_init(void)
static int gic_starting_cpu(unsigned int cpu) static int gic_starting_cpu(unsigned int cpu)
{ {
gic_cpu_init(); gic_cpu_init();
if (gic_dist_supports_lpis())
its_cpu_init();
return 0; return 0;
} }
...@@ -1127,14 +1126,16 @@ static int __init gic_init_bases(void __iomem *dist_base, ...@@ -1127,14 +1126,16 @@ static int __init gic_init_bases(void __iomem *dist_base,
gic_update_vlpi_properties(); gic_update_vlpi_properties();
if (IS_ENABLED(CONFIG_ARM_GIC_V3_ITS) && gic_dist_supports_lpis())
its_init(handle, &gic_data.rdists, gic_data.domain);
gic_smp_init(); gic_smp_init();
gic_dist_init(); gic_dist_init();
gic_cpu_init(); gic_cpu_init();
gic_cpu_pm_init(); gic_cpu_pm_init();
if (gic_dist_supports_lpis()) {
its_init(handle, &gic_data.rdists, gic_data.domain);
its_cpu_init();
}
return 0; return 0;
out_free: out_free:
......
This diff is collapsed.
This diff is collapsed.
...@@ -124,6 +124,7 @@ static int qcom_pdc_gic_set_type(struct irq_data *d, unsigned int type) ...@@ -124,6 +124,7 @@ static int qcom_pdc_gic_set_type(struct irq_data *d, unsigned int type)
break; break;
case IRQ_TYPE_EDGE_BOTH: case IRQ_TYPE_EDGE_BOTH:
pdc_type = PDC_EDGE_DUAL; pdc_type = PDC_EDGE_DUAL;
type = IRQ_TYPE_EDGE_RISING;
break; break;
case IRQ_TYPE_LEVEL_HIGH: case IRQ_TYPE_LEVEL_HIGH:
pdc_type = PDC_LEVEL_HIGH; pdc_type = PDC_LEVEL_HIGH;
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
* IRQF_PERCPU - Interrupt is per cpu * IRQF_PERCPU - Interrupt is per cpu
* IRQF_NOBALANCING - Flag to exclude this interrupt from irq balancing * IRQF_NOBALANCING - Flag to exclude this interrupt from irq balancing
* IRQF_IRQPOLL - Interrupt is used for polling (only the interrupt that is * IRQF_IRQPOLL - Interrupt is used for polling (only the interrupt that is
* registered first in an shared interrupt is considered for * registered first in a shared interrupt is considered for
* performance reasons) * performance reasons)
* IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished. * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished.
* Used by threaded interrupts which need to keep the * Used by threaded interrupts which need to keep the
......
...@@ -13,6 +13,12 @@ ...@@ -13,6 +13,12 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#define GICD_INT_DEF_PRI 0xa0
#define GICD_INT_DEF_PRI_X4 ((GICD_INT_DEF_PRI << 24) |\
(GICD_INT_DEF_PRI << 16) |\
(GICD_INT_DEF_PRI << 8) |\
GICD_INT_DEF_PRI)
enum gic_type { enum gic_type {
GIC_V2, GIC_V2,
GIC_V3, GIC_V3,
......
...@@ -585,8 +585,10 @@ struct rdists { ...@@ -585,8 +585,10 @@ struct rdists {
void __iomem *rd_base; void __iomem *rd_base;
struct page *pend_page; struct page *pend_page;
phys_addr_t phys_base; phys_addr_t phys_base;
bool lpi_enabled;
} __percpu *rdist; } __percpu *rdist;
struct page *prop_page; phys_addr_t prop_table_pa;
void *prop_table_va;
u64 flags; u64 flags;
u32 gicd_typer; u32 gicd_typer;
bool has_vlpis; bool has_vlpis;
......
...@@ -65,11 +65,6 @@ ...@@ -65,11 +65,6 @@
#define GICD_INT_EN_CLR_X32 0xffffffff #define GICD_INT_EN_CLR_X32 0xffffffff
#define GICD_INT_EN_SET_SGI 0x0000ffff #define GICD_INT_EN_SET_SGI 0x0000ffff
#define GICD_INT_EN_CLR_PPI 0xffff0000 #define GICD_INT_EN_CLR_PPI 0xffff0000
#define GICD_INT_DEF_PRI 0xa0
#define GICD_INT_DEF_PRI_X4 ((GICD_INT_DEF_PRI << 24) |\
(GICD_INT_DEF_PRI << 16) |\
(GICD_INT_DEF_PRI << 8) |\
GICD_INT_DEF_PRI)
#define GICD_IIDR_IMPLEMENTER_SHIFT 0 #define GICD_IIDR_IMPLEMENTER_SHIFT 0
#define GICD_IIDR_IMPLEMENTER_MASK (0xfff << GICD_IIDR_IMPLEMENTER_SHIFT) #define GICD_IIDR_IMPLEMENTER_MASK (0xfff << GICD_IIDR_IMPLEMENTER_SHIFT)
......
...@@ -75,6 +75,7 @@ struct irq_fwspec { ...@@ -75,6 +75,7 @@ struct irq_fwspec {
enum irq_domain_bus_token { enum irq_domain_bus_token {
DOMAIN_BUS_ANY = 0, DOMAIN_BUS_ANY = 0,
DOMAIN_BUS_WIRED, DOMAIN_BUS_WIRED,
DOMAIN_BUS_GENERIC_MSI,
DOMAIN_BUS_PCI_MSI, DOMAIN_BUS_PCI_MSI,
DOMAIN_BUS_PLATFORM_MSI, DOMAIN_BUS_PLATFORM_MSI,
DOMAIN_BUS_NEXUS, DOMAIN_BUS_NEXUS,
......
...@@ -317,11 +317,18 @@ int msi_domain_prepare_irqs(struct irq_domain *domain, struct device *dev, ...@@ -317,11 +317,18 @@ int msi_domain_prepare_irqs(struct irq_domain *domain, struct device *dev,
int msi_domain_populate_irqs(struct irq_domain *domain, struct device *dev, int msi_domain_populate_irqs(struct irq_domain *domain, struct device *dev,
int virq, int nvec, msi_alloc_info_t *args); int virq, int nvec, msi_alloc_info_t *args);
struct irq_domain * struct irq_domain *
platform_msi_create_device_domain(struct device *dev, __platform_msi_create_device_domain(struct device *dev,
unsigned int nvec, unsigned int nvec,
irq_write_msi_msg_t write_msi_msg, bool is_tree,
const struct irq_domain_ops *ops, irq_write_msi_msg_t write_msi_msg,
void *host_data); const struct irq_domain_ops *ops,
void *host_data);
#define platform_msi_create_device_domain(dev, nvec, write, ops, data) \
__platform_msi_create_device_domain(dev, nvec, false, write, ops, data)
#define platform_msi_create_device_tree_domain(dev, nvec, write, ops, data) \
__platform_msi_create_device_domain(dev, nvec, true, write, ops, data)
int platform_msi_domain_alloc(struct irq_domain *domain, unsigned int virq, int platform_msi_domain_alloc(struct irq_domain *domain, unsigned int virq,
unsigned int nr_irqs); unsigned int nr_irqs);
void platform_msi_domain_free(struct irq_domain *domain, unsigned int virq, void platform_msi_domain_free(struct irq_domain *domain, unsigned int virq,
......
...@@ -183,7 +183,7 @@ struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size, ...@@ -183,7 +183,7 @@ struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size,
* unhappy about. Replace them with ':', which does * unhappy about. Replace them with ':', which does
* the trick and is not as offensive as '\'... * the trick and is not as offensive as '\'...
*/ */
name = kstrdup(of_node_full_name(of_node), GFP_KERNEL); name = kasprintf(GFP_KERNEL, "%pOF", of_node);
if (!name) { if (!name) {
kfree(domain); kfree(domain);
return NULL; return NULL;
...@@ -867,7 +867,7 @@ void irq_dispose_mapping(unsigned int virq) ...@@ -867,7 +867,7 @@ void irq_dispose_mapping(unsigned int virq)
EXPORT_SYMBOL_GPL(irq_dispose_mapping); EXPORT_SYMBOL_GPL(irq_dispose_mapping);
/** /**
* irq_find_mapping() - Find a linux irq from an hw irq number. * irq_find_mapping() - Find a linux irq from a hw irq number.
* @domain: domain owning this hardware interrupt * @domain: domain owning this hardware interrupt
* @hwirq: hardware irq number in that domain space * @hwirq: hardware irq number in that domain space
*/ */
...@@ -1741,6 +1741,7 @@ static void debugfs_add_domain_dir(struct irq_domain *d) ...@@ -1741,6 +1741,7 @@ static void debugfs_add_domain_dir(struct irq_domain *d)
static void debugfs_remove_domain_dir(struct irq_domain *d) static void debugfs_remove_domain_dir(struct irq_domain *d)
{ {
debugfs_remove(d->debugfs_file); debugfs_remove(d->debugfs_file);
d->debugfs_file = NULL;
} }
void __init irq_domain_debugfs_init(struct dentry *root) void __init irq_domain_debugfs_init(struct dentry *root)
......
...@@ -927,6 +927,9 @@ irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action) ...@@ -927,6 +927,9 @@ irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action)
local_bh_disable(); local_bh_disable();
ret = action->thread_fn(action->irq, action->dev_id); ret = action->thread_fn(action->irq, action->dev_id);
if (ret == IRQ_HANDLED)
atomic_inc(&desc->threads_handled);
irq_finalize_oneshot(desc, action); irq_finalize_oneshot(desc, action);
local_bh_enable(); local_bh_enable();
return ret; return ret;
...@@ -943,6 +946,9 @@ static irqreturn_t irq_thread_fn(struct irq_desc *desc, ...@@ -943,6 +946,9 @@ static irqreturn_t irq_thread_fn(struct irq_desc *desc,
irqreturn_t ret; irqreturn_t ret;
ret = action->thread_fn(action->irq, action->dev_id); ret = action->thread_fn(action->irq, action->dev_id);
if (ret == IRQ_HANDLED)
atomic_inc(&desc->threads_handled);
irq_finalize_oneshot(desc, action); irq_finalize_oneshot(desc, action);
return ret; return ret;
} }
...@@ -1020,8 +1026,6 @@ static int irq_thread(void *data) ...@@ -1020,8 +1026,6 @@ static int irq_thread(void *data)
irq_thread_check_affinity(desc, action); irq_thread_check_affinity(desc, action);
action_ret = handler_fn(desc, action); action_ret = handler_fn(desc, action);
if (action_ret == IRQ_HANDLED)
atomic_inc(&desc->threads_handled);
if (action_ret == IRQ_WAKE_THREAD) if (action_ret == IRQ_WAKE_THREAD)
irq_wake_secondary(desc, action); irq_wake_secondary(desc, action);
......
...@@ -257,9 +257,9 @@ asmlinkage __visible void __softirq_entry __do_softirq(void) ...@@ -257,9 +257,9 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)
int softirq_bit; int softirq_bit;
/* /*
* Mask out PF_MEMALLOC s current task context is borrowed for the * Mask out PF_MEMALLOC as the current task context is borrowed for the
* softirq. A softirq handled such as network RX might set PF_MEMALLOC * softirq. A softirq handled, such as network RX, might set PF_MEMALLOC
* again if the socket is related to swap * again if the socket is related to swapping.
*/ */
current->flags &= ~PF_MEMALLOC; current->flags &= ~PF_MEMALLOC;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment