Skip to content

Commit 3f55f17

Browse files
committed
Merge tag 'arm-fixes-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull ARM SoC fixes from Arnd Bergmann: "This is one set of fixes for the NXP/FSL DPAA2 drivers, addressing a few minor issues. I received these just after sending out the last v5.15 fixes, and nothing in here seemed urgent enough for a quick follow-up" * tag 'arm-fixes-5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: 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
2 parents e8f023c + 76f7923 commit 3f55f17

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
@@ -68,7 +68,7 @@ static inline struct dpaa2_io *service_select_by_cpu(struct dpaa2_io *d,
6868
* potentially being migrated away.
6969
*/
7070
if (cpu < 0)
71-
cpu = smp_processor_id();
71+
cpu = raw_smp_processor_id();
7272

7373
/* If a specific cpu was requested, pick it up immediately */
7474
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
@@ -737,8 +737,7 @@ int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
737737
int i, num_enqueued = 0;
738738
unsigned long irq_flags;
739739

740-
spin_lock(&s->access_spinlock);
741-
local_irq_save(irq_flags);
740+
spin_lock_irqsave(&s->access_spinlock, irq_flags);
742741

743742
half_mask = (s->eqcr.pi_ci_mask>>1);
744743
full_mask = s->eqcr.pi_ci_mask;
@@ -749,8 +748,7 @@ int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
749748
s->eqcr.available = qm_cyc_diff(s->eqcr.pi_ring_size,
750749
eqcr_ci, s->eqcr.ci);
751750
if (!s->eqcr.available) {
752-
local_irq_restore(irq_flags);
753-
spin_unlock(&s->access_spinlock);
751+
spin_unlock_irqrestore(&s->access_spinlock, irq_flags);
754752
return 0;
755753
}
756754
}
@@ -789,8 +787,7 @@ int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
789787
dma_wmb();
790788
qbman_write_register(s, QBMAN_CINH_SWP_EQCR_PI,
791789
(QB_RT_BIT)|(s->eqcr.pi)|s->eqcr.pi_vb);
792-
local_irq_restore(irq_flags);
793-
spin_unlock(&s->access_spinlock);
790+
spin_unlock_irqrestore(&s->access_spinlock, irq_flags);
794791

795792
return num_enqueued;
796793
}

0 commit comments

Comments
 (0)