diff mbox series

drm/msm: Fix build break with recent mm tree

Message ID 20220929161404.2769414-1-robdclark@gmail.com (mailing list archive)
State New, archived
Headers show
Series drm/msm: Fix build break with recent mm tree | expand

Commit Message

Rob Clark Sept. 29, 2022, 4:14 p.m. UTC
From: Rob Clark <robdclark@chromium.org>

9178e3dcb121 ("mm: discard __GFP_ATOMIC") removed __GFP_ATOMIC,
replacing it with a check for not __GFP_DIRECT_RECLAIM.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Rob Clark <robdclark@chromium.org>
---
Sorry, this was reported by Stephen earlier in the month, while
I was on the other side of the globe and jetlagged.  Unfortunately
I forgot about it by the time I got back home.  Applying this patch
after 025d27239a2f ("drm/msm/gem: Evict active GEM objects when necessary")
but before or after 9178e3dcb121 ("mm: discard __GFP_ATOMIC") should
resolve the build breakage.

 drivers/gpu/drm/msm/msm_gem_shrinker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Randy Dunlap Sept. 29, 2022, 4:36 p.m. UTC | #1
On 9/29/22 09:14, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
> 
> 9178e3dcb121 ("mm: discard __GFP_ATOMIC") removed __GFP_ATOMIC,
> replacing it with a check for not __GFP_DIRECT_RECLAIM.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Rob Clark <robdclark@chromium.org>

Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
> Sorry, this was reported by Stephen earlier in the month, while
> I was on the other side of the globe and jetlagged.  Unfortunately
> I forgot about it by the time I got back home.  Applying this patch
> after 025d27239a2f ("drm/msm/gem: Evict active GEM objects when necessary")
> but before or after 9178e3dcb121 ("mm: discard __GFP_ATOMIC") should
> resolve the build breakage.
> 
>  drivers/gpu/drm/msm/msm_gem_shrinker.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> index 473ced14e520..8f83454ceedf 100644
> --- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
> +++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
> @@ -27,7 +27,7 @@ static bool can_swap(void)
>  
>  static bool can_block(struct shrink_control *sc)
>  {
> -	if (sc->gfp_mask & __GFP_ATOMIC)
> +	if (!(sc->gfp_mask & __GFP_DIRECT_RECLAIM))
>  		return false;
>  	return current_is_kswapd() || (sc->gfp_mask & __GFP_RECLAIM);
>  }
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
index 473ced14e520..8f83454ceedf 100644
--- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
+++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
@@ -27,7 +27,7 @@  static bool can_swap(void)
 
 static bool can_block(struct shrink_control *sc)
 {
-	if (sc->gfp_mask & __GFP_ATOMIC)
+	if (!(sc->gfp_mask & __GFP_DIRECT_RECLAIM))
 		return false;
 	return current_is_kswapd() || (sc->gfp_mask & __GFP_RECLAIM);
 }