All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: drm: add helper to clflush a virtual address range
       [not found] <20120524195529.234567C007E@ra.kernel.org>
@ 2012-05-25  5:24 ` Greg KH
  2012-05-25  7:35     ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2012-05-25  5:24 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: chris, dri-devel, Linux Kernel Mailing List

Hi Daniel,

I see you say you wanted the patch below for the stable tree, due to
some later patch needing it, yet this patch was not "marked" for the
stable tree, and I can't seem to figure out which "later patch" you are
referring to here.

Any hints on what I should do for the 3.4-stable kernel tree with this?

thanks,

greg k-h

On Thu, May 24, 2012 at 07:55:29PM +0000, Linux Kernel Mailing List wrote:
> Gitweb:     http://git.kernel.org/linus/;a=commit;h=6d5cd9cb1e32e4f4e4468704430b26bcb0bfb129
> Commit:     6d5cd9cb1e32e4f4e4468704430b26bcb0bfb129
> Parent:     dbf7bff074d5fdc87c61b1b41d8e809109cf0bf8
> Author:     Daniel Vetter <daniel.vetter@ffwll.ch>
> AuthorDate: Sun Mar 25 19:47:30 2012 +0200
> Committer:  Daniel Vetter <daniel.vetter@ffwll.ch>
> CommitDate: Tue Mar 27 13:19:45 2012 +0200
> 
>     drm: add helper to clflush a virtual address range
>     
>     Useful when the page is already mapped to copy date in/out.
>     
>     For -stable because the next patch (fixing phys obj pwrite) needs this
>     little helper function.
>     
>     Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
>     Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
>     Cc: dri-devel@lists.freedesktop.org
>     Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/drm_cache.c |   23 +++++++++++++++++++++++
>  include/drm/drmP.h          |    1 +
>  2 files changed, 24 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
> index 5928653..c7c8f6b 100644
> --- a/drivers/gpu/drm/drm_cache.c
> +++ b/drivers/gpu/drm/drm_cache.c
> @@ -98,3 +98,26 @@ drm_clflush_pages(struct page *pages[], unsigned long num_pages)
>  #endif
>  }
>  EXPORT_SYMBOL(drm_clflush_pages);
> +
> +void
> +drm_clflush_virt_range(char *addr, unsigned long length)
> +{
> +#if defined(CONFIG_X86)
> +	if (cpu_has_clflush) {
> +		char *end = addr + length;
> +		mb();
> +		for (; addr < end; addr += boot_cpu_data.x86_clflush_size)
> +			clflush(addr);
> +		clflush(end - 1);
> +		mb();
> +		return;
> +	}
> +
> +	if (on_each_cpu(drm_clflush_ipi_handler, NULL, 1) != 0)
> +		printk(KERN_ERR "Timed out waiting for cache flush.\n");
> +#else
> +	printk(KERN_ERR "Architecture has no drm_cache.c support\n");
> +	WARN_ON_ONCE(1);
> +#endif
> +}
> +EXPORT_SYMBOL(drm_clflush_virt_range);
> diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> index 92f0981..d33597b 100644
> --- a/include/drm/drmP.h
> +++ b/include/drm/drmP.h
> @@ -1332,6 +1332,7 @@ extern int drm_remove_magic(struct drm_master *master, drm_magic_t magic);
>  
>  /* Cache management (drm_cache.c) */
>  void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
> +void drm_clflush_virt_range(char *addr, unsigned long length);
>  
>  				/* Locking IOCTL support (drm_lock.h) */
>  extern int drm_lock(struct drm_device *dev, void *data,
> --
> To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: drm: add helper to clflush a virtual address range
  2012-05-25  5:24 ` drm: add helper to clflush a virtual address range Greg KH
@ 2012-05-25  7:35     ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2012-05-25  7:35 UTC (permalink / raw)
  To: Greg KH; +Cc: Daniel Vetter, Linux Kernel Mailing List, dri-devel

Hi Greg,

On Fri, May 25, 2012 at 02:24:32PM +0900, Greg KH wrote:
> I see you say you wanted the patch below for the stable tree, due to
> some later patch needing it, yet this patch was not "marked" for the
> stable tree, and I can't seem to figure out which "later patch" you are
> referring to here.
> 
> Any hints on what I should do for the 3.4-stable kernel tree with this?

Oops, I've changed plans for that bug and sent a more minimal patch that
simply covers over the problem rather well than fixes it 100% perfect.
I've dropped the Cc: stable, bug forgot to adjust the commit message.

So this patch isn't for stable any more, sorry for wasting your time.

Yours, Daniel

> 
> thanks,
> 
> greg k-h
> 
> On Thu, May 24, 2012 at 07:55:29PM +0000, Linux Kernel Mailing List wrote:
> > Gitweb:     http://git.kernel.org/linus/;a=commit;h=6d5cd9cb1e32e4f4e4468704430b26bcb0bfb129
> > Commit:     6d5cd9cb1e32e4f4e4468704430b26bcb0bfb129
> > Parent:     dbf7bff074d5fdc87c61b1b41d8e809109cf0bf8
> > Author:     Daniel Vetter <daniel.vetter@ffwll.ch>
> > AuthorDate: Sun Mar 25 19:47:30 2012 +0200
> > Committer:  Daniel Vetter <daniel.vetter@ffwll.ch>
> > CommitDate: Tue Mar 27 13:19:45 2012 +0200
> > 
> >     drm: add helper to clflush a virtual address range
> >     
> >     Useful when the page is already mapped to copy date in/out.
> >     
> >     For -stable because the next patch (fixing phys obj pwrite) needs this
> >     little helper function.
> >     
> >     Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
> >     Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> >     Cc: dri-devel@lists.freedesktop.org
> >     Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > ---
> >  drivers/gpu/drm/drm_cache.c |   23 +++++++++++++++++++++++
> >  include/drm/drmP.h          |    1 +
> >  2 files changed, 24 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
> > index 5928653..c7c8f6b 100644
> > --- a/drivers/gpu/drm/drm_cache.c
> > +++ b/drivers/gpu/drm/drm_cache.c
> > @@ -98,3 +98,26 @@ drm_clflush_pages(struct page *pages[], unsigned long num_pages)
> >  #endif
> >  }
> >  EXPORT_SYMBOL(drm_clflush_pages);
> > +
> > +void
> > +drm_clflush_virt_range(char *addr, unsigned long length)
> > +{
> > +#if defined(CONFIG_X86)
> > +	if (cpu_has_clflush) {
> > +		char *end = addr + length;
> > +		mb();
> > +		for (; addr < end; addr += boot_cpu_data.x86_clflush_size)
> > +			clflush(addr);
> > +		clflush(end - 1);
> > +		mb();
> > +		return;
> > +	}
> > +
> > +	if (on_each_cpu(drm_clflush_ipi_handler, NULL, 1) != 0)
> > +		printk(KERN_ERR "Timed out waiting for cache flush.\n");
> > +#else
> > +	printk(KERN_ERR "Architecture has no drm_cache.c support\n");
> > +	WARN_ON_ONCE(1);
> > +#endif
> > +}
> > +EXPORT_SYMBOL(drm_clflush_virt_range);
> > diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> > index 92f0981..d33597b 100644
> > --- a/include/drm/drmP.h
> > +++ b/include/drm/drmP.h
> > @@ -1332,6 +1332,7 @@ extern int drm_remove_magic(struct drm_master *master, drm_magic_t magic);
> >  
> >  /* Cache management (drm_cache.c) */
> >  void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
> > +void drm_clflush_virt_range(char *addr, unsigned long length);
> >  
> >  				/* Locking IOCTL support (drm_lock.h) */
> >  extern int drm_lock(struct drm_device *dev, void *data,
> > --
> > To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: drm: add helper to clflush a virtual address range
@ 2012-05-25  7:35     ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2012-05-25  7:35 UTC (permalink / raw)
  To: Greg KH; +Cc: Daniel Vetter, chris, dri-devel, Linux Kernel Mailing List

Hi Greg,

On Fri, May 25, 2012 at 02:24:32PM +0900, Greg KH wrote:
> I see you say you wanted the patch below for the stable tree, due to
> some later patch needing it, yet this patch was not "marked" for the
> stable tree, and I can't seem to figure out which "later patch" you are
> referring to here.
> 
> Any hints on what I should do for the 3.4-stable kernel tree with this?

Oops, I've changed plans for that bug and sent a more minimal patch that
simply covers over the problem rather well than fixes it 100% perfect.
I've dropped the Cc: stable, bug forgot to adjust the commit message.

So this patch isn't for stable any more, sorry for wasting your time.

Yours, Daniel

> 
> thanks,
> 
> greg k-h
> 
> On Thu, May 24, 2012 at 07:55:29PM +0000, Linux Kernel Mailing List wrote:
> > Gitweb:     http://git.kernel.org/linus/;a=commit;h=6d5cd9cb1e32e4f4e4468704430b26bcb0bfb129
> > Commit:     6d5cd9cb1e32e4f4e4468704430b26bcb0bfb129
> > Parent:     dbf7bff074d5fdc87c61b1b41d8e809109cf0bf8
> > Author:     Daniel Vetter <daniel.vetter@ffwll.ch>
> > AuthorDate: Sun Mar 25 19:47:30 2012 +0200
> > Committer:  Daniel Vetter <daniel.vetter@ffwll.ch>
> > CommitDate: Tue Mar 27 13:19:45 2012 +0200
> > 
> >     drm: add helper to clflush a virtual address range
> >     
> >     Useful when the page is already mapped to copy date in/out.
> >     
> >     For -stable because the next patch (fixing phys obj pwrite) needs this
> >     little helper function.
> >     
> >     Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
> >     Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> >     Cc: dri-devel@lists.freedesktop.org
> >     Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > ---
> >  drivers/gpu/drm/drm_cache.c |   23 +++++++++++++++++++++++
> >  include/drm/drmP.h          |    1 +
> >  2 files changed, 24 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
> > index 5928653..c7c8f6b 100644
> > --- a/drivers/gpu/drm/drm_cache.c
> > +++ b/drivers/gpu/drm/drm_cache.c
> > @@ -98,3 +98,26 @@ drm_clflush_pages(struct page *pages[], unsigned long num_pages)
> >  #endif
> >  }
> >  EXPORT_SYMBOL(drm_clflush_pages);
> > +
> > +void
> > +drm_clflush_virt_range(char *addr, unsigned long length)
> > +{
> > +#if defined(CONFIG_X86)
> > +	if (cpu_has_clflush) {
> > +		char *end = addr + length;
> > +		mb();
> > +		for (; addr < end; addr += boot_cpu_data.x86_clflush_size)
> > +			clflush(addr);
> > +		clflush(end - 1);
> > +		mb();
> > +		return;
> > +	}
> > +
> > +	if (on_each_cpu(drm_clflush_ipi_handler, NULL, 1) != 0)
> > +		printk(KERN_ERR "Timed out waiting for cache flush.\n");
> > +#else
> > +	printk(KERN_ERR "Architecture has no drm_cache.c support\n");
> > +	WARN_ON_ONCE(1);
> > +#endif
> > +}
> > +EXPORT_SYMBOL(drm_clflush_virt_range);
> > diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> > index 92f0981..d33597b 100644
> > --- a/include/drm/drmP.h
> > +++ b/include/drm/drmP.h
> > @@ -1332,6 +1332,7 @@ extern int drm_remove_magic(struct drm_master *master, drm_magic_t magic);
> >  
> >  /* Cache management (drm_cache.c) */
> >  void drm_clflush_pages(struct page *pages[], unsigned long num_pages);
> > +void drm_clflush_virt_range(char *addr, unsigned long length);
> >  
> >  				/* Locking IOCTL support (drm_lock.h) */
> >  extern int drm_lock(struct drm_device *dev, void *data,
> > --
> > To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-25  7:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20120524195529.234567C007E@ra.kernel.org>
2012-05-25  5:24 ` drm: add helper to clflush a virtual address range Greg KH
2012-05-25  7:35   ` Daniel Vetter
2012-05-25  7:35     ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.