Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/mpic: Pass first free vector number to mpic_setup_error_int()

Update the comment to account for the spurious interrupt number. The
code was already accounting for it, but that was unclear because it
was achieved by mpic_setup_error_int() knowing that the number it was
passed was the last used vector, rather than the first free vector.

So change the meaning of the argument to the first free vector and
update the caller to pass 13, instead of 12, to achieve the same
result.

Signed-off-by: Bharat Bhushan <Bharat.Bhushan@nxp.com>
[mpe: Rewrite change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Bharat Bhushan and committed by
Michael Ellerman
fca7bf94 fdf743c5

+4 -4
+1 -1
arch/powerpc/sysdev/fsl_mpic_err.c
··· 76 76 mpic->flags |= MPIC_FSL_HAS_EIMR; 77 77 /* allocate interrupt vectors for error interrupts */ 78 78 for (i = MPIC_MAX_ERR - 1; i >= 0; i--) 79 - mpic->err_int_vecs[i] = --intvec; 79 + mpic->err_int_vecs[i] = intvec--; 80 80 81 81 return 0; 82 82 }
+3 -3
arch/powerpc/sysdev/mpic.c
··· 1380 1380 * global vector number space, as in case of ipis 1381 1381 * and timer interrupts. 1382 1382 * 1383 - * Available vector space = intvec_top - 12, where 12 1383 + * Available vector space = intvec_top - 13, where 13 1384 1384 * is the number of vectors which have been consumed by 1385 - * ipis and timer interrupts. 1385 + * ipis, timer interrupts and spurious. 1386 1386 */ 1387 1387 if (fsl_version >= 0x401) { 1388 - ret = mpic_setup_error_int(mpic, intvec_top - 12); 1388 + ret = mpic_setup_error_int(mpic, intvec_top - 13); 1389 1389 if (ret) 1390 1390 return NULL; 1391 1391 }