mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Merge tag 'irq-core-2020-12-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq updates from Thomas Gleixner:
"Generic interrupt and irqchips subsystem updates. Unusually, there is
not a single completely new irq chip driver, just new DT bindings and
extensions of existing drivers to accomodate new variants!
Core:
- Consolidation and robustness changes for irq time accounting
- Cleanup and consolidation of irq stats
- Remove the fasteoi IPI flow which has been proved useless
- Provide an interface for converting legacy interrupt mechanism into
irqdomains
Drivers:
- Preliminary support for managed interrupts on platform devices
- Correctly identify allocation of MSIs proxyied by another device
- Generalise the Ocelot support to new SoCs
- Improve GICv4.1 vcpu entry, matching the corresponding KVM
optimisation
- Work around spurious interrupts on Qualcomm PDC
- Random fixes and cleanups"
* tag 'irq-core-2020-12-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (54 commits)
irqchip/qcom-pdc: Fix phantom irq when changing between rising/falling
driver core: platform: Add devm_platform_get_irqs_affinity()
ACPI: Drop acpi_dev_irqresource_disabled()
resource: Add irqresource_disabled()
genirq/affinity: Add irq_update_affinity_desc()
irqchip/gic-v3-its: Flag device allocation as proxied if behind a PCI bridge
irqchip/gic-v3-its: Tag ITS device as shared if allocating for a proxy device
platform-msi: Track shared domain allocation
irqchip/ti-sci-intr: Fix freeing of irqs
irqchip/ti-sci-inta: Fix printing of inta id on probe success
drivers/irqchip: Remove EZChip NPS interrupt controller
Revert "genirq: Add fasteoi IPI flow"
irqchip/hip04: Make IPIs use handle_percpu_devid_irq()
irqchip/bcm2836: Make IPIs use handle_percpu_devid_irq()
irqchip/armada-370-xp: Make IPIs use handle_percpu_devid_irq()
irqchip/gic, gic-v3: Make SGIs use handle_percpu_devid_irq()
irqchip/ocelot: Add support for Jaguar2 platforms
irqchip/ocelot: Add support for Serval platforms
irqchip/ocelot: Add support for Luton platforms
irqchip/ocelot: prepare to support more SoC
...
This commit is contained in:
@@ -147,6 +147,7 @@ Legacy
|
||||
irq_domain_add_simple()
|
||||
irq_domain_add_legacy()
|
||||
irq_domain_add_legacy_isa()
|
||||
irq_domain_create_legacy()
|
||||
|
||||
The Legacy mapping is a special case for drivers that already have a
|
||||
range of irq_descs allocated for the hwirqs. It is used when the
|
||||
@@ -185,6 +186,11 @@ that the driver using the simple domain call irq_create_mapping()
|
||||
before any irq_find_mapping() since the latter will actually work
|
||||
for the static IRQ assignment case.
|
||||
|
||||
irq_domain_add_legacy() and irq_domain_create_legacy() are functionally
|
||||
equivalent, except for the first argument is different - the former
|
||||
accepts an Open Firmware specific 'struct device_node', while the latter
|
||||
accepts a more general abstraction 'struct fwnode_handle'.
|
||||
|
||||
Hierarchy IRQ domain
|
||||
--------------------
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
* Freescale Layerscape external IRQs
|
||||
|
||||
Some Layerscape SOCs (LS1021A, LS1043A, LS1046A) support inverting
|
||||
Some Layerscape SOCs (LS1021A, LS1043A, LS1046A
|
||||
LS1088A, LS208xA, LX216xA) support inverting
|
||||
the polarity of certain external interrupt lines.
|
||||
|
||||
The device node must be a child of the node representing the
|
||||
@@ -8,12 +9,15 @@ Supplemental Configuration Unit (SCFG).
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "fsl,<soc-name>-extirq", e.g. "fsl,ls1021a-extirq".
|
||||
"fsl,ls1043a-extirq": for LS1043A, LS1046A.
|
||||
"fsl,ls1088a-extirq": for LS1088A, LS208xA, LX216xA.
|
||||
- #interrupt-cells: Must be 2. The first element is the index of the
|
||||
external interrupt line. The second element is the trigger type.
|
||||
- #address-cells: Must be 0.
|
||||
- interrupt-controller: Identifies the node as an interrupt controller
|
||||
- reg: Specifies the Interrupt Polarity Control Register (INTPCR) in
|
||||
the SCFG.
|
||||
the SCFG or the External Interrupt Control Register (IRQCR) in
|
||||
the ISC.
|
||||
- interrupt-map: Specifies the mapping from external interrupts to GIC
|
||||
interrupts.
|
||||
- interrupt-map-mask: Must be <0xffffffff 0>.
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
Microsemi Ocelot SoC ICPU Interrupt Controller
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : should be "mscc,ocelot-icpu-intr"
|
||||
- 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.
|
||||
- interrupts : Specifies the CPU interrupt the controller is connected to.
|
||||
|
||||
Example:
|
||||
|
||||
intc: interrupt-controller@70000070 {
|
||||
compatible = "mscc,ocelot-icpu-intr";
|
||||
reg = <0x70000070 0x70>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-controller;
|
||||
interrupt-parent = <&cpuintc>;
|
||||
interrupts = <2>;
|
||||
};
|
||||
@@ -0,0 +1,64 @@
|
||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: "http://devicetree.org/schemas/interrupt-controller/mscc,ocelot-icpu-intr.yaml#"
|
||||
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||
|
||||
title: Microsemi Ocelot SoC ICPU Interrupt Controller
|
||||
|
||||
maintainers:
|
||||
- Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
|
||||
allOf:
|
||||
- $ref: /schemas/interrupt-controller.yaml#
|
||||
|
||||
description: |
|
||||
the Microsemi Ocelot interrupt controller that is part of the
|
||||
ICPU. It is connected directly to the MIPS core interrupt
|
||||
controller.
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- mscc,jaguar2-icpu-intr
|
||||
- mscc,luton-icpu-intr
|
||||
- mscc,ocelot-icpu-intr
|
||||
- mscc,serval-icpu-intr
|
||||
|
||||
|
||||
'#interrupt-cells':
|
||||
const: 1
|
||||
|
||||
'#address-cells':
|
||||
const: 0
|
||||
|
||||
interrupt-controller: true
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- '#interrupt-cells'
|
||||
- '#address-cells'
|
||||
- interrupt-controller
|
||||
- reg
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
intc: interrupt-controller@70000070 {
|
||||
compatible = "mscc,ocelot-icpu-intr";
|
||||
reg = <0x70000070 0x70>;
|
||||
#interrupt-cells = <1>;
|
||||
#address-cells = <0>;
|
||||
interrupt-controller;
|
||||
interrupt-parent = <&cpuintc>;
|
||||
interrupts = <2>;
|
||||
};
|
||||
...
|
||||
@@ -644,6 +644,12 @@ config HAVE_TIF_NOHZ
|
||||
config HAVE_VIRT_CPU_ACCOUNTING
|
||||
bool
|
||||
|
||||
config HAVE_VIRT_CPU_ACCOUNTING_IDLE
|
||||
bool
|
||||
help
|
||||
Architecture has its own way to account idle CPU time and therefore
|
||||
doesn't implement vtime_account_idle().
|
||||
|
||||
config ARCH_HAS_SCALED_CPUTIME
|
||||
bool
|
||||
|
||||
@@ -658,7 +664,6 @@ config HAVE_VIRT_CPU_ACCOUNTING_GEN
|
||||
some 32-bit arches may require multiple accesses, so proper
|
||||
locking is needed to protect against concurrent accesses.
|
||||
|
||||
|
||||
config HAVE_IRQ_TIME_ACCOUNTING
|
||||
bool
|
||||
help
|
||||
|
||||
@@ -2,16 +2,11 @@
|
||||
#ifndef __ASM_HARDIRQ_H
|
||||
#define __ASM_HARDIRQ_H
|
||||
|
||||
#include <linux/cache.h>
|
||||
#include <linux/threads.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
typedef struct {
|
||||
unsigned int __softirq_pending;
|
||||
} ____cacheline_aligned irq_cpustat_t;
|
||||
|
||||
#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
|
||||
|
||||
#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
|
||||
#define ack_bad_irq ack_bad_irq
|
||||
|
||||
#include <asm-generic/hardirq.h>
|
||||
|
||||
#endif /* __ASM_HARDIRQ_H */
|
||||
|
||||
@@ -31,6 +31,8 @@ void handle_IRQ(unsigned int, struct pt_regs *);
|
||||
void init_IRQ(void);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#include <linux/cpumask.h>
|
||||
|
||||
extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
|
||||
bool exclude_self);
|
||||
#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
|
||||
|
||||
@@ -13,11 +13,8 @@
|
||||
#include <asm/kvm_arm.h>
|
||||
#include <asm/sysreg.h>
|
||||
|
||||
typedef struct {
|
||||
unsigned int __softirq_pending;
|
||||
} ____cacheline_aligned irq_cpustat_t;
|
||||
|
||||
#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
|
||||
#define ack_bad_irq ack_bad_irq
|
||||
#include <asm-generic/hardirq.h>
|
||||
|
||||
#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
|
||||
|
||||
|
||||
@@ -138,12 +138,8 @@ void vtime_account_kernel(struct task_struct *tsk)
|
||||
struct thread_info *ti = task_thread_info(tsk);
|
||||
__u64 stime = vtime_delta(tsk);
|
||||
|
||||
if ((tsk->flags & PF_VCPU) && !irq_count())
|
||||
if (tsk->flags & PF_VCPU)
|
||||
ti->gtime += stime;
|
||||
else if (hardirq_count())
|
||||
ti->hardirq_time += stime;
|
||||
else if (in_serving_softirq())
|
||||
ti->softirq_time += stime;
|
||||
else
|
||||
ti->stime += stime;
|
||||
}
|
||||
@@ -156,6 +152,20 @@ void vtime_account_idle(struct task_struct *tsk)
|
||||
ti->idle_time += vtime_delta(tsk);
|
||||
}
|
||||
|
||||
void vtime_account_softirq(struct task_struct *tsk)
|
||||
{
|
||||
struct thread_info *ti = task_thread_info(tsk);
|
||||
|
||||
ti->softirq_time += vtime_delta(tsk);
|
||||
}
|
||||
|
||||
void vtime_account_hardirq(struct task_struct *tsk)
|
||||
{
|
||||
struct thread_info *ti = task_thread_info(tsk);
|
||||
|
||||
ti->hardirq_time += vtime_delta(tsk);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */
|
||||
|
||||
static irqreturn_t
|
||||
|
||||
@@ -32,7 +32,6 @@ typedef struct {
|
||||
DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
|
||||
|
||||
#define __ARCH_IRQ_STAT
|
||||
#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
|
||||
#define inc_irq_stat(member) this_cpu_inc(irq_stat.member)
|
||||
#define __inc_irq_stat(member) __this_cpu_inc(irq_stat.member)
|
||||
#define ack_bad_irq(irq) WARN(1, "unexpected IRQ trap at vector %02x\n", irq)
|
||||
|
||||
@@ -311,12 +311,11 @@ static unsigned long vtime_delta_scaled(struct cpu_accounting_data *acct,
|
||||
return stime_scaled;
|
||||
}
|
||||
|
||||
static unsigned long vtime_delta(struct task_struct *tsk,
|
||||
static unsigned long vtime_delta(struct cpu_accounting_data *acct,
|
||||
unsigned long *stime_scaled,
|
||||
unsigned long *steal_time)
|
||||
{
|
||||
unsigned long now, stime;
|
||||
struct cpu_accounting_data *acct = get_accounting(tsk);
|
||||
|
||||
WARN_ON_ONCE(!irqs_disabled());
|
||||
|
||||
@@ -331,29 +330,30 @@ static unsigned long vtime_delta(struct task_struct *tsk,
|
||||
return stime;
|
||||
}
|
||||
|
||||
static void vtime_delta_kernel(struct cpu_accounting_data *acct,
|
||||
unsigned long *stime, unsigned long *stime_scaled)
|
||||
{
|
||||
unsigned long steal_time;
|
||||
|
||||
*stime = vtime_delta(acct, stime_scaled, &steal_time);
|
||||
*stime -= min(*stime, steal_time);
|
||||
acct->steal_time += steal_time;
|
||||
}
|
||||
|
||||
void vtime_account_kernel(struct task_struct *tsk)
|
||||
{
|
||||
unsigned long stime, stime_scaled, steal_time;
|
||||
struct cpu_accounting_data *acct = get_accounting(tsk);
|
||||
unsigned long stime, stime_scaled;
|
||||
|
||||
stime = vtime_delta(tsk, &stime_scaled, &steal_time);
|
||||
vtime_delta_kernel(acct, &stime, &stime_scaled);
|
||||
|
||||
stime -= min(stime, steal_time);
|
||||
acct->steal_time += steal_time;
|
||||
|
||||
if ((tsk->flags & PF_VCPU) && !irq_count()) {
|
||||
if (tsk->flags & PF_VCPU) {
|
||||
acct->gtime += stime;
|
||||
#ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
|
||||
acct->utime_scaled += stime_scaled;
|
||||
#endif
|
||||
} else {
|
||||
if (hardirq_count())
|
||||
acct->hardirq_time += stime;
|
||||
else if (in_serving_softirq())
|
||||
acct->softirq_time += stime;
|
||||
else
|
||||
acct->stime += stime;
|
||||
|
||||
acct->stime += stime;
|
||||
#ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
|
||||
acct->stime_scaled += stime_scaled;
|
||||
#endif
|
||||
@@ -366,10 +366,34 @@ void vtime_account_idle(struct task_struct *tsk)
|
||||
unsigned long stime, stime_scaled, steal_time;
|
||||
struct cpu_accounting_data *acct = get_accounting(tsk);
|
||||
|
||||
stime = vtime_delta(tsk, &stime_scaled, &steal_time);
|
||||
stime = vtime_delta(acct, &stime_scaled, &steal_time);
|
||||
acct->idle_time += stime + steal_time;
|
||||
}
|
||||
|
||||
static void vtime_account_irq_field(struct cpu_accounting_data *acct,
|
||||
unsigned long *field)
|
||||
{
|
||||
unsigned long stime, stime_scaled;
|
||||
|
||||
vtime_delta_kernel(acct, &stime, &stime_scaled);
|
||||
*field += stime;
|
||||
#ifdef CONFIG_ARCH_HAS_SCALED_CPUTIME
|
||||
acct->stime_scaled += stime_scaled;
|
||||
#endif
|
||||
}
|
||||
|
||||
void vtime_account_softirq(struct task_struct *tsk)
|
||||
{
|
||||
struct cpu_accounting_data *acct = get_accounting(tsk);
|
||||
vtime_account_irq_field(acct, &acct->softirq_time);
|
||||
}
|
||||
|
||||
void vtime_account_hardirq(struct task_struct *tsk)
|
||||
{
|
||||
struct cpu_accounting_data *acct = get_accounting(tsk);
|
||||
vtime_account_irq_field(acct, &acct->hardirq_time);
|
||||
}
|
||||
|
||||
static void vtime_flush_scaled(struct task_struct *tsk,
|
||||
struct cpu_accounting_data *acct)
|
||||
{
|
||||
|
||||
@@ -178,6 +178,7 @@ config S390
|
||||
select HAVE_RSEQ
|
||||
select HAVE_SYSCALL_TRACEPOINTS
|
||||
select HAVE_VIRT_CPU_ACCOUNTING
|
||||
select HAVE_VIRT_CPU_ACCOUNTING_IDLE
|
||||
select IOMMU_HELPER if PCI
|
||||
select IOMMU_SUPPORT if PCI
|
||||
select MODULES_USE_ELF_RELA
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#ifndef _S390_VTIME_H
|
||||
#define _S390_VTIME_H
|
||||
|
||||
#define __ARCH_HAS_VTIME_ACCOUNT
|
||||
#define __ARCH_HAS_VTIME_TASK_SWITCH
|
||||
|
||||
#endif /* _S390_VTIME_H */
|
||||
|
||||
@@ -222,35 +222,50 @@ void vtime_flush(struct task_struct *tsk)
|
||||
S390_lowcore.avg_steal_timer = avg_steal;
|
||||
}
|
||||
|
||||
static u64 vtime_delta(void)
|
||||
{
|
||||
u64 timer = S390_lowcore.last_update_timer;
|
||||
|
||||
S390_lowcore.last_update_timer = get_vtimer();
|
||||
|
||||
return timer - S390_lowcore.last_update_timer;
|
||||
}
|
||||
|
||||
/*
|
||||
* Update process times based on virtual cpu times stored by entry.S
|
||||
* to the lowcore fields user_timer, system_timer & steal_clock.
|
||||
*/
|
||||
void vtime_account_irq_enter(struct task_struct *tsk)
|
||||
{
|
||||
u64 timer;
|
||||
|
||||
timer = S390_lowcore.last_update_timer;
|
||||
S390_lowcore.last_update_timer = get_vtimer();
|
||||
timer -= S390_lowcore.last_update_timer;
|
||||
|
||||
if ((tsk->flags & PF_VCPU) && (irq_count() == 0))
|
||||
S390_lowcore.guest_timer += timer;
|
||||
else if (hardirq_count())
|
||||
S390_lowcore.hardirq_timer += timer;
|
||||
else if (in_serving_softirq())
|
||||
S390_lowcore.softirq_timer += timer;
|
||||
else
|
||||
S390_lowcore.system_timer += timer;
|
||||
|
||||
virt_timer_forward(timer);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vtime_account_irq_enter);
|
||||
|
||||
void vtime_account_kernel(struct task_struct *tsk)
|
||||
__attribute__((alias("vtime_account_irq_enter")));
|
||||
{
|
||||
u64 delta = vtime_delta();
|
||||
|
||||
if (tsk->flags & PF_VCPU)
|
||||
S390_lowcore.guest_timer += delta;
|
||||
else
|
||||
S390_lowcore.system_timer += delta;
|
||||
|
||||
virt_timer_forward(delta);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vtime_account_kernel);
|
||||
|
||||
void vtime_account_softirq(struct task_struct *tsk)
|
||||
{
|
||||
u64 delta = vtime_delta();
|
||||
|
||||
S390_lowcore.softirq_timer += delta;
|
||||
|
||||
virt_timer_forward(delta);
|
||||
}
|
||||
|
||||
void vtime_account_hardirq(struct task_struct *tsk)
|
||||
{
|
||||
u64 delta = vtime_delta();
|
||||
|
||||
S390_lowcore.hardirq_timer += delta;
|
||||
|
||||
virt_timer_forward(delta);
|
||||
}
|
||||
|
||||
/*
|
||||
* Sorted add to a list. List is linear searched until first bigger
|
||||
* element is found.
|
||||
|
||||
@@ -2,16 +2,10 @@
|
||||
#ifndef __ASM_SH_HARDIRQ_H
|
||||
#define __ASM_SH_HARDIRQ_H
|
||||
|
||||
#include <linux/threads.h>
|
||||
#include <linux/irq.h>
|
||||
|
||||
typedef struct {
|
||||
unsigned int __softirq_pending;
|
||||
unsigned int __nmi_count; /* arch dependent */
|
||||
} ____cacheline_aligned irq_cpustat_t;
|
||||
|
||||
#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
|
||||
|
||||
extern void ack_bad_irq(unsigned int irq);
|
||||
#define ack_bad_irq ack_bad_irq
|
||||
#define ARCH_WANTS_NMI_IRQSTAT
|
||||
|
||||
#include <asm-generic/hardirq.h>
|
||||
|
||||
#endif /* __ASM_SH_HARDIRQ_H */
|
||||
|
||||
@@ -44,7 +44,7 @@ int arch_show_interrupts(struct seq_file *p, int prec)
|
||||
|
||||
seq_printf(p, "%*s: ", prec, "NMI");
|
||||
for_each_online_cpu(j)
|
||||
seq_printf(p, "%10u ", nmi_count(j));
|
||||
seq_printf(p, "%10u ", per_cpu(irq_stat.__nmi_count, j));
|
||||
seq_printf(p, " Non-maskable interrupts\n");
|
||||
|
||||
seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
|
||||
|
||||
@@ -186,7 +186,7 @@ BUILD_TRAP_HANDLER(nmi)
|
||||
arch_ftrace_nmi_enter();
|
||||
|
||||
nmi_enter();
|
||||
nmi_count(cpu)++;
|
||||
this_cpu_inc(irq_stat.__nmi_count);
|
||||
|
||||
switch (notify_die(DIE_NMI, "NMI", regs, 0, vec & 0xff, SIGINT)) {
|
||||
case NOTIFY_OK:
|
||||
|
||||
@@ -2,22 +2,7 @@
|
||||
#ifndef __ASM_UM_HARDIRQ_H
|
||||
#define __ASM_UM_HARDIRQ_H
|
||||
|
||||
#include <linux/cache.h>
|
||||
#include <linux/threads.h>
|
||||
|
||||
typedef struct {
|
||||
unsigned int __softirq_pending;
|
||||
} ____cacheline_aligned irq_cpustat_t;
|
||||
|
||||
#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
|
||||
#include <linux/irq.h>
|
||||
|
||||
#ifndef ack_bad_irq
|
||||
static inline void ack_bad_irq(unsigned int irq)
|
||||
{
|
||||
printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq);
|
||||
}
|
||||
#endif
|
||||
#include <asm-generic/hardirq.h>
|
||||
|
||||
#define __ARCH_IRQ_EXIT_IRQS_DISABLED 1
|
||||
|
||||
|
||||
@@ -380,13 +380,6 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_dev_get_irq_type);
|
||||
|
||||
static void acpi_dev_irqresource_disabled(struct resource *res, u32 gsi)
|
||||
{
|
||||
res->start = gsi;
|
||||
res->end = gsi;
|
||||
res->flags = IORESOURCE_IRQ | IORESOURCE_DISABLED | IORESOURCE_UNSET;
|
||||
}
|
||||
|
||||
static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
|
||||
u8 triggering, u8 polarity, u8 shareable,
|
||||
bool legacy)
|
||||
@@ -394,7 +387,7 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
|
||||
int irq, p, t;
|
||||
|
||||
if (!valid_IRQ(gsi)) {
|
||||
acpi_dev_irqresource_disabled(res, gsi);
|
||||
irqresource_disabled(res, gsi);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -426,7 +419,7 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
|
||||
res->start = irq;
|
||||
res->end = irq;
|
||||
} else {
|
||||
acpi_dev_irqresource_disabled(res, gsi);
|
||||
irqresource_disabled(res, gsi);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,7 +456,7 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index,
|
||||
*/
|
||||
irq = &ares->data.irq;
|
||||
if (index >= irq->interrupt_count) {
|
||||
acpi_dev_irqresource_disabled(res, 0);
|
||||
irqresource_disabled(res, 0);
|
||||
return false;
|
||||
}
|
||||
acpi_dev_get_irqresource(res, irq->interrupts[index],
|
||||
@@ -473,7 +466,7 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index,
|
||||
case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
|
||||
ext_irq = &ares->data.extended_irq;
|
||||
if (index >= ext_irq->interrupt_count) {
|
||||
acpi_dev_irqresource_disabled(res, 0);
|
||||
irqresource_disabled(res, 0);
|
||||
return false;
|
||||
}
|
||||
if (is_gsi(ext_irq))
|
||||
@@ -481,7 +474,7 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index,
|
||||
ext_irq->triggering, ext_irq->polarity,
|
||||
ext_irq->shareable, false);
|
||||
else
|
||||
acpi_dev_irqresource_disabled(res, 0);
|
||||
irqresource_disabled(res, 0);
|
||||
break;
|
||||
default:
|
||||
res->flags = 0;
|
||||
|
||||
@@ -59,9 +59,15 @@ static int platform_msi_init(struct irq_domain *domain,
|
||||
return irq_domain_set_hwirq_and_chip(domain, virq, hwirq,
|
||||
info->chip, info->chip_data);
|
||||
}
|
||||
|
||||
static void platform_msi_set_proxy_dev(msi_alloc_info_t *arg)
|
||||
{
|
||||
arg->flags |= MSI_ALLOC_FLAGS_PROXY_DEVICE;
|
||||
}
|
||||
#else
|
||||
#define platform_msi_set_desc NULL
|
||||
#define platform_msi_init NULL
|
||||
#define platform_msi_set_proxy_dev(x) do {} while(0)
|
||||
#endif
|
||||
|
||||
static void platform_msi_update_dom_ops(struct msi_domain_info *info)
|
||||
@@ -343,6 +349,7 @@ __platform_msi_create_device_domain(struct device *dev,
|
||||
if (!domain)
|
||||
goto free_priv;
|
||||
|
||||
platform_msi_set_proxy_dev(&data->arg);
|
||||
err = msi_domain_prepare_irqs(domain->parent, dev, nvec, &data->arg);
|
||||
if (err)
|
||||
goto free_domain;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user