linux_dsm_epyc7002/drivers/soc/fsl
Rasmus Villemoes 21560067fb soc: fsl: qe: fold qe_get_num_of_snums into qe_snums_init
The comment "No QE ever has fewer than 28 SNUMs" is false; e.g. the
MPC8309 has 14. The code path returning -EINVAL is also a recipe for
instant disaster, since the caller (qe_snums_init) uncritically
assigns the return value to the unsigned qe_num_of_snum, and would
thus proceed to attempt to copy 4GB from snum_init_46[] to the snum[]
array.

So fold the handling of the legacy fsl,qe-num-snums into
qe_snums_init, and make sure we do not end up using the snum_init_46
array in cases other than the two where we know it makes sense.

Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Qiang Zhao <qiang.zhao@nxp.com>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
2019-06-05 14:26:52 -05:00
..
dpio soc: fsl: dpio: Add support for memory backed QBMan portals 2019-05-20 14:28:16 -05:00
qbman soc: fsl: qbman_portals: add APIs to retrieve the probing status 2019-05-20 14:28:16 -05:00
qe soc: fsl: qe: fold qe_get_num_of_snums into qe_snums_init 2019-06-05 14:26:52 -05:00
dpaa2-console.c soc: fsl: fix spelling mistake "Firmaware" -> "Firmware" 2019-05-29 15:52:10 -05:00
guts.c soc: fsl: guts: Add definition for LX2160A 2019-05-20 14:28:15 -05:00
Kconfig soc: fsl: add DPAA2 console support 2019-05-20 14:28:15 -05:00
Makefile soc: fsl: add DPAA2 console support 2019-05-20 14:28:15 -05:00