You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq updates from Thomas Gleixner:
"This updated pull request does not contain the last few GIC related
patches which were reported to cause a regression. There is a fix
available, but I let it breed for a couple of days first.
The irq departement provides:
- new infrastructure to support non PCI based MSI interrupts
- a couple of new irq chip drivers
- the usual pile of fixlets and updates to irq chip drivers
- preparatory changes for removal of the irq argument from interrupt
flow handlers
- preparatory changes to remove IRQF_VALID"
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (129 commits)
irqchip/imx-gpcv2: IMX GPCv2 driver for wakeup sources
irqchip: Add bcm2836 interrupt controller for Raspberry Pi 2
irqchip: Add documentation for the bcm2836 interrupt controller
irqchip/bcm2835: Add support for being used as a second level controller
irqchip/bcm2835: Refactor handle_IRQ() calls out of MAKE_HWIRQ
PCI: xilinx: Fix typo in function name
irqchip/gic: Ensure gic_cpu_if_up/down() programs correct GIC instance
irqchip/gic: Only allow the primary GIC to set the CPU map
PCI/MSI: pci-xgene-msi: Consolidate chained IRQ handler install/remove
unicore32/irq: Prepare puv3_gpio_handler for irq argument removal
tile/pci_gx: Prepare trio_handle_level_irq for irq argument removal
m68k/irq: Prepare irq handlers for irq argument removal
C6X/megamode-pic: Prepare megamod_irq_cascade for irq argument removal
blackfin: Prepare irq handlers for irq argument removal
arc/irq: Prepare idu_cascade_isr for irq argument removal
sparc/irq: Use access helper irq_data_get_affinity_mask()
sparc/irq: Use helper irq_data_get_irq_handler_data()
parisc/irq: Use access helper irq_data_get_affinity_mask()
mn10300/irq: Use access helper irq_data_get_affinity_mask()
irqchip/i8259: Prepare i8259_irq_dispatch for irq argument removal
...
This commit is contained in:
@@ -5,9 +5,14 @@ The BCM2835 contains a custom top-level interrupt controller, which supports
|
||||
controller, or the HW block containing it, is referred to occasionally
|
||||
as "armctrl" in the SoC documentation, hence naming of this binding.
|
||||
|
||||
The BCM2836 contains the same interrupt controller with the same
|
||||
interrupts, but the per-CPU interrupt controller is the root, and an
|
||||
interrupt there indicates that the ARMCTRL has an interrupt to handle.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : should be "brcm,bcm2835-armctrl-ic"
|
||||
- compatible : should be "brcm,bcm2835-armctrl-ic" or
|
||||
"brcm,bcm2836-armctrl-ic"
|
||||
- reg : Specifies base physical address and size of the registers.
|
||||
- interrupt-controller : Identifies the node as an interrupt controller
|
||||
- #interrupt-cells : Specifies the number of cells needed to encode an
|
||||
@@ -20,6 +25,12 @@ Required properties:
|
||||
The 2nd cell contains the interrupt number within the bank. Valid values
|
||||
are 0..7 for bank 0, and 0..31 for bank 1.
|
||||
|
||||
Additional required properties for brcm,bcm2836-armctrl-ic:
|
||||
- interrupt-parent : Specifies the parent interrupt controller when this
|
||||
controller is the second level.
|
||||
- interrupts : Specifies the interrupt on the parent for this interrupt
|
||||
controller to handle.
|
||||
|
||||
The interrupt sources are as follows:
|
||||
|
||||
Bank 0:
|
||||
@@ -102,9 +113,21 @@ Bank 2:
|
||||
|
||||
Example:
|
||||
|
||||
/* BCM2835, first level */
|
||||
intc: interrupt-controller {
|
||||
compatible = "brcm,bcm2835-armctrl-ic";
|
||||
reg = <0x7e00b200 0x200>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
};
|
||||
|
||||
/* BCM2836, second level */
|
||||
intc: interrupt-controller {
|
||||
compatible = "brcm,bcm2836-armctrl-ic";
|
||||
reg = <0x7e00b200 0x200>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
interrupt-parent = <&local_intc>;
|
||||
interrupts = <8>;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
BCM2836 per-CPU interrupt controller
|
||||
|
||||
The BCM2836 has a per-cpu interrupt controller for the timer, PMU
|
||||
events, and SMP IPIs. One of the CPUs may receive interrupts for the
|
||||
peripheral (GPU) events, which chain to the BCM2835-style interrupt
|
||||
controller.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: Should be "brcm,bcm2836-l1-intc"
|
||||
- reg: Specifies base physical address and size of the
|
||||
registers
|
||||
- interrupt-controller: Identifies the node as an interrupt controller
|
||||
- #interrupt-cells: Specifies the number of cells needed to encode an
|
||||
interrupt source. The value shall be 1
|
||||
|
||||
Please refer to interrupts.txt in this directory for details of the common
|
||||
Interrupt Controllers bindings used by client devices.
|
||||
|
||||
The interrupt sources are as follows:
|
||||
|
||||
0: CNTPSIRQ
|
||||
1: CNTPNSIRQ
|
||||
2: CNTHPIRQ
|
||||
3: CNTVIRQ
|
||||
8: GPU_FAST
|
||||
9: PMU_FAST
|
||||
|
||||
Example:
|
||||
|
||||
local_intc: local_intc {
|
||||
compatible = "brcm,bcm2836-l1-intc";
|
||||
reg = <0x40000000 0x100>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-parent = <&local_intc>;
|
||||
};
|
||||
@@ -59,7 +59,7 @@ int irq_select_affinity(unsigned int irq)
|
||||
cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
|
||||
last_cpu = cpu;
|
||||
|
||||
cpumask_copy(data->affinity, cpumask_of(cpu));
|
||||
cpumask_copy(irq_data_get_affinity_mask(data), cpumask_of(cpu));
|
||||
chip->irq_set_affinity(data, cpumask_of(cpu), false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -252,9 +252,10 @@ static struct irq_chip idu_irq_chip = {
|
||||
|
||||
static int idu_first_irq;
|
||||
|
||||
static void idu_cascade_isr(unsigned int core_irq, struct irq_desc *desc)
|
||||
static void idu_cascade_isr(unsigned int __core_irq, struct irq_desc *desc)
|
||||
{
|
||||
struct irq_domain *domain = irq_desc_get_handler_data(desc);
|
||||
unsigned int core_irq = irq_desc_get_irq(desc);
|
||||
unsigned int idu_irq;
|
||||
|
||||
idu_irq = core_irq - idu_first_irq;
|
||||
|
||||
@@ -62,8 +62,6 @@ static void __init r8a7779_map_io(void)
|
||||
|
||||
static void __init r8a7779_init_irq_dt(void)
|
||||
{
|
||||
gic_set_irqchip_flags(IRQCHIP_SKIP_SET_WAKE);
|
||||
|
||||
irqchip_init();
|
||||
|
||||
/* route all interrupts to ARM */
|
||||
|
||||
@@ -56,7 +56,6 @@ void __init ux500_init_irq(void)
|
||||
struct device_node *np;
|
||||
struct resource r;
|
||||
|
||||
gic_set_irqchip_flags(IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND);
|
||||
irqchip_init();
|
||||
np = of_find_compatible_node(NULL, NULL, "stericsson,db8500-prcmu");
|
||||
of_address_to_resource(np, 0, &r);
|
||||
|
||||
@@ -80,7 +80,7 @@ static void tc2_pm_cpu_powerdown_prepare(unsigned int cpu, unsigned int cluster)
|
||||
* to the CPU by disabling the GIC CPU IF to prevent wfi
|
||||
* from completing execution behind power controller back
|
||||
*/
|
||||
gic_cpu_if_down();
|
||||
gic_cpu_if_down(0);
|
||||
}
|
||||
|
||||
static void tc2_pm_cluster_powerdown_prepare(unsigned int cluster)
|
||||
|
||||
@@ -186,7 +186,6 @@ static void __init zynq_map_io(void)
|
||||
|
||||
static void __init zynq_irq_init(void)
|
||||
{
|
||||
gic_set_irqchip_flags(IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND);
|
||||
irqchip_init();
|
||||
}
|
||||
|
||||
|
||||
@@ -128,9 +128,9 @@ static int eic_set_irq_type(struct irq_data *d, unsigned int flow_type)
|
||||
|
||||
irqd_set_trigger_type(d, flow_type);
|
||||
if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
|
||||
__irq_set_handler_locked(irq, handle_level_irq);
|
||||
irq_set_handler_locked(d, handle_level_irq);
|
||||
else
|
||||
__irq_set_handler_locked(irq, handle_edge_irq);
|
||||
irq_set_handler_locked(d, handle_edge_irq);
|
||||
|
||||
return IRQ_SET_MASK_OK_NOCOPY;
|
||||
}
|
||||
|
||||
@@ -286,7 +286,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
|
||||
struct pio_device *pio = irq_desc_get_chip_data(desc);
|
||||
unsigned gpio_irq;
|
||||
|
||||
gpio_irq = (unsigned) irq_get_handler_data(irq);
|
||||
gpio_irq = (unsigned) irq_desc_get_handler_data(desc);
|
||||
for (;;) {
|
||||
u32 isr;
|
||||
|
||||
@@ -312,7 +312,6 @@ gpio_irq_setup(struct pio_device *pio, int irq, int gpio_irq)
|
||||
unsigned i;
|
||||
|
||||
irq_set_chip_data(irq, pio);
|
||||
irq_set_handler_data(irq, (void *)gpio_irq);
|
||||
|
||||
for (i = 0; i < 32; i++, gpio_irq++) {
|
||||
irq_set_chip_data(gpio_irq, pio);
|
||||
@@ -320,7 +319,8 @@ gpio_irq_setup(struct pio_device *pio, int irq, int gpio_irq)
|
||||
handle_simple_irq);
|
||||
}
|
||||
|
||||
irq_set_chained_handler(irq, gpio_irq_handler);
|
||||
irq_set_chained_handler_and_data(irq, gpio_irq_handler,
|
||||
(void *)gpio_irq);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
@@ -182,9 +182,11 @@ static struct irq_chip bf537_mac_rx_irqchip = {
|
||||
.irq_unmask = bf537_mac_rx_unmask_irq,
|
||||
};
|
||||
|
||||
static void bf537_demux_mac_rx_irq(unsigned int int_irq,
|
||||
static void bf537_demux_mac_rx_irq(unsigned int __int_irq,
|
||||
struct irq_desc *desc)
|
||||
{
|
||||
unsigned int int_irq = irq_desc_get_irq(desc);
|
||||
|
||||
if (bfin_read_DMA1_IRQ_STATUS() & (DMA_DONE | DMA_ERR))
|
||||
bfin_handle_irq(IRQ_MAC_RX);
|
||||
else
|
||||
|
||||
@@ -194,7 +194,8 @@ void bfin_internal_unmask_irq(unsigned int irq)
|
||||
#ifdef CONFIG_SMP
|
||||
static void bfin_internal_unmask_irq_chip(struct irq_data *d)
|
||||
{
|
||||
bfin_internal_unmask_irq_affinity(d->irq, d->affinity);
|
||||
bfin_internal_unmask_irq_affinity(d->irq,
|
||||
irq_data_get_affinity_mask(d));
|
||||
}
|
||||
|
||||
static int bfin_internal_set_affinity(struct irq_data *d,
|
||||
@@ -685,12 +686,12 @@ void bfin_demux_mac_status_irq(unsigned int int_err_irq,
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void bfin_set_irq_handler(unsigned irq, irq_flow_handler_t handle)
|
||||
static inline void bfin_set_irq_handler(struct irq_data *d, irq_flow_handler_t handle)
|
||||
{
|
||||
#ifdef CONFIG_IPIPE
|
||||
handle = handle_level_irq;
|
||||
#endif
|
||||
__irq_set_handler_locked(irq, handle);
|
||||
irq_set_handler_locked(d, handle);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_GPIO_ADI
|
||||
@@ -802,9 +803,9 @@ static int bfin_gpio_irq_type(struct irq_data *d, unsigned int type)
|
||||
}
|
||||
|
||||
if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING))
|
||||
bfin_set_irq_handler(irq, handle_edge_irq);
|
||||
bfin_set_irq_handler(d, handle_edge_irq);
|
||||
else
|
||||
bfin_set_irq_handler(irq, handle_level_irq);
|
||||
bfin_set_irq_handler(d, handle_level_irq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -824,9 +825,9 @@ static void bfin_demux_gpio_block(unsigned int irq)
|
||||
}
|
||||
}
|
||||
|
||||
void bfin_demux_gpio_irq(unsigned int inta_irq,
|
||||
struct irq_desc *desc)
|
||||
void bfin_demux_gpio_irq(unsigned int __inta_irq, struct irq_desc *desc)
|
||||
{
|
||||
unsigned int inta_irq = irq_desc_get_irq(desc);
|
||||
unsigned int irq;
|
||||
|
||||
switch (inta_irq) {
|
||||
|
||||
@@ -93,10 +93,11 @@ static struct irq_chip megamod_chip = {
|
||||
.irq_unmask = unmask_megamod,
|
||||
};
|
||||
|
||||
static void megamod_irq_cascade(unsigned int irq, struct irq_desc *desc)
|
||||
static void megamod_irq_cascade(unsigned int __irq, struct irq_desc *desc)
|
||||
{
|
||||
struct megamod_cascade_data *cascade;
|
||||
struct megamod_pic *pic;
|
||||
unsigned int irq;
|
||||
u32 events;
|
||||
int n, idx;
|
||||
|
||||
@@ -282,8 +283,8 @@ static struct megamod_pic * __init init_megamod_pic(struct device_node *np)
|
||||
soc_writel(~0, &pic->regs->evtmask[i]);
|
||||
soc_writel(~0, &pic->regs->evtclr[i]);
|
||||
|
||||
irq_set_handler_data(irq, &cascade_data[i]);
|
||||
irq_set_chained_handler(irq, megamod_irq_cascade);
|
||||
irq_set_chained_handler_and_data(irq, megamod_irq_cascade,
|
||||
&cascade_data[i]);
|
||||
}
|
||||
|
||||
/* Finally, set up the MUX registers */
|
||||
|
||||
@@ -610,9 +610,9 @@ register_intr (unsigned int gsi, int irq, unsigned char delivery,
|
||||
chip->name, irq_type->name);
|
||||
chip = irq_type;
|
||||
}
|
||||
__irq_set_chip_handler_name_locked(irq, chip, trigger == IOSAPIC_EDGE ?
|
||||
handle_edge_irq : handle_level_irq,
|
||||
NULL);
|
||||
irq_set_chip_handler_name_locked(irq_get_irq_data(irq), chip,
|
||||
trigger == IOSAPIC_EDGE ? handle_edge_irq : handle_level_irq,
|
||||
NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -838,7 +838,7 @@ iosapic_unregister_intr (unsigned int gsi)
|
||||
if (iosapic_intr_info[irq].count == 0) {
|
||||
#ifdef CONFIG_SMP
|
||||
/* Clear affinity */
|
||||
cpumask_setall(irq_get_irq_data(irq)->affinity);
|
||||
cpumask_setall(irq_get_affinity_mask(irq));
|
||||
#endif
|
||||
/* Clear the interrupt information */
|
||||
iosapic_intr_info[irq].dest = 0;
|
||||
|
||||
@@ -67,7 +67,7 @@ static char irq_redir [NR_IRQS]; // = { [0 ... NR_IRQS-1] = 1 };
|
||||
void set_irq_affinity_info (unsigned int irq, int hwid, int redir)
|
||||
{
|
||||
if (irq < NR_IRQS) {
|
||||
cpumask_copy(irq_get_irq_data(irq)->affinity,
|
||||
cpumask_copy(irq_get_affinity_mask(irq),
|
||||
cpumask_of(cpu_logical_id(hwid)));
|
||||
irq_redir[irq] = (char) (redir & 0xff);
|
||||
}
|
||||
@@ -119,8 +119,8 @@ static void migrate_irqs(void)
|
||||
if (irqd_is_per_cpu(data))
|
||||
continue;
|
||||
|
||||
if (cpumask_any_and(data->affinity, cpu_online_mask)
|
||||
>= nr_cpu_ids) {
|
||||
if (cpumask_any_and(irq_data_get_affinity_mask(data),
|
||||
cpu_online_mask) >= nr_cpu_ids) {
|
||||
/*
|
||||
* Save it for phase 2 processing
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,7 @@ static int ia64_set_msi_irq_affinity(struct irq_data *idata,
|
||||
if (irq_prepare_move(irq, cpu))
|
||||
return -1;
|
||||
|
||||
__get_cached_msi_msg(idata->msi_desc, &msg);
|
||||
__get_cached_msi_msg(irq_data_get_msi_desc(idata), &msg);
|
||||
|
||||
addr = msg.address_lo;
|
||||
addr &= MSI_ADDR_DEST_ID_MASK;
|
||||
@@ -36,7 +36,7 @@ static int ia64_set_msi_irq_affinity(struct irq_data *idata,
|
||||
msg.data = data;
|
||||
|
||||
pci_write_msi_msg(irq, &msg);
|
||||
cpumask_copy(idata->affinity, cpumask_of(cpu));
|
||||
cpumask_copy(irq_data_get_affinity_mask(idata), cpumask_of(cpu));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ static int dmar_msi_set_affinity(struct irq_data *data,
|
||||
msg.address_lo |= MSI_ADDR_DEST_ID_CPU(cpu_physical_id(cpu));
|
||||
|
||||
dmar_msi_write(irq, &msg);
|
||||
cpumask_copy(data->affinity, mask);
|
||||
cpumask_copy(irq_data_get_affinity_mask(data), mask);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ static int sn_set_msi_irq_affinity(struct irq_data *data,
|
||||
* Release XIO resources for the old MSI PCI address
|
||||
*/
|
||||
|
||||
__get_cached_msi_msg(data->msi_desc, &msg);
|
||||
__get_cached_msi_msg(irq_data_get_msi_desc(data), &msg);
|
||||
sn_pdev = (struct pcidev_info *)sn_irq_info->irq_pciioinfo;
|
||||
pdev = sn_pdev->pdi_linux_pcidev;
|
||||
provider = SN_PCIDEV_BUSPROVIDER(pdev);
|
||||
@@ -206,7 +206,7 @@ static int sn_set_msi_irq_affinity(struct irq_data *data,
|
||||
msg.address_lo = (u32)(bus_addr & 0x00000000ffffffff);
|
||||
|
||||
pci_write_msi_msg(irq, &msg);
|
||||
cpumask_copy(data->affinity, cpu_mask);
|
||||
cpumask_copy(irq_data_get_affinity_mask(data), cpu_mask);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -143,8 +143,10 @@ static int intc_irq_set_type(struct irq_data *d, unsigned int type)
|
||||
* We need to be careful with the masking/acking due to the side effects
|
||||
* of masking an interrupt.
|
||||
*/
|
||||
static void intc_external_irq(unsigned int irq, struct irq_desc *desc)
|
||||
static void intc_external_irq(unsigned int __irq, struct irq_desc *desc)
|
||||
{
|
||||
unsigned int irq = irq_desc_get_irq(desc);
|
||||
|
||||
irq_desc_get_chip(desc)->irq_ack(&desc->irq_data);
|
||||
handle_simple_irq(irq, desc);
|
||||
}
|
||||
|
||||
+4
-2
@@ -63,13 +63,15 @@ void __init oss_nubus_init(void)
|
||||
* Handle miscellaneous OSS interrupts.
|
||||
*/
|
||||
|
||||
static void oss_irq(unsigned int irq, struct irq_desc *desc)
|
||||
static void oss_irq(unsigned int __irq, struct irq_desc *desc)
|
||||
{
|
||||
int events = oss->irq_pending &
|
||||
(OSS_IP_IOPSCC | OSS_IP_SCSI | OSS_IP_IOPISM);
|
||||
(OSS_IP_IOPSCC | OSS_IP_SCSI | OSS_IP_IOPISM);
|
||||
|
||||
#ifdef DEBUG_IRQS
|
||||
if ((console_loglevel == 10) && !(events & OSS_IP_SCSI)) {
|
||||
unsigned int irq = irq_desc_get_irq(desc);
|
||||
|
||||
printk("oss_irq: irq %u events = 0x%04X\n", irq,
|
||||
(int) oss->irq_pending);
|
||||
}
|
||||
|
||||
+2
-1
@@ -113,9 +113,10 @@ void __init psc_init(void)
|
||||
* PSC interrupt handler. It's a lot like the VIA interrupt handler.
|
||||
*/
|
||||
|
||||
static void psc_irq(unsigned int irq, struct irq_desc *desc)
|
||||
static void psc_irq(unsigned int __irq, struct irq_desc *desc)
|
||||
{
|
||||
unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc);
|
||||
unsigned int irq = irq_desc_get_irq(desc);
|
||||
int pIFR = pIFRbase + offset;
|
||||
int pIER = pIERbase + offset;
|
||||
int irq_num;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user