Quoting Matthew Auld (2020-01-23 09:38:02) > On Thu, 23 Jan 2020 at 08:51, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote: > > > > Using a clear page for scratch means that we have relatively benign > > errors in case it is accidentally used, but that can be rather too > > benign for debugging. If we poison the scratch, ideally it quickly > > results in an obvious error. > > > > Suggested-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > > Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> > > [snip] > > > > > +static void poison_scratch_page(struct page *page, unsigned long size) > > +{ > > + if (!IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM)) > > + return; > > + > > + kunmap_atomic(memset(kmap_atomic(page), POISON_FREE, size)); > > kmap works for !order-zero? Definitely works if not highmem :) But needs a page by page approach just in case, fine. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx