✓ CI.checkpatch: success for drm/xe/gt: Fix assert in L3 bank mask generation (rev4)
Patchwork
patchwork at emeril.freedesktop.org
Thu May 2 13:44:17 UTC 2024
== Series Details ==
Series: drm/xe/gt: Fix assert in L3 bank mask generation (rev4)
URL : https://patchwork.freedesktop.org/series/133055/
State : success
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
0daf0be5bb95eb0a0e42275e00a0e42d8d8fd543
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 51ade325c17ca2ffda01468e6c170591bd5e14e8
Author: Francois Dugast <francois.dugast at intel.com>
Date: Thu May 2 14:43:10 2024 +0200
drm/xe/gt: Fix assert in L3 bank mask generation
What needs to be asserted is that the pattern fits in the number
of bits provided by the user in patternbits, otherwise it would
be truncated when replicated according to the mask, which is
likely not the intended use of this function.
The pattern argument is a bitmap so use find_last_bit() instead
of fls(). The bit position starts at index 0 so remove "or equal"
from the comparison. XE_MAX_L3_BANK_MASK_BITS would be the
returned value if the pattern is 0, which can be the case on some
platforms.
v2: Check the result does not overflow the array (Lucas De Marchi)
v3: Use __fls() for long and handle mask == 0 (Lucas De Marchi)
Cc: Matt Roper <matthew.d.roper at intel.com>
Cc: Lucas De Marchi <lucas.demarchi at intel.com>
Signed-off-by: Francois Dugast <francois.dugast at intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
+ /mt/dim checkpatch 1b26f047c5fd5ce2cb738736d729d198b4ead7c8 drm-intel
51ade325c17c drm/xe/gt: Fix assert in L3 bank mask generation
More information about the Intel-xe
mailing list