mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 22:02:28 +00:00
irqchip fixes for 6.0, take #1
- A bunch of small fixes for the recently merged LoongArch drivers - A leftover from the non-SMP IRQ affinity rework affecting the Hyper-V IOMMU code -----BEGIN PGP SIGNATURE----- iQJDBAABCgAtFiEEn9UcU+C1Yxj9lZw9I9DQutE9ekMFAmL2TNUPHG1hekBrZXJu ZWwub3JnAAoJECPQ0LrRPXpDYH0P/0oThDALd3H/ieelfUBG1LCTRWR+b0O3E4Ge 6tJkFwhhEEpqDmtJBAWAtuWCrwwpipCWif2TCpvkbD3mhf8LWqs5HNWB5qSoK6th dWMszhV4ljr8WH/mELxbuHapPuSYUSXV6Ty4f5b8A2KvSTNXmHhXQFU+22eG13TZ w4aXGLfGunD0ozA1l2VR6EyCFfwiRg07jQUj48Hm0UuaBAQpDf3kfFDM/aM4rpNA TLpdYO9kqppN1VoeovUP4H3nmCpwbvT2mPNmbz29pfkCHIKkhgFNrnh3Po8DQTrL ddUECSjk7F4KGC4e/C5zBq/A09Znj1IqrMlP/pRvj56jrdvxEIvpdE1Y7/8AoWYp DTODGldFjaUhpnOGUj0x3GfcUFC0qQL8lqi+qJ4YzKE7BXI8tjjjmXBGLgRjQCox h9cFwYDdnALF/kKi1LISbCTf5ali6paB3xkb/VHPZ2yCjdiHgGaAYTXZjSHXqXa8 f6jvdl3olGUgwdpX2LprzFPTvspu7rImKNXRrqkrGBuUugjibr4sHYqZjfFNJ8Y/ uOKpzku8Ck+Husg7nsytFPYrYEss446/+dLxyJo+YXZS5+b30hC1meCFnK0qk0bk mgX6xP/gdP3Hg898ZenVLB3rmIWMR76tdVQ4wTdvMx93xZTl6bcxj8axwjhvCVm7 SqJuwBDk =GV+C -----END PGP SIGNATURE----- Merge tag 'irqchip-fixes-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: - A bunch of small fixes for the recently merged LoongArch drivers - A leftover from the non-SMP IRQ affinity rework affecting the Hyper-V IOMMU code Link: https://lore.kernel.org/r/20220812125910.2227338-1-maz@kernel.org
This commit is contained in:
commit
57646d6769
@ -81,7 +81,6 @@ extern struct acpi_vector_group msi_group[MAX_IO_PICS];
|
||||
#define GSI_MIN_PCH_IRQ LOONGSON_PCH_IRQ_BASE
|
||||
#define GSI_MAX_PCH_IRQ (LOONGSON_PCH_IRQ_BASE + 256 - 1)
|
||||
|
||||
extern int find_pch_pic(u32 gsi);
|
||||
struct acpi_madt_lio_pic;
|
||||
struct acpi_madt_eio_pic;
|
||||
struct acpi_madt_ht_pic;
|
||||
|
@ -68,7 +68,6 @@ static int hyperv_irq_remapping_alloc(struct irq_domain *domain,
|
||||
{
|
||||
struct irq_alloc_info *info = arg;
|
||||
struct irq_data *irq_data;
|
||||
struct irq_desc *desc;
|
||||
int ret = 0;
|
||||
|
||||
if (!info || info->type != X86_IRQ_ALLOC_TYPE_IOAPIC || nr_irqs > 1)
|
||||
@ -90,8 +89,7 @@ static int hyperv_irq_remapping_alloc(struct irq_domain *domain,
|
||||
* Hypver-V IO APIC irq affinity should be in the scope of
|
||||
* ioapic_max_cpumask because no irq remapping support.
|
||||
*/
|
||||
desc = irq_data_to_desc(irq_data);
|
||||
cpumask_copy(desc->irq_common_data.affinity, &ioapic_max_cpumask);
|
||||
irq_data_update_affinity(irq_data, &ioapic_max_cpumask);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ static int __init cpuintc_acpi_init(union acpi_subtable_headers *header,
|
||||
clear_csr_ecfg(ECFG0_IM);
|
||||
clear_csr_estat(ESTATF_IP);
|
||||
|
||||
cpuintc_handle = irq_domain_alloc_fwnode(NULL);
|
||||
cpuintc_handle = irq_domain_alloc_named_fwnode("CPUINTC");
|
||||
irq_domain = irq_domain_create_linear(cpuintc_handle, EXCCODE_INT_NUM,
|
||||
&loongarch_cpu_intc_irq_domain_ops, NULL);
|
||||
|
||||
|
@ -111,11 +111,15 @@ static int eiointc_set_irq_affinity(struct irq_data *d, const struct cpumask *af
|
||||
regaddr = EIOINTC_REG_ENABLE + ((vector >> 5) << 2);
|
||||
|
||||
/* Mask target vector */
|
||||
csr_any_send(regaddr, EIOINTC_ALL_ENABLE & (~BIT(vector & 0x1F)), 0x0, 0);
|
||||
csr_any_send(regaddr, EIOINTC_ALL_ENABLE & (~BIT(vector & 0x1F)),
|
||||
0x0, priv->node * CORES_PER_EIO_NODE);
|
||||
|
||||
/* Set route for target vector */
|
||||
eiointc_set_irq_route(vector, cpu, priv->node, &priv->node_map);
|
||||
|
||||
/* Unmask target vector */
|
||||
csr_any_send(regaddr, EIOINTC_ALL_ENABLE, 0x0, 0);
|
||||
csr_any_send(regaddr, EIOINTC_ALL_ENABLE,
|
||||
0x0, priv->node * CORES_PER_EIO_NODE);
|
||||
|
||||
irq_data_update_effective_affinity(d, cpumask_of(cpu));
|
||||
|
||||
@ -286,7 +290,7 @@ static void acpi_set_vec_parent(int node, struct irq_domain *parent, struct acpi
|
||||
}
|
||||
}
|
||||
|
||||
struct irq_domain *acpi_get_vec_parent(int node, struct acpi_vector_group *vec_group)
|
||||
static struct irq_domain *acpi_get_vec_parent(int node, struct acpi_vector_group *vec_group)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -344,7 +348,8 @@ int __init eiointc_acpi_init(struct irq_domain *parent,
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
|
||||
priv->domain_handle = irq_domain_alloc_fwnode((phys_addr_t *)acpi_eiointc);
|
||||
priv->domain_handle = irq_domain_alloc_named_id_fwnode("EIOPIC",
|
||||
acpi_eiointc->node);
|
||||
if (!priv->domain_handle) {
|
||||
pr_err("Unable to allocate domain handle\n");
|
||||
goto out_free_priv;
|
||||
|
@ -207,7 +207,7 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision,
|
||||
"reg-names", core_reg_names[i]);
|
||||
|
||||
if (index < 0)
|
||||
return -EINVAL;
|
||||
goto out_iounmap;
|
||||
|
||||
priv->core_isr[i] = of_iomap(node, index);
|
||||
}
|
||||
@ -360,7 +360,7 @@ int __init liointc_acpi_init(struct irq_domain *parent, struct acpi_madt_lio_pic
|
||||
parent_irq[0] = irq_create_mapping(parent, acpi_liointc->cascade[0]);
|
||||
parent_irq[1] = irq_create_mapping(parent, acpi_liointc->cascade[1]);
|
||||
|
||||
domain_handle = irq_domain_alloc_fwnode((phys_addr_t *)acpi_liointc);
|
||||
domain_handle = irq_domain_alloc_fwnode(&acpi_liointc->address);
|
||||
if (!domain_handle) {
|
||||
pr_err("Unable to allocate domain handle\n");
|
||||
return -ENOMEM;
|
||||
|
@ -282,7 +282,7 @@ int __init pch_msi_acpi_init(struct irq_domain *parent,
|
||||
int ret;
|
||||
struct fwnode_handle *domain_handle;
|
||||
|
||||
domain_handle = irq_domain_alloc_fwnode((phys_addr_t *)acpi_pchmsi);
|
||||
domain_handle = irq_domain_alloc_fwnode(&acpi_pchmsi->msg_address);
|
||||
ret = pch_msi_init(acpi_pchmsi->msg_address, acpi_pchmsi->start,
|
||||
acpi_pchmsi->count, parent, domain_handle);
|
||||
if (ret < 0)
|
||||
|
@ -48,25 +48,6 @@ static struct pch_pic *pch_pic_priv[MAX_IO_PICS];
|
||||
|
||||
struct fwnode_handle *pch_pic_handle[MAX_IO_PICS];
|
||||
|
||||
int find_pch_pic(u32 gsi)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Find the PCH_PIC that manages this GSI. */
|
||||
for (i = 0; i < MAX_IO_PICS; i++) {
|
||||
struct pch_pic *priv = pch_pic_priv[i];
|
||||
|
||||
if (!priv)
|
||||
return -1;
|
||||
|
||||
if (gsi >= priv->gsi_base && gsi < (priv->gsi_base + priv->vec_count))
|
||||
return i;
|
||||
}
|
||||
|
||||
pr_err("ERROR: Unable to locate PCH_PIC for GSI %d\n", gsi);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void pch_pic_bitset(struct pch_pic *priv, int offset, int bit)
|
||||
{
|
||||
u32 reg;
|
||||
@ -325,6 +306,25 @@ IRQCHIP_DECLARE(pch_pic, "loongson,pch-pic-1.0", pch_pic_of_init);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
int find_pch_pic(u32 gsi)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Find the PCH_PIC that manages this GSI. */
|
||||
for (i = 0; i < MAX_IO_PICS; i++) {
|
||||
struct pch_pic *priv = pch_pic_priv[i];
|
||||
|
||||
if (!priv)
|
||||
return -1;
|
||||
|
||||
if (gsi >= priv->gsi_base && gsi < (priv->gsi_base + priv->vec_count))
|
||||
return i;
|
||||
}
|
||||
|
||||
pr_err("ERROR: Unable to locate PCH_PIC for GSI %d\n", gsi);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int __init
|
||||
pch_lpc_parse_madt(union acpi_subtable_headers *header,
|
||||
const unsigned long end)
|
||||
@ -349,7 +349,7 @@ int __init pch_pic_acpi_init(struct irq_domain *parent,
|
||||
|
||||
vec_base = acpi_pchpic->gsi_base - GSI_MIN_PCH_IRQ;
|
||||
|
||||
domain_handle = irq_domain_alloc_fwnode((phys_addr_t *)acpi_pchpic);
|
||||
domain_handle = irq_domain_alloc_fwnode(&acpi_pchpic->address);
|
||||
if (!domain_handle) {
|
||||
pr_err("Unable to allocate domain handle\n");
|
||||
return -ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user