Skip to content

Commit 76f7923

Browse files
committed
Merge tag 'soc-fsl-fix-v5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/fixes
NXP/FSL SoC driver fixes for v5.15 DPAA2 DPIO driver - replace smp_processor_id with raw_smp_processor_id to fix preempt debug BUG - use the combined functions to protect critical zone to fix deadlock DPAA2 console - free buffer before returning from dpaa2_console_read * tag 'soc-fsl-fix-v5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: dpaa2-console: free buffer before returning from dpaa2_console_read soc: fsl: dpio: use the combined functions to protect critical zone soc: fsl: dpio: replace smp_processor_id with raw_smp_processor_id Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 05d5da3 + 8120bd4 commit 76f7923

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

drivers/soc/fsl/dpaa2-console.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ static ssize_t dpaa2_console_read(struct file *fp, char __user *buf,
231231
cd->cur_ptr += bytes;
232232
written += bytes;
233233

234+
kfree(kbuf);
234235
return written;
235236

236237
err_free_buf:

drivers/soc/fsl/dpio/dpio-service.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static inline struct dpaa2_io *service_select_by_cpu(struct dpaa2_io *d,
5959
* potentially being migrated away.
6060
*/
6161
if (cpu < 0)
62-
cpu = smp_processor_id();
62+
cpu = raw_smp_processor_id();
6363

6464
/* If a specific cpu was requested, pick it up immediately */
6565
return dpio_by_cpu[cpu];

drivers/soc/fsl/dpio/qbman-portal.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -732,8 +732,7 @@ int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
732732
int i, num_enqueued = 0;
733733
unsigned long irq_flags;
734734

735-
spin_lock(&s->access_spinlock);
736-
local_irq_save(irq_flags);
735+
spin_lock_irqsave(&s->access_spinlock, irq_flags);
737736

738737
half_mask = (s->eqcr.pi_ci_mask>>1);
739738
full_mask = s->eqcr.pi_ci_mask;
@@ -744,8 +743,7 @@ int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
744743
s->eqcr.available = qm_cyc_diff(s->eqcr.pi_ring_size,
745744
eqcr_ci, s->eqcr.ci);
746745
if (!s->eqcr.available) {
747-
local_irq_restore(irq_flags);
748-
spin_unlock(&s->access_spinlock);
746+
spin_unlock_irqrestore(&s->access_spinlock, irq_flags);
749747
return 0;
750748
}
751749
}
@@ -784,8 +782,7 @@ int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
784782
dma_wmb();
785783
qbman_write_register(s, QBMAN_CINH_SWP_EQCR_PI,
786784
(QB_RT_BIT)|(s->eqcr.pi)|s->eqcr.pi_vb);
787-
local_irq_restore(irq_flags);
788-
spin_unlock(&s->access_spinlock);
785+
spin_unlock_irqrestore(&s->access_spinlock, irq_flags);
789786

790787
return num_enqueued;
791788
}

0 commit comments

Comments
 (0)