Re: [PATCH] drm/i915: Record error batch buffers using iomem

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

 



On Tue, 11 May 2010 11:37:22 -0400, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, 11 May 2010 19:22:14 +0100 Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:
> 
> > +	reloc_offset = src_priv->gtt_offset;
> >  	for (page = 0; page < page_count; page++) {
> > -		void *s, *d = kmalloc(PAGE_SIZE, GFP_ATOMIC);
> > +		void __iomem *s;
> > +		void *d;
> > +
> > +		d = kmalloc(PAGE_SIZE, GFP_ATOMIC);
> >  		if (d == NULL)
> >  			goto unwind;
> > -		s = kmap_atomic(src_priv->pages[page], KM_USER0);
> > -		memcpy(d, s, PAGE_SIZE);
> > -		kunmap_atomic(s, KM_USER0);
> > +
> > +		s = io_mapping_map_atomic_wc(dev_priv->mm.gtt_mapping,
> > +					     reloc_offset);
> > +		memcpy_fromio(d, s, PAGE_SIZE);
> > +		io_mapping_unmap_atomic(s);
> 
> As mentioned in the other email, this will still corrupt the KM_USER0
> slot, and will generate a debug_kmap_atomic() warning.

How, as kmap_atomic(KM_USER0) is no longer used?
-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux