Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] doc: comment contradicts code on RO cache invalidation
--

commit 97f084533582df463bbfd6d17bb8670c85068160
Author: Boris Brezillon <[email protected]>

drm/panthor: Don't invalidate OTHER caches

This commit stops invalidating OTHER (L1 read-only) caches during MMU
operations to prevent issues with flush-elimination logic on v13 hardware.
The invalidation is deemed unnecessary as TLB invalidation prevents context
data leaks and the cache is read-only.

> diff --git a/drivers/gpu/drm/panthor/panthor_mmu.c 
> b/drivers/gpu/drm/panthor/panthor_mmu.c
> index 9f63a048df61c..7e98084b9a1ed 100644
> --- a/drivers/gpu/drm/panthor/panthor_mmu.c
> +++ b/drivers/gpu/drm/panthor/panthor_mmu.c

[ ... ]

> @@ -1841,8 +1841,7 @@ static void panthor_vm_unlock_region(struct panthor_vm 
> *vm)
>                * range is narrow enough and the HW supports it.
>                */
>               ret = panthor_gpu_flush_caches(ptdev, CACHE_CLEAN | CACHE_INV,
> -                                            CACHE_CLEAN | CACHE_INV,
> -                                            CACHE_INV);
> +                                            CACHE_CLEAN | CACHE_INV, 0);

[Severity: Low]
This isn't a bug, but should the comment just above this call in
panthor_vm_unlock_region() be updated?

The comment still explicitly says "and invalidate RO ones", which now
contradicts the implementation since 0 is being passed for the OTHER (RO)
caches.

>  
>               /* Unlock the region if the flush is effective. */
>               if (!ret)

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to