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 into next
Pull core irq updates from Thomas Gleixner:
"The irq department delivers:
- Another tree wide update to get rid of the horrible create_irq
interface along with its even more horrible variants. That also
gets rid of the last leftovers of the initial sparse irq hackery.
arch/driver specific changes have been either acked or ignored.
- A fix for the spurious interrupt detection logic with threaded
interrupts.
- A new ARM SoC interrupt controller
- The usual pile of fixes and improvements all over the place"
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits)
Documentation: brcmstb-l2: Add Broadcom STB Level-2 interrupt controller binding
irqchip: brcmstb-l2: Add Broadcom Set Top Box Level-2 interrupt controller
genirq: Improve documentation to match current implementation
ARM: iop13xx: fix msi support with sparse IRQ
genirq: Provide !SMP stub for irq_set_affinity_notifier()
irqchip: armada-370-xp: Move the devicetree binding documentation
irqchip: gic: Use mask field in GICC_IAR
genirq: Remove dynamic_irq mess
ia64: Use irq_init_desc
genirq: Replace dynamic_irq_init/cleanup
genirq: Remove irq_reserve_irq[s]
genirq: Replace reserve_irqs in core code
s390: Avoid call to irq_reserve_irqs()
s390: Remove pointless arch_show_interrupts()
s390: pci: Check return value of alloc_irq_desc() proper
sh: intc: Remove pointless irq_reserve_irqs() invocation
x86, irq: Remove pointless irq_reserve_irqs() call
genirq: Make create/destroy_irq() ia64 private
tile: Use SPARSE_IRQ
tile: pci: Use irq_alloc/free_hwirq()
...
This commit is contained in:
@@ -41,8 +41,7 @@ An interrupt controller driver creates and registers an irq_domain by
|
||||
calling one of the irq_domain_add_*() functions (each mapping method
|
||||
has a different allocator function, more on that later). The function
|
||||
will return a pointer to the irq_domain on success. The caller must
|
||||
provide the allocator function with an irq_domain_ops structure with
|
||||
the .map callback populated as a minimum.
|
||||
provide the allocator function with an irq_domain_ops structure.
|
||||
|
||||
In most cases, the irq_domain will begin empty without any mappings
|
||||
between hwirq and IRQ numbers. Mappings are added to the irq_domain
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
Broadcom Generic Level 2 Interrupt Controller
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: should be "brcm,l2-intc"
|
||||
- reg: specifies the 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. Should be 1.
|
||||
- interrupt-parent: specifies the phandle to the parent interrupt controller
|
||||
this controller is cacaded from
|
||||
- interrupts: specifies the interrupt line in the interrupt-parent irq space
|
||||
to be used for cascading
|
||||
|
||||
Optional properties:
|
||||
|
||||
- brcm,irq-can-wake: If present, this means the L2 controller can be used as a
|
||||
wakeup source for system suspend/resume.
|
||||
|
||||
Example:
|
||||
|
||||
hif_intr2_intc: interrupt-controller@f0441000 {
|
||||
compatible = "brcm,l2-intc";
|
||||
reg = <0xf0441000 0x30>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-parent = <&intc>;
|
||||
interrupts = <0x0 0x20 0x0>;
|
||||
};
|
||||
@@ -480,6 +480,7 @@ config ARCH_IOP13XX
|
||||
select PCI
|
||||
select PLAT_IOP
|
||||
select VMSPLIT_1G
|
||||
select SPARSE_IRQ
|
||||
help
|
||||
Support for Intel's IOP13XX (XScale) family of processors.
|
||||
|
||||
|
||||
@@ -191,6 +191,4 @@ static inline u32 read_intpnd_3(void)
|
||||
#define NR_IOP13XX_IRQS (IRQ_IOP13XX_HPI + 1)
|
||||
#endif
|
||||
|
||||
#define NR_IRQS NR_IOP13XX_IRQS
|
||||
|
||||
#endif /* _IOP13XX_IRQ_H_ */
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#ifndef _IOP13XX_TIME_H_
|
||||
#define _IOP13XX_TIME_H_
|
||||
|
||||
#include <mach/irqs.h>
|
||||
|
||||
#define IRQ_IOP_TIMER0 IRQ_IOP13XX_TIMER0
|
||||
|
||||
#define IOP_TMR_EN 0x02
|
||||
|
||||
@@ -93,4 +93,5 @@ MACHINE_START(IQ81340MC, "Intel IQ81340MC")
|
||||
.init_time = iq81340mc_timer_init,
|
||||
.init_machine = iq81340mc_init,
|
||||
.restart = iop13xx_restart,
|
||||
.nr_irqs = NR_IOP13XX_IRQS,
|
||||
MACHINE_END
|
||||
|
||||
@@ -95,4 +95,5 @@ MACHINE_START(IQ81340SC, "Intel IQ81340SC")
|
||||
.init_time = iq81340sc_timer_init,
|
||||
.init_machine = iq81340sc_init,
|
||||
.restart = iop13xx_restart,
|
||||
.nr_irqs = NR_IOP13XX_IRQS,
|
||||
MACHINE_END
|
||||
|
||||
+12
-40
@@ -23,10 +23,7 @@
|
||||
#include <linux/msi.h>
|
||||
#include <asm/mach/irq.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
|
||||
#define IOP13XX_NUM_MSI_IRQS 128
|
||||
static DECLARE_BITMAP(msi_irq_in_use, IOP13XX_NUM_MSI_IRQS);
|
||||
#include <mach/irqs.h>
|
||||
|
||||
/* IMIPR0 CP6 R8 Page 1
|
||||
*/
|
||||
@@ -121,41 +118,6 @@ void __init iop13xx_msi_init(void)
|
||||
irq_set_chained_handler(IRQ_IOP13XX_INBD_MSI, iop13xx_msi_handler);
|
||||
}
|
||||
|
||||
/*
|
||||
* Dynamic irq allocate and deallocation
|
||||
*/
|
||||
int create_irq(void)
|
||||
{
|
||||
int irq, pos;
|
||||
|
||||
again:
|
||||
pos = find_first_zero_bit(msi_irq_in_use, IOP13XX_NUM_MSI_IRQS);
|
||||
irq = IRQ_IOP13XX_MSI_0 + pos;
|
||||
if (irq > NR_IRQS)
|
||||
return -ENOSPC;
|
||||
/* test_and_set_bit operates on 32-bits at a time */
|
||||
if (test_and_set_bit(pos, msi_irq_in_use))
|
||||
goto again;
|
||||
|
||||
dynamic_irq_init(irq);
|
||||
|
||||
return irq;
|
||||
}
|
||||
|
||||
void destroy_irq(unsigned int irq)
|
||||
{
|
||||
int pos = irq - IRQ_IOP13XX_MSI_0;
|
||||
|
||||
dynamic_irq_cleanup(irq);
|
||||
|
||||
clear_bit(pos, msi_irq_in_use);
|
||||
}
|
||||
|
||||
void arch_teardown_msi_irq(unsigned int irq)
|
||||
{
|
||||
destroy_irq(irq);
|
||||
}
|
||||
|
||||
static void iop13xx_msi_nop(struct irq_data *d)
|
||||
{
|
||||
return;
|
||||
@@ -172,12 +134,17 @@ static struct irq_chip iop13xx_msi_chip = {
|
||||
|
||||
int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
|
||||
{
|
||||
int id, irq = create_irq();
|
||||
int id, irq = irq_alloc_desc_from(IRQ_IOP13XX_MSI_0, -1);
|
||||
struct msi_msg msg;
|
||||
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
|
||||
if (irq >= NR_IOP13XX_IRQS) {
|
||||
irq_free_desc(irq);
|
||||
return -ENOSPC;
|
||||
}
|
||||
|
||||
irq_set_msi_desc(irq, desc);
|
||||
|
||||
msg.address_hi = 0x0;
|
||||
@@ -191,3 +158,8 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void arch_teardown_msi_irq(unsigned int irq)
|
||||
{
|
||||
irq_free_desc(irq);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/hardware/iop_adma.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
#define IOP13XX_UART_XTAL 33334000
|
||||
#define IOP13XX_SETUP_DEBUG 0
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/sizes.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
/* assumes CONTROLLER_ONLY# is never asserted in the ESSR register */
|
||||
#define IOP13XX_TPMI_MMR(dev) IOP13XX_REG_ADDR32_PHYS(0x48000 + (dev << 12))
|
||||
|
||||
@@ -32,6 +32,7 @@ config IA64
|
||||
select GENERIC_IRQ_PROBE
|
||||
select GENERIC_PENDING_IRQ if SMP
|
||||
select GENERIC_IRQ_SHOW
|
||||
select GENERIC_IRQ_LEGACY
|
||||
select ARCH_WANT_OPTIONAL_GPIOLIB
|
||||
select ARCH_HAVE_NMI_SAFE_CMPXCHG
|
||||
select GENERIC_IOMAP
|
||||
|
||||
@@ -132,7 +132,6 @@ extern int reserve_irq_vector (int vector);
|
||||
extern void __setup_vector_irq(int cpu);
|
||||
extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect);
|
||||
extern void ia64_native_register_percpu_irq (ia64_vector vec, struct irqaction *action);
|
||||
extern int check_irq_used (int irq);
|
||||
extern void destroy_and_reserve_irq (unsigned int irq);
|
||||
|
||||
#if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG))
|
||||
|
||||
@@ -31,4 +31,7 @@ bool is_affinity_mask_valid(const struct cpumask *cpumask);
|
||||
|
||||
#define is_affinity_mask_valid is_affinity_mask_valid
|
||||
|
||||
int create_irq(void);
|
||||
void destroy_irq(unsigned int irq);
|
||||
|
||||
#endif /* _ASM_IA64_IRQ_H */
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#ifndef __IA64_INTR_REMAPPING_H
|
||||
#define __IA64_INTR_REMAPPING_H
|
||||
#define irq_remapping_enabled 0
|
||||
#define dmar_alloc_hwirq create_irq
|
||||
#define dmar_free_hwirq destroy_irq
|
||||
#endif
|
||||
|
||||
@@ -735,7 +735,7 @@ iosapic_register_intr (unsigned int gsi,
|
||||
rte = find_rte(irq, gsi);
|
||||
if(iosapic_intr_info[irq].count == 0) {
|
||||
assign_irq_vector(irq);
|
||||
dynamic_irq_init(irq);
|
||||
irq_init_desc(irq);
|
||||
} else if (rte->refcnt != NO_REF_RTE) {
|
||||
rte->refcnt++;
|
||||
goto unlock_iosapic_lock;
|
||||
|
||||
@@ -93,14 +93,6 @@ static int irq_status[NR_IRQS] = {
|
||||
[0 ... NR_IRQS -1] = IRQ_UNUSED
|
||||
};
|
||||
|
||||
int check_irq_used(int irq)
|
||||
{
|
||||
if (irq_status[irq] == IRQ_USED)
|
||||
return 1;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline int find_unassigned_irq(void)
|
||||
{
|
||||
int irq;
|
||||
@@ -390,8 +382,7 @@ void destroy_and_reserve_irq(unsigned int irq)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
dynamic_irq_cleanup(irq);
|
||||
|
||||
irq_init_desc(irq);
|
||||
spin_lock_irqsave(&vector_lock, flags);
|
||||
__clear_irq_vector(irq);
|
||||
irq_status[irq] = IRQ_RSVD;
|
||||
@@ -424,13 +415,13 @@ int create_irq(void)
|
||||
out:
|
||||
spin_unlock_irqrestore(&vector_lock, flags);
|
||||
if (irq >= 0)
|
||||
dynamic_irq_init(irq);
|
||||
irq_init_desc(irq);
|
||||
return irq;
|
||||
}
|
||||
|
||||
void destroy_irq(unsigned int irq)
|
||||
{
|
||||
dynamic_irq_cleanup(irq);
|
||||
irq_init_desc(irq);
|
||||
clear_irq_vector(irq);
|
||||
}
|
||||
|
||||
|
||||
@@ -206,14 +206,8 @@ static struct irq_chip xlp_msix_chip = {
|
||||
.irq_unmask = unmask_msi_irq,
|
||||
};
|
||||
|
||||
void destroy_irq(unsigned int irq)
|
||||
{
|
||||
/* nothing to do yet */
|
||||
}
|
||||
|
||||
void arch_teardown_msi_irq(unsigned int irq)
|
||||
{
|
||||
destroy_irq(irq);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -298,10 +292,8 @@ static int xlp_setup_msi(uint64_t lnkbase, int node, int link,
|
||||
|
||||
xirq = xirq + msivec; /* msi mapped to global irq space */
|
||||
ret = irq_set_msi_desc(xirq, desc);
|
||||
if (ret < 0) {
|
||||
destroy_irq(xirq);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
write_msi_msg(xirq, &msg);
|
||||
return 0;
|
||||
|
||||
@@ -214,14 +214,8 @@ static int get_irq_vector(const struct pci_dev *dev)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
void destroy_irq(unsigned int irq)
|
||||
{
|
||||
/* nothing to do yet */
|
||||
}
|
||||
|
||||
void arch_teardown_msi_irq(unsigned int irq)
|
||||
{
|
||||
destroy_irq(irq);
|
||||
}
|
||||
|
||||
int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
|
||||
@@ -263,10 +257,8 @@ int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc)
|
||||
MSI_DATA_DELIVERY_FIXED;
|
||||
|
||||
ret = irq_set_msi_desc(irq, desc);
|
||||
if (ret < 0) {
|
||||
destroy_irq(irq);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
write_msi_msg(irq, &msg);
|
||||
return 0;
|
||||
|
||||
@@ -92,7 +92,6 @@ static const struct irq_class irqclass_sub_desc[NR_ARCH_IRQS] = {
|
||||
|
||||
void __init init_IRQ(void)
|
||||
{
|
||||
irq_reserve_irqs(0, THIN_INTERRUPT);
|
||||
init_cio_interrupts();
|
||||
init_airq_interrupts();
|
||||
init_ext_interrupts();
|
||||
@@ -151,9 +150,9 @@ out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int arch_show_interrupts(struct seq_file *p, int prec)
|
||||
unsigned int arch_dynirq_lower_bound(unsigned int from)
|
||||
{
|
||||
return 0;
|
||||
return from < THIN_INTERRUPT ? THIN_INTERRUPT : from;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user