Re: [PATCH] drm/i915: Simplify guard logic for setup_scratch_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Chris Wilson (2018-01-29 10:28:40)
> Older gcc is complaining it can't follow the guards and thinks that
> addr may be used uninitialised
> 
> In the process, we can simplify down to one loop,
> add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-131 (-131)
> Function                                     old     new   delta
> setup_scratch_page                           545     414    -131
> 
> Reported-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Matthew Auld <matthew.auld@xxxxxxxxx>
> ---
> +       size = I915_GTT_PAGE_SIZE_4K;
>         if (i915_vm_is_48bit(vm) &&
>             HAS_PAGE_SIZES(vm->i915, I915_GTT_PAGE_SIZE_64K)) {
> +               size = I915_GTT_PAGE_SIZE_64K;
> +               gfp |= __GFP_NOWARN;

We may want to sneak in a __GFP_RETRY_MAYFAIL here.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux