Skip to content

Commit 0e622c4

Browse files
committed
Merge tag 'powerpc-6.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Madhavan Srinivasan: - Fix to handle NULL pointer dereference at irq domain teardown - Fix for handling extraction of struct xive_irq_data - Fix to skip parameter area allocation when fadump disabled Thanks to Ganesh Goudar, Hari Bathini, Nam Cao, Ritesh Harjani (IBM), Sourabh Jain, and Venkat Rao Bagalkote, * tag 'powerpc-6.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/fadump: skip parameter area allocation when fadump is disabled powerpc, ocxl: Fix extraction of struct xive_irq_data powerpc/pseries/msi: Fix NULL pointer dereference at irq domain teardown
2 parents 959f018 + 0843ba4 commit 0e622c4

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

arch/powerpc/kernel/fadump.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,6 +1747,9 @@ void __init fadump_setup_param_area(void)
17471747
{
17481748
phys_addr_t range_start, range_end;
17491749

1750+
if (!fw_dump.fadump_enabled)
1751+
return;
1752+
17501753
if (!fw_dump.param_area_supported || fw_dump.dump_active)
17511754
return;
17521755

arch/powerpc/kvm/book3s_xive.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -916,8 +916,7 @@ int kvmppc_xive_attach_escalation(struct kvm_vcpu *vcpu, u8 prio,
916916
* it fires once.
917917
*/
918918
if (single_escalation) {
919-
struct irq_data *d = irq_get_irq_data(xc->esc_virq[prio]);
920-
struct xive_irq_data *xd = irq_data_get_irq_handler_data(d);
919+
struct xive_irq_data *xd = irq_get_chip_data(xc->esc_virq[prio]);
921920

922921
xive_vm_esb_load(xd, XIVE_ESB_SET_PQ_01);
923922
vcpu->arch.xive_esc_raddr = xd->eoi_page;
@@ -1612,7 +1611,7 @@ int kvmppc_xive_set_mapped(struct kvm *kvm, unsigned long guest_irq,
16121611

16131612
/* Grab info about irq */
16141613
state->pt_number = hw_irq;
1615-
state->pt_data = irq_data_get_irq_handler_data(host_data);
1614+
state->pt_data = irq_data_get_irq_chip_data(host_data);
16161615

16171616
/*
16181617
* Configure the IRQ to match the existing configuration of
@@ -1787,8 +1786,7 @@ void kvmppc_xive_disable_vcpu_interrupts(struct kvm_vcpu *vcpu)
17871786
*/
17881787
void xive_cleanup_single_escalation(struct kvm_vcpu *vcpu, int irq)
17891788
{
1790-
struct irq_data *d = irq_get_irq_data(irq);
1791-
struct xive_irq_data *xd = irq_data_get_irq_handler_data(d);
1789+
struct xive_irq_data *xd = irq_get_chip_data(irq);
17921790

17931791
/*
17941792
* This slightly odd sequence gives the right result
@@ -2827,9 +2825,7 @@ int kvmppc_xive_debug_show_queues(struct seq_file *m, struct kvm_vcpu *vcpu)
28272825
i0, i1);
28282826
}
28292827
if (xc->esc_virq[i]) {
2830-
struct irq_data *d = irq_get_irq_data(xc->esc_virq[i]);
2831-
struct xive_irq_data *xd =
2832-
irq_data_get_irq_handler_data(d);
2828+
struct xive_irq_data *xd = irq_get_chip_data(xc->esc_virq[i]);
28332829
u64 pq = xive_vm_esb_load(xd, XIVE_ESB_GET);
28342830

28352831
seq_printf(m, " ESC %d %c%c EOI @%llx",

arch/powerpc/platforms/powernv/vas.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static int init_vas_instance(struct platform_device *pdev)
121121
return -EINVAL;
122122
}
123123

124-
xd = irq_get_handler_data(vinst->virq);
124+
xd = irq_get_chip_data(vinst->virq);
125125
if (!xd) {
126126
pr_err("Inst%d: Invalid virq %d\n",
127127
vinst->vas_id, vinst->virq);

arch/powerpc/platforms/pseries/msi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,7 @@ static int pseries_msi_ops_prepare(struct irq_domain *domain, struct device *dev
443443
*/
444444
static void pseries_msi_ops_teardown(struct irq_domain *domain, msi_alloc_info_t *arg)
445445
{
446-
struct msi_desc *desc = arg->desc;
447-
struct pci_dev *pdev = msi_desc_to_pci_dev(desc);
446+
struct pci_dev *pdev = to_pci_dev(domain->dev);
448447

449448
rtas_disable_msi(pdev);
450449
}

arch/powerpc/sysdev/xive/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ static void xive_flush_cpu_queue(unsigned int cpu, struct xive_cpu *xc)
15801580
cpu, irq);
15811581
#endif
15821582
raw_spin_lock(&desc->lock);
1583-
xd = irq_desc_get_handler_data(desc);
1583+
xd = irq_desc_get_chip_data(desc);
15841584

15851585
/*
15861586
* Clear saved_p to indicate that it's no longer pending

drivers/misc/ocxl/afu_irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ u64 ocxl_afu_irq_get_addr(struct ocxl_context *ctx, int irq_id)
203203
mutex_lock(&ctx->irq_lock);
204204
irq = idr_find(&ctx->irq_idr, irq_id);
205205
if (irq) {
206-
xd = irq_get_handler_data(irq->virq);
206+
xd = irq_get_chip_data(irq->virq);
207207
addr = xd ? xd->trig_page : 0;
208208
}
209209
mutex_unlock(&ctx->irq_lock);

0 commit comments

Comments
 (0)