LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] gpu: drm: drm_vm: Adding new typedef vm_fault_t
@ 2018-05-10 13:42 Souptick Joarder
2018-05-16 4:39 ` Souptick Joarder
0 siblings, 1 reply; 4+ messages in thread
From: Souptick Joarder @ 2018-05-10 13:42 UTC (permalink / raw)
To: daniel.vetter, gustavo, seanpaul, airlied; +Cc: dri-devel, linux-kernel, willy
Use new return type vm_fault_t for fault handler. For
now, this is just documenting that the function returns
a VM_FAULT value rather than an errno. Once all instances
are converted, vm_fault_t will become a distinct type.
commit 1c8f422059ae ("mm: change return type to vm_fault_t")
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
---
drivers/gpu/drm/drm_vm.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
index 2660543..c330104 100644
--- a/drivers/gpu/drm/drm_vm.c
+++ b/drivers/gpu/drm/drm_vm.c
@@ -100,7 +100,7 @@ static pgprot_t drm_dma_prot(uint32_t map_type, struct vm_area_struct *vma)
* map, get the page, increment the use count and return it.
*/
#if IS_ENABLED(CONFIG_AGP)
-static int drm_vm_fault(struct vm_fault *vmf)
+static vm_fault_t drm_vm_fault(struct vm_fault *vmf)
{
struct vm_area_struct *vma = vmf->vma;
struct drm_file *priv = vma->vm_file->private_data;
@@ -173,7 +173,7 @@ static int drm_vm_fault(struct vm_fault *vmf)
return VM_FAULT_SIGBUS; /* Disallow mremap */
}
#else
-static int drm_vm_fault(struct vm_fault *vmf)
+static vm_fault_t drm_vm_fault(struct vm_fault *vmf)
{
return VM_FAULT_SIGBUS;
}
@@ -189,7 +189,7 @@ static int drm_vm_fault(struct vm_fault *vmf)
* Get the mapping, find the real physical page to map, get the page, and
* return it.
*/
-static int drm_vm_shm_fault(struct vm_fault *vmf)
+static vm_fault_t drm_vm_shm_fault(struct vm_fault *vmf)
{
struct vm_area_struct *vma = vmf->vma;
struct drm_local_map *map = vma->vm_private_data;
@@ -291,7 +291,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
*
* Determine the page number from the page offset and get it from drm_device_dma::pagelist.
*/
-static int drm_vm_dma_fault(struct vm_fault *vmf)
+static vm_fault_t drm_vm_dma_fault(struct vm_fault *vmf)
{
struct vm_area_struct *vma = vmf->vma;
struct drm_file *priv = vma->vm_file->private_data;
@@ -326,7 +326,7 @@ static int drm_vm_dma_fault(struct vm_fault *vmf)
*
* Determine the map offset from the page offset and get it from drm_sg_mem::pagelist.
*/
-static int drm_vm_sg_fault(struct vm_fault *vmf)
+static vm_fault_t drm_vm_sg_fault(struct vm_fault *vmf)
{
struct vm_area_struct *vma = vmf->vma;
struct drm_local_map *map = vma->vm_private_data;
--
1.9.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpu: drm: drm_vm: Adding new typedef vm_fault_t
2018-05-10 13:42 [PATCH] gpu: drm: drm_vm: Adding new typedef vm_fault_t Souptick Joarder
@ 2018-05-16 4:39 ` Souptick Joarder
2018-05-24 20:30 ` Souptick Joarder
0 siblings, 1 reply; 4+ messages in thread
From: Souptick Joarder @ 2018-05-16 4:39 UTC (permalink / raw)
To: daniel.vetter, Gustavo Padovan, Sean Paul, airlied
Cc: dri-devel, linux-kernel, Matthew Wilcox
On Thu, May 10, 2018 at 7:12 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
> Use new return type vm_fault_t for fault handler. For
> now, this is just documenting that the function returns
> a VM_FAULT value rather than an errno. Once all instances
> are converted, vm_fault_t will become a distinct type.
>
> commit 1c8f422059ae ("mm: change return type to vm_fault_t")
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
> ---
> drivers/gpu/drm/drm_vm.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
> index 2660543..c330104 100644
> --- a/drivers/gpu/drm/drm_vm.c
> +++ b/drivers/gpu/drm/drm_vm.c
> @@ -100,7 +100,7 @@ static pgprot_t drm_dma_prot(uint32_t map_type, struct vm_area_struct *vma)
> * map, get the page, increment the use count and return it.
> */
> #if IS_ENABLED(CONFIG_AGP)
> -static int drm_vm_fault(struct vm_fault *vmf)
> +static vm_fault_t drm_vm_fault(struct vm_fault *vmf)
> {
> struct vm_area_struct *vma = vmf->vma;
> struct drm_file *priv = vma->vm_file->private_data;
> @@ -173,7 +173,7 @@ static int drm_vm_fault(struct vm_fault *vmf)
> return VM_FAULT_SIGBUS; /* Disallow mremap */
> }
> #else
> -static int drm_vm_fault(struct vm_fault *vmf)
> +static vm_fault_t drm_vm_fault(struct vm_fault *vmf)
> {
> return VM_FAULT_SIGBUS;
> }
> @@ -189,7 +189,7 @@ static int drm_vm_fault(struct vm_fault *vmf)
> * Get the mapping, find the real physical page to map, get the page, and
> * return it.
> */
> -static int drm_vm_shm_fault(struct vm_fault *vmf)
> +static vm_fault_t drm_vm_shm_fault(struct vm_fault *vmf)
> {
> struct vm_area_struct *vma = vmf->vma;
> struct drm_local_map *map = vma->vm_private_data;
> @@ -291,7 +291,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
> *
> * Determine the page number from the page offset and get it from drm_device_dma::pagelist.
> */
> -static int drm_vm_dma_fault(struct vm_fault *vmf)
> +static vm_fault_t drm_vm_dma_fault(struct vm_fault *vmf)
> {
> struct vm_area_struct *vma = vmf->vma;
> struct drm_file *priv = vma->vm_file->private_data;
> @@ -326,7 +326,7 @@ static int drm_vm_dma_fault(struct vm_fault *vmf)
> *
> * Determine the map offset from the page offset and get it from drm_sg_mem::pagelist.
> */
> -static int drm_vm_sg_fault(struct vm_fault *vmf)
> +static vm_fault_t drm_vm_sg_fault(struct vm_fault *vmf)
> {
> struct vm_area_struct *vma = vmf->vma;
> struct drm_local_map *map = vma->vm_private_data;
> --
> 1.9.1
>
Daniel, if no further comment, we would like to get this patch
in queue for 4.18.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpu: drm: drm_vm: Adding new typedef vm_fault_t
2018-05-16 4:39 ` Souptick Joarder
@ 2018-05-24 20:30 ` Souptick Joarder
2018-05-29 6:59 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Souptick Joarder @ 2018-05-24 20:30 UTC (permalink / raw)
To: daniel.vetter, Gustavo Padovan, Sean Paul, airlied
Cc: dri-devel, linux-kernel, Matthew Wilcox
On Wed, May 16, 2018 at 10:09 AM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
> On Thu, May 10, 2018 at 7:12 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
>> Use new return type vm_fault_t for fault handler. For
>> now, this is just documenting that the function returns
>> a VM_FAULT value rather than an errno. Once all instances
>> are converted, vm_fault_t will become a distinct type.
>>
>> commit 1c8f422059ae ("mm: change return type to vm_fault_t")
>>
>> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
>> Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
>> ---
>> drivers/gpu/drm/drm_vm.c | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
>> index 2660543..c330104 100644
>> --- a/drivers/gpu/drm/drm_vm.c
>> +++ b/drivers/gpu/drm/drm_vm.c
>> @@ -100,7 +100,7 @@ static pgprot_t drm_dma_prot(uint32_t map_type, struct vm_area_struct *vma)
>> * map, get the page, increment the use count and return it.
>> */
>> #if IS_ENABLED(CONFIG_AGP)
>> -static int drm_vm_fault(struct vm_fault *vmf)
>> +static vm_fault_t drm_vm_fault(struct vm_fault *vmf)
>> {
>> struct vm_area_struct *vma = vmf->vma;
>> struct drm_file *priv = vma->vm_file->private_data;
>> @@ -173,7 +173,7 @@ static int drm_vm_fault(struct vm_fault *vmf)
>> return VM_FAULT_SIGBUS; /* Disallow mremap */
>> }
>> #else
>> -static int drm_vm_fault(struct vm_fault *vmf)
>> +static vm_fault_t drm_vm_fault(struct vm_fault *vmf)
>> {
>> return VM_FAULT_SIGBUS;
>> }
>> @@ -189,7 +189,7 @@ static int drm_vm_fault(struct vm_fault *vmf)
>> * Get the mapping, find the real physical page to map, get the page, and
>> * return it.
>> */
>> -static int drm_vm_shm_fault(struct vm_fault *vmf)
>> +static vm_fault_t drm_vm_shm_fault(struct vm_fault *vmf)
>> {
>> struct vm_area_struct *vma = vmf->vma;
>> struct drm_local_map *map = vma->vm_private_data;
>> @@ -291,7 +291,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
>> *
>> * Determine the page number from the page offset and get it from drm_device_dma::pagelist.
>> */
>> -static int drm_vm_dma_fault(struct vm_fault *vmf)
>> +static vm_fault_t drm_vm_dma_fault(struct vm_fault *vmf)
>> {
>> struct vm_area_struct *vma = vmf->vma;
>> struct drm_file *priv = vma->vm_file->private_data;
>> @@ -326,7 +326,7 @@ static int drm_vm_dma_fault(struct vm_fault *vmf)
>> *
>> * Determine the map offset from the page offset and get it from drm_sg_mem::pagelist.
>> */
>> -static int drm_vm_sg_fault(struct vm_fault *vmf)
>> +static vm_fault_t drm_vm_sg_fault(struct vm_fault *vmf)
>> {
>> struct vm_area_struct *vma = vmf->vma;
>> struct drm_local_map *map = vma->vm_private_data;
>> --
>> 1.9.1
>>
>
> Daniel, if no further comment, we would like to get this patch
> in queue for 4.18.
We would like to get this in queue for 4.18.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpu: drm: drm_vm: Adding new typedef vm_fault_t
2018-05-24 20:30 ` Souptick Joarder
@ 2018-05-29 6:59 ` Daniel Vetter
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2018-05-29 6:59 UTC (permalink / raw)
To: Souptick Joarder
Cc: daniel.vetter, Gustavo Padovan, Sean Paul, airlied,
Matthew Wilcox, linux-kernel, dri-devel
On Fri, May 25, 2018 at 02:00:33AM +0530, Souptick Joarder wrote:
> On Wed, May 16, 2018 at 10:09 AM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
> > On Thu, May 10, 2018 at 7:12 PM, Souptick Joarder <jrdr.linux@gmail.com> wrote:
> >> Use new return type vm_fault_t for fault handler. For
> >> now, this is just documenting that the function returns
> >> a VM_FAULT value rather than an errno. Once all instances
> >> are converted, vm_fault_t will become a distinct type.
> >>
> >> commit 1c8f422059ae ("mm: change return type to vm_fault_t")
> >>
> >> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> >> Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
> >> ---
> >> drivers/gpu/drm/drm_vm.c | 10 +++++-----
> >> 1 file changed, 5 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
> >> index 2660543..c330104 100644
> >> --- a/drivers/gpu/drm/drm_vm.c
> >> +++ b/drivers/gpu/drm/drm_vm.c
> >> @@ -100,7 +100,7 @@ static pgprot_t drm_dma_prot(uint32_t map_type, struct vm_area_struct *vma)
> >> * map, get the page, increment the use count and return it.
> >> */
> >> #if IS_ENABLED(CONFIG_AGP)
> >> -static int drm_vm_fault(struct vm_fault *vmf)
> >> +static vm_fault_t drm_vm_fault(struct vm_fault *vmf)
> >> {
> >> struct vm_area_struct *vma = vmf->vma;
> >> struct drm_file *priv = vma->vm_file->private_data;
> >> @@ -173,7 +173,7 @@ static int drm_vm_fault(struct vm_fault *vmf)
> >> return VM_FAULT_SIGBUS; /* Disallow mremap */
> >> }
> >> #else
> >> -static int drm_vm_fault(struct vm_fault *vmf)
> >> +static vm_fault_t drm_vm_fault(struct vm_fault *vmf)
> >> {
> >> return VM_FAULT_SIGBUS;
> >> }
> >> @@ -189,7 +189,7 @@ static int drm_vm_fault(struct vm_fault *vmf)
> >> * Get the mapping, find the real physical page to map, get the page, and
> >> * return it.
> >> */
> >> -static int drm_vm_shm_fault(struct vm_fault *vmf)
> >> +static vm_fault_t drm_vm_shm_fault(struct vm_fault *vmf)
> >> {
> >> struct vm_area_struct *vma = vmf->vma;
> >> struct drm_local_map *map = vma->vm_private_data;
> >> @@ -291,7 +291,7 @@ static void drm_vm_shm_close(struct vm_area_struct *vma)
> >> *
> >> * Determine the page number from the page offset and get it from drm_device_dma::pagelist.
> >> */
> >> -static int drm_vm_dma_fault(struct vm_fault *vmf)
> >> +static vm_fault_t drm_vm_dma_fault(struct vm_fault *vmf)
> >> {
> >> struct vm_area_struct *vma = vmf->vma;
> >> struct drm_file *priv = vma->vm_file->private_data;
> >> @@ -326,7 +326,7 @@ static int drm_vm_dma_fault(struct vm_fault *vmf)
> >> *
> >> * Determine the map offset from the page offset and get it from drm_sg_mem::pagelist.
> >> */
> >> -static int drm_vm_sg_fault(struct vm_fault *vmf)
> >> +static vm_fault_t drm_vm_sg_fault(struct vm_fault *vmf)
> >> {
> >> struct vm_area_struct *vma = vmf->vma;
> >> struct drm_local_map *map = vma->vm_private_data;
> >> --
> >> 1.9.1
> >>
> >
> > Daniel, if no further comment, we would like to get this patch
> > in queue for 4.18.
>
> We would like to get this in queue for 4.18.
Ok this dri1 legacy horrors, so I'm the fallback maintainer once more :-)
Merged, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-29 6:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10 13:42 [PATCH] gpu: drm: drm_vm: Adding new typedef vm_fault_t Souptick Joarder
2018-05-16 4:39 ` Souptick Joarder
2018-05-24 20:30 ` Souptick Joarder
2018-05-29 6:59 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).