mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-19 23:02:31 +00:00
IRQ urgent fixes by way of Marc Zygnier:
- Gracefully handle failure to request MMIO resources in the GICv3 driver - Make a static key static in the Apple AIC driver - Fix the Xilinx intc driver dependency on OF_ADDRESS -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEzv7L6UO9uDPlPSfHEsHwGGHeVUoFAmLKsgMACgkQEsHwGGHe VUo3hBAAl+01wmvn1AnCPbuF85f/q4P1gUMvXQNkEohiYpJ84KE9Xo/aCZV0LPKj tHf4+jECswy17v8XPdqYLTmhaQsjnZcGNMwTEmkUIKx1miiEhWYQmXWyn60fEpLL 0xUeUVGCSMwRTOOKkctcetLvhcnHvdDAc0QlWDXgN1n9AcH+DQXl7AxGfTQwdBuq WiE+tBANx8ymJgY2m8v9stU32AG9NOAim39t0SgGmqJl7D0Irf142f3KIBhDgNel 0Ol3AKnf9Vb74mXxifNB6hm4meaKCmqmMuSl2FK5SjPvGStqYI+ytKq5kxvsXu91 jIlP+tBQFzYJUmdYlZmQ1uSreMYBWfUlGSozm5WJvGQBX5LVK1OpzI6z5G2YNmqC LPtbJub/c5eCIFZDsQ/pfzpLGhpWHoqhyUY6WxwK7Z3WyePlRrqaxS9gNFdtl1Sz 7BtN6gWaERVVdGnM06duNWJ+8ZUuRUT0rTaTSrIoiq8zLMjMxIctxemy4vzhnY8I CuCq9l22TPu4fY30bUuWEMNUpdCAlUIDM3I2cGMmpjGE1P1arKr4oE9u6MJVd2iH rkua5FVKElM8wGvxwsWlkEwx5zGaEpSR1KMb2r/QegpG55LrnI7h+hGidQ9sXj3N 1te7mqlLpWxORRmD/TUV2hLGnw2ovMJJ/yrzKMl0UXAYvMNmfnw= =zRMB -----END PGP SIGNATURE----- Merge tag 'irq_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Borislav Petkov: - Gracefully handle failure to request MMIO resources in the GICv3 driver - Make a static key static in the Apple AIC driver - Fix the Xilinx intc driver dependency on OF_ADDRESS * tag 'irq_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/apple-aic: Make symbol 'use_fast_ipi' static irqchip/xilinx: Add explicit dependency on OF_ADDRESS irqchip/gicv3: Handle resource request failure consistently
This commit is contained in:
commit
2b9b31cedb
@ -298,7 +298,7 @@ config XTENSA_MX
|
|||||||
|
|
||||||
config XILINX_INTC
|
config XILINX_INTC
|
||||||
bool "Xilinx Interrupt Controller IP"
|
bool "Xilinx Interrupt Controller IP"
|
||||||
depends on OF
|
depends on OF_ADDRESS
|
||||||
select IRQ_DOMAIN
|
select IRQ_DOMAIN
|
||||||
help
|
help
|
||||||
Support for the Xilinx Interrupt Controller IP core.
|
Support for the Xilinx Interrupt Controller IP core.
|
||||||
|
@ -228,7 +228,7 @@
|
|||||||
#define AIC_TMR_EL02_PHYS AIC_TMR_GUEST_PHYS
|
#define AIC_TMR_EL02_PHYS AIC_TMR_GUEST_PHYS
|
||||||
#define AIC_TMR_EL02_VIRT AIC_TMR_GUEST_VIRT
|
#define AIC_TMR_EL02_VIRT AIC_TMR_GUEST_VIRT
|
||||||
|
|
||||||
DEFINE_STATIC_KEY_TRUE(use_fast_ipi);
|
static DEFINE_STATIC_KEY_TRUE(use_fast_ipi);
|
||||||
|
|
||||||
struct aic_info {
|
struct aic_info {
|
||||||
int version;
|
int version;
|
||||||
|
@ -2042,15 +2042,40 @@ static void __init gic_of_setup_kvm_info(struct device_node *node)
|
|||||||
vgic_set_kvm_info(&gic_v3_kvm_info);
|
vgic_set_kvm_info(&gic_v3_kvm_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void gic_request_region(resource_size_t base, resource_size_t size,
|
||||||
|
const char *name)
|
||||||
|
{
|
||||||
|
if (!request_mem_region(base, size, name))
|
||||||
|
pr_warn_once(FW_BUG "%s region %pa has overlapping address\n",
|
||||||
|
name, &base);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __iomem *gic_of_iomap(struct device_node *node, int idx,
|
||||||
|
const char *name, struct resource *res)
|
||||||
|
{
|
||||||
|
void __iomem *base;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = of_address_to_resource(node, idx, res);
|
||||||
|
if (ret)
|
||||||
|
return IOMEM_ERR_PTR(ret);
|
||||||
|
|
||||||
|
gic_request_region(res->start, resource_size(res), name);
|
||||||
|
base = of_iomap(node, idx);
|
||||||
|
|
||||||
|
return base ?: IOMEM_ERR_PTR(-ENOMEM);
|
||||||
|
}
|
||||||
|
|
||||||
static int __init gic_of_init(struct device_node *node, struct device_node *parent)
|
static int __init gic_of_init(struct device_node *node, struct device_node *parent)
|
||||||
{
|
{
|
||||||
void __iomem *dist_base;
|
void __iomem *dist_base;
|
||||||
struct redist_region *rdist_regs;
|
struct redist_region *rdist_regs;
|
||||||
|
struct resource res;
|
||||||
u64 redist_stride;
|
u64 redist_stride;
|
||||||
u32 nr_redist_regions;
|
u32 nr_redist_regions;
|
||||||
int err, i;
|
int err, i;
|
||||||
|
|
||||||
dist_base = of_io_request_and_map(node, 0, "GICD");
|
dist_base = gic_of_iomap(node, 0, "GICD", &res);
|
||||||
if (IS_ERR(dist_base)) {
|
if (IS_ERR(dist_base)) {
|
||||||
pr_err("%pOF: unable to map gic dist registers\n", node);
|
pr_err("%pOF: unable to map gic dist registers\n", node);
|
||||||
return PTR_ERR(dist_base);
|
return PTR_ERR(dist_base);
|
||||||
@ -2073,12 +2098,8 @@ static int __init gic_of_init(struct device_node *node, struct device_node *pare
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < nr_redist_regions; i++) {
|
for (i = 0; i < nr_redist_regions; i++) {
|
||||||
struct resource res;
|
rdist_regs[i].redist_base = gic_of_iomap(node, 1 + i, "GICR", &res);
|
||||||
int ret;
|
if (IS_ERR(rdist_regs[i].redist_base)) {
|
||||||
|
|
||||||
ret = of_address_to_resource(node, 1 + i, &res);
|
|
||||||
rdist_regs[i].redist_base = of_io_request_and_map(node, 1 + i, "GICR");
|
|
||||||
if (ret || IS_ERR(rdist_regs[i].redist_base)) {
|
|
||||||
pr_err("%pOF: couldn't map region %d\n", node, i);
|
pr_err("%pOF: couldn't map region %d\n", node, i);
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto out_unmap_rdist;
|
goto out_unmap_rdist;
|
||||||
@ -2151,7 +2172,7 @@ gic_acpi_parse_madt_redist(union acpi_subtable_headers *header,
|
|||||||
pr_err("Couldn't map GICR region @%llx\n", redist->base_address);
|
pr_err("Couldn't map GICR region @%llx\n", redist->base_address);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
request_mem_region(redist->base_address, redist->length, "GICR");
|
gic_request_region(redist->base_address, redist->length, "GICR");
|
||||||
|
|
||||||
gic_acpi_register_redist(redist->base_address, redist_base);
|
gic_acpi_register_redist(redist->base_address, redist_base);
|
||||||
return 0;
|
return 0;
|
||||||
@ -2174,7 +2195,7 @@ gic_acpi_parse_madt_gicc(union acpi_subtable_headers *header,
|
|||||||
redist_base = ioremap(gicc->gicr_base_address, size);
|
redist_base = ioremap(gicc->gicr_base_address, size);
|
||||||
if (!redist_base)
|
if (!redist_base)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
request_mem_region(gicc->gicr_base_address, size, "GICR");
|
gic_request_region(gicc->gicr_base_address, size, "GICR");
|
||||||
|
|
||||||
gic_acpi_register_redist(gicc->gicr_base_address, redist_base);
|
gic_acpi_register_redist(gicc->gicr_base_address, redist_base);
|
||||||
return 0;
|
return 0;
|
||||||
@ -2376,7 +2397,7 @@ gic_acpi_init(union acpi_subtable_headers *header, const unsigned long end)
|
|||||||
pr_err("Unable to map GICD registers\n");
|
pr_err("Unable to map GICD registers\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
request_mem_region(dist->base_address, ACPI_GICV3_DIST_MEM_SIZE, "GICD");
|
gic_request_region(dist->base_address, ACPI_GICV3_DIST_MEM_SIZE, "GICD");
|
||||||
|
|
||||||
err = gic_validate_dist_version(acpi_data.dist_base);
|
err = gic_validate_dist_version(acpi_data.dist_base);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user