ARM: SoC fixes for v5.16

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.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmGK5wgACgkQmmx57+YA
 GNkXPQ/+NqTQhTedStOCyZjnWcdTU7SRA4huPCRUnalBZiuJizlA3QnRPWX67u4x
 dPL9hlhB6PtCVjsrSbMFo+xWlk5B8fssnRF/8L+AmLnEJ4tOI2bioiwjvyBdX4eT
 ZKTDHDxc5aNedQBr6agA5azFhMM+3L8GyJGDAh00LkFVRuBn96jgVi5iQnB/CVAg
 a6OQGbmHSWTnbYM2nntArv7ebwVJLItCGBGGLWHEIONSjmZitd/ABLgLTUP91i3N
 RDFSY23M8PggogDgtu/lhs6t/+Y0SUWyra0fHuW+enKMH3hwn2mXKuT3wKECJEgp
 6vgZr0LvYGL6IrDY3jQ7vzpyQqRDNtAXv0cGrTTRREXy96gTTLvF4e/t8DWTYfLC
 Hl91FVKK2ZskDvZTZVNjY94LdN8DYRNLTKtJQWZcoRLjMKTHT+udHMS0DKZRZvQG
 oZ6/CBSgUAsHIo6jl5T/6dziZo3/ZYpyCji+J8bVLnUwV6kwzkIHuHugC3kRVR64
 7lPiDlHtlKjQ4f315f7qrdMxsG0vM5nxgf8yoWrIGukxKTlq0rCstb+I1FQ1q9qX
 QxBS74sKOX2WpkKdT98iJ3K3meTsBtK24qVF3tAeRZDsyiB85I17M9fPjNtplVo/
 VopcWwt0UAnndmSMkZ2qeltPghaIV1hqKe12sNH/fYC48kndTYo=
 =u3qO
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2021-11-10 11:25:37 -08:00
commit 3f55f177ed
3 changed files with 5 additions and 7 deletions

View file

@ -231,6 +231,7 @@ static ssize_t dpaa2_console_read(struct file *fp, char __user *buf,
cd->cur_ptr += bytes;
written += bytes;
kfree(kbuf);
return written;
err_free_buf:

View file

@ -68,7 +68,7 @@ static inline struct dpaa2_io *service_select_by_cpu(struct dpaa2_io *d,
* potentially being migrated away.
*/
if (cpu < 0)
cpu = smp_processor_id();
cpu = raw_smp_processor_id();
/* If a specific cpu was requested, pick it up immediately */
return dpio_by_cpu[cpu];

View file

@ -737,8 +737,7 @@ int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
int i, num_enqueued = 0;
unsigned long irq_flags;
spin_lock(&s->access_spinlock);
local_irq_save(irq_flags);
spin_lock_irqsave(&s->access_spinlock, irq_flags);
half_mask = (s->eqcr.pi_ci_mask>>1);
full_mask = s->eqcr.pi_ci_mask;
@ -749,8 +748,7 @@ int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
s->eqcr.available = qm_cyc_diff(s->eqcr.pi_ring_size,
eqcr_ci, s->eqcr.ci);
if (!s->eqcr.available) {
local_irq_restore(irq_flags);
spin_unlock(&s->access_spinlock);
spin_unlock_irqrestore(&s->access_spinlock, irq_flags);
return 0;
}
}
@ -789,8 +787,7 @@ int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
dma_wmb();
qbman_write_register(s, QBMAN_CINH_SWP_EQCR_PI,
(QB_RT_BIT)|(s->eqcr.pi)|s->eqcr.pi_vb);
local_irq_restore(irq_flags);
spin_unlock(&s->access_spinlock);
spin_unlock_irqrestore(&s->access_spinlock, irq_flags);
return num_enqueued;
}