LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/3] uio: Kconfig improvements
@ 2008-02-02  9:51 ` Denis Cheng
  2008-02-02  9:51   ` [PATCH 2/3] uio: mark pci_device_id hilscher_pci_ids[] __devinitdata Denis Cheng
  2008-02-03  0:12   ` [PATCH 1/3] uio: Kconfig improvements Hans-Jürgen Koch
  0 siblings, 2 replies; 6+ messages in thread
From: Denis Cheng @ 2008-02-02  9:51 UTC (permalink / raw)
  To: Hans J. Koch, Greg Kroah-Hartman; +Cc: linux-kernel, cr_quan

Signed-off-by: Denis Cheng <crquan@gmail.com>
---
 drivers/uio/Kconfig |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig
index b778ed7..d8ab7e6 100644
--- a/drivers/uio/Kconfig
+++ b/drivers/uio/Kconfig
@@ -1,8 +1,6 @@
-menu "Userspace I/O"
-	depends on !S390
-
-config UIO
+menuconfig UIO
 	tristate "Userspace I/O drivers"
+	depends on !S390
 	default n
 	help
 	  Enable this to allow the userspace driver core code to be
@@ -13,6 +11,8 @@ config UIO
 
 	  If you don't know what to do here, say N.
 
+if UIO
+
 config UIO_CIF
 	tristate "generic Hilscher CIF Card driver"
 	depends on UIO && PCI
@@ -26,4 +26,4 @@ config UIO_CIF
 	  To compile this driver as a module, choose M here: the module
 	  will be called uio_cif.
 
-endmenu
+endif
-- 
1.5.3.8


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

* [PATCH 2/3] uio: mark pci_device_id hilscher_pci_ids[] __devinitdata
  2008-02-02  9:51 ` [PATCH 1/3] uio: Kconfig improvements Denis Cheng
@ 2008-02-02  9:51   ` Denis Cheng
  2008-02-02  9:51     ` [PATCH 3/3] uio: vm_operations_struct ->nopage to ->fault method conversion Denis Cheng
  2008-02-03  0:27     ` [PATCH 2/3] uio: mark pci_device_id hilscher_pci_ids[] __devinitdata Hans-Jürgen Koch
  2008-02-03  0:12   ` [PATCH 1/3] uio: Kconfig improvements Hans-Jürgen Koch
  1 sibling, 2 replies; 6+ messages in thread
From: Denis Cheng @ 2008-02-02  9:51 UTC (permalink / raw)
  To: Hans J. Koch, Greg Kroah-Hartman; +Cc: linux-kernel, cr_quan

Signed-off-by: Denis Cheng <crquan@gmail.com>
---
 drivers/uio/uio_cif.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/uio/uio_cif.c b/drivers/uio/uio_cif.c
index 838bae4..4a5a97e 100644
--- a/drivers/uio/uio_cif.c
+++ b/drivers/uio/uio_cif.c
@@ -116,7 +116,7 @@ static void hilscher_pci_remove(struct pci_dev *dev)
 	kfree (info);
 }
 
-static struct pci_device_id hilscher_pci_ids[] = {
+static struct pci_device_id hilscher_pci_ids[] __devinitdata = {
 	{
 		.vendor =	PCI_VENDOR_ID_PLX,
 		.device =	PCI_DEVICE_ID_PLX_9030,
-- 
1.5.3.8


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

* [PATCH 3/3] uio: vm_operations_struct ->nopage to ->fault method conversion
  2008-02-02  9:51   ` [PATCH 2/3] uio: mark pci_device_id hilscher_pci_ids[] __devinitdata Denis Cheng
@ 2008-02-02  9:51     ` Denis Cheng
  2008-02-02 10:37       ` Nick Piggin
  2008-02-03  0:27     ` [PATCH 2/3] uio: mark pci_device_id hilscher_pci_ids[] __devinitdata Hans-Jürgen Koch
  1 sibling, 1 reply; 6+ messages in thread
From: Denis Cheng @ 2008-02-02  9:51 UTC (permalink / raw)
  To: Hans J. Koch, Greg Kroah-Hartman; +Cc: linux-kernel, cr_quan

Signed-off-by: Denis Cheng <crquan@gmail.com>
---
 drivers/uio/uio.c |   19 ++++++++-----------
 1 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index cc246fa..47e0c32 100644
--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -417,30 +417,27 @@ static void uio_vma_close(struct vm_area_struct *vma)
 	idev->vma_count--;
 }
 
-static struct page *uio_vma_nopage(struct vm_area_struct *vma,
-				   unsigned long address, int *type)
+static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
 	struct uio_device *idev = vma->vm_private_data;
-	struct page* page = NOPAGE_SIGBUS;
 
 	int mi = uio_find_mem_index(vma);
 	if (mi < 0)
-		return page;
+		return VM_FAULT_SIGBUS;
 
 	if (idev->info->mem[mi].memtype == UIO_MEM_LOGICAL)
-		page = virt_to_page(idev->info->mem[mi].addr);
+		vmf->page = virt_to_page(idev->info->mem[mi].addr);
 	else
-		page = vmalloc_to_page((void*)idev->info->mem[mi].addr);
-	get_page(page);
-	if (type)
-		*type = VM_FAULT_MINOR;
-	return page;
+		vmf->page = vmalloc_to_page((void *)idev->info->mem[mi].addr);
+	get_page(vmf->page);
+
+	return 0;
 }
 
 static struct vm_operations_struct uio_vm_ops = {
 	.open = uio_vma_open,
 	.close = uio_vma_close,
-	.nopage = uio_vma_nopage,
+	.fault = uio_vma_fault,
 };
 
 static int uio_mmap_physical(struct vm_area_struct *vma)
-- 
1.5.3.8


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

* Re: [PATCH 3/3] uio: vm_operations_struct ->nopage to ->fault method conversion
  2008-02-02  9:51     ` [PATCH 3/3] uio: vm_operations_struct ->nopage to ->fault method conversion Denis Cheng
@ 2008-02-02 10:37       ` Nick Piggin
  0 siblings, 0 replies; 6+ messages in thread
From: Nick Piggin @ 2008-02-02 10:37 UTC (permalink / raw)
  To: Denis Cheng; +Cc: Hans J. Koch, Greg Kroah-Hartman, linux-kernel, cr_quan

On Saturday 02 February 2008 20:51, Denis Cheng wrote:
> Signed-off-by: Denis Cheng <crquan@gmail.com>

Thanks, but already patched in -mm.

> ---
>  drivers/uio/uio.c |   19 ++++++++-----------
>  1 files changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
> index cc246fa..47e0c32 100644
> --- a/drivers/uio/uio.c
> +++ b/drivers/uio/uio.c
> @@ -417,30 +417,27 @@ static void uio_vma_close(struct vm_area_struct *vma)
>  	idev->vma_count--;
>  }
>
> -static struct page *uio_vma_nopage(struct vm_area_struct *vma,
> -				   unsigned long address, int *type)
> +static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
>  {
>  	struct uio_device *idev = vma->vm_private_data;
> -	struct page* page = NOPAGE_SIGBUS;
>
>  	int mi = uio_find_mem_index(vma);
>  	if (mi < 0)
> -		return page;
> +		return VM_FAULT_SIGBUS;
>
>  	if (idev->info->mem[mi].memtype == UIO_MEM_LOGICAL)
> -		page = virt_to_page(idev->info->mem[mi].addr);
> +		vmf->page = virt_to_page(idev->info->mem[mi].addr);
>  	else
> -		page = vmalloc_to_page((void*)idev->info->mem[mi].addr);
> -	get_page(page);
> -	if (type)
> -		*type = VM_FAULT_MINOR;
> -	return page;
> +		vmf->page = vmalloc_to_page((void *)idev->info->mem[mi].addr);
> +	get_page(vmf->page);
> +
> +	return 0;
>  }
>
>  static struct vm_operations_struct uio_vm_ops = {
>  	.open = uio_vma_open,
>  	.close = uio_vma_close,
> -	.nopage = uio_vma_nopage,
> +	.fault = uio_vma_fault,
>  };
>
>  static int uio_mmap_physical(struct vm_area_struct *vma)

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

* Re: [PATCH 1/3] uio: Kconfig improvements
  2008-02-02  9:51 ` [PATCH 1/3] uio: Kconfig improvements Denis Cheng
  2008-02-02  9:51   ` [PATCH 2/3] uio: mark pci_device_id hilscher_pci_ids[] __devinitdata Denis Cheng
@ 2008-02-03  0:12   ` Hans-Jürgen Koch
  1 sibling, 0 replies; 6+ messages in thread
From: Hans-Jürgen Koch @ 2008-02-03  0:12 UTC (permalink / raw)
  To: Denis Cheng; +Cc: Greg Kroah-Hartman, linux-kernel, cr_quan

Am Sat,  2 Feb 2008 17:51:35 +0800
schrieb Denis Cheng <crquan@gmail.com>:

Agreed.

> Signed-off-by: Denis Cheng <crquan@gmail.com>

Signed-off-by: Hans J. Koch <hjk@linutronix.de>

> ---
>  drivers/uio/Kconfig |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig
> index b778ed7..d8ab7e6 100644
> --- a/drivers/uio/Kconfig
> +++ b/drivers/uio/Kconfig
> @@ -1,8 +1,6 @@
> -menu "Userspace I/O"
> -	depends on !S390
> -
> -config UIO
> +menuconfig UIO
>  	tristate "Userspace I/O drivers"
> +	depends on !S390
>  	default n
>  	help
>  	  Enable this to allow the userspace driver core code to be
> @@ -13,6 +11,8 @@ config UIO
>  
>  	  If you don't know what to do here, say N.
>  
> +if UIO
> +
>  config UIO_CIF
>  	tristate "generic Hilscher CIF Card driver"
>  	depends on UIO && PCI
> @@ -26,4 +26,4 @@ config UIO_CIF
>  	  To compile this driver as a module, choose M here: the
> module will be called uio_cif.
>  
> -endmenu
> +endif

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

* Re: [PATCH 2/3] uio: mark pci_device_id hilscher_pci_ids[] __devinitdata
  2008-02-02  9:51   ` [PATCH 2/3] uio: mark pci_device_id hilscher_pci_ids[] __devinitdata Denis Cheng
  2008-02-02  9:51     ` [PATCH 3/3] uio: vm_operations_struct ->nopage to ->fault method conversion Denis Cheng
@ 2008-02-03  0:27     ` Hans-Jürgen Koch
  1 sibling, 0 replies; 6+ messages in thread
From: Hans-Jürgen Koch @ 2008-02-03  0:27 UTC (permalink / raw)
  To: Denis Cheng; +Cc: Greg Kroah-Hartman, linux-kernel, cr_quan

Am Sat,  2 Feb 2008 17:51:36 +0800
schrieb Denis Cheng <crquan@gmail.com>:

Makes sense.

> Signed-off-by: Denis Cheng <crquan@gmail.com>

Signed-off-by: Hans J. Koch <hjk@linutronix.de>

> ---
>  drivers/uio/uio_cif.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/uio/uio_cif.c b/drivers/uio/uio_cif.c
> index 838bae4..4a5a97e 100644
> --- a/drivers/uio/uio_cif.c
> +++ b/drivers/uio/uio_cif.c
> @@ -116,7 +116,7 @@ static void hilscher_pci_remove(struct pci_dev
> *dev) kfree (info);
>  }
>  
> -static struct pci_device_id hilscher_pci_ids[] = {
> +static struct pci_device_id hilscher_pci_ids[] __devinitdata = {
>  	{
>  		.vendor =	PCI_VENDOR_ID_PLX,
>  		.device =	PCI_DEVICE_ID_PLX_9030,

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

end of thread, other threads:[~2008-02-03  0:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] < <1201945897-32297-1-git-send-email-crquan@gmail.com>
2008-02-02  9:51 ` [PATCH 1/3] uio: Kconfig improvements Denis Cheng
2008-02-02  9:51   ` [PATCH 2/3] uio: mark pci_device_id hilscher_pci_ids[] __devinitdata Denis Cheng
2008-02-02  9:51     ` [PATCH 3/3] uio: vm_operations_struct ->nopage to ->fault method conversion Denis Cheng
2008-02-02 10:37       ` Nick Piggin
2008-02-03  0:27     ` [PATCH 2/3] uio: mark pci_device_id hilscher_pci_ids[] __devinitdata Hans-Jürgen Koch
2008-02-03  0:12   ` [PATCH 1/3] uio: Kconfig improvements Hans-Jürgen Koch

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).