riscv: pmp: Use XLEN-derived PMPCFG_STRIDE for array sizing

Replace `sizeof(unsigned long)` with `PMPCFG_STRIDE` (defined as
`__riscv_xlen / 8`) for dimensioning PMP configuration register arrays
(`pmpcfg_regs`).

The size of PMP configuration registers should be derived directly from
the target architecture's XLEN. Using `sizeof(unsigned long)` can cause
size mismatches, particularly with static analysis tools like SonarQube.
These tools might assume a host-specific size for `unsigned long`,
leading to spurious out-of-bounds access warnings when analyzing code
for different RISCV base architectures (e.g., RV32 vs. RV64).

This change ensures the array sizing is correctly and consistently tied
to the target's register width (XLEN).

Signed-off-by: Firas Sammoura <fsammoura@google.com>
3 files changed