Quoting Mika Kuoppala (2019-07-09 15:43:15) > Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes: > > static struct i915_page_directory *__alloc_pd(void) > > { > > struct i915_page_directory *pd; > > > > pd = kmalloc(sizeof(*pd), I915_GFP_ALLOW_FAIL); > > - > > if (unlikely(!pd)) > > return NULL; > > > > - memset(&pd->base, 0, sizeof(pd->base)); > > - atomic_set(&pd->used, 0); > > + atomic_set(px_used(pd), 0); > > spin_lock_init(&pd->lock); > > > > - /* for safety */ > > - pd->entry[0] = NULL; > > Perhaps yes this is superfluous as we (almost) always init after this, > or in the next call to vm. The blowout would be clearer if we forget, > but can live without. Further down the line, we don't even allocate it if we don't use it :) -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx