* [PATCH] arch/xx/pci: remap_pfn_range -> io_remap_pfn_range
@ 2005-07-25 22:32 Michael S. Tsirkin
2005-07-28 4:26 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Michael S. Tsirkin @ 2005-07-25 22:32 UTC (permalink / raw)
To: gregkh, linux-pci, linux-kernel, mj; +Cc: openib-general
Greg, Martin, does the following make sense?
If it does, should other architectures be updated as well?
---
Convert i386/pci to use io_remap_pfn_range instead of remap_pfn_range.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Index: linux-2.6.12.2/arch/i386/pci/i386.c
===================================================================
--- linux-2.6.12.2.orig/arch/i386/pci/i386.c
+++ linux-2.6.12.2/arch/i386/pci/i386.c
@@ -295,9 +295,9 @@ int pci_mmap_page_range(struct pci_dev *
/* Write-combine setting is ignored, it is changed via the mtrr
* interfaces on this platform.
*/
- if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
- vma->vm_end - vma->vm_start,
- vma->vm_page_prot))
+ if (io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
+ vma->vm_end - vma->vm_start,
+ vma->vm_page_prot))
return -EAGAIN;
return 0;
--
MST
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arch/xx/pci: remap_pfn_range -> io_remap_pfn_range
2005-07-25 22:32 [PATCH] arch/xx/pci: remap_pfn_range -> io_remap_pfn_range Michael S. Tsirkin
@ 2005-07-28 4:26 ` Greg KH
2005-07-28 4:30 ` [openib-general] " Roland Dreier
2005-07-28 6:48 ` Michael S. Tsirkin
0 siblings, 2 replies; 7+ messages in thread
From: Greg KH @ 2005-07-28 4:26 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: linux-pci, linux-kernel, mj, openib-general
On Tue, Jul 26, 2005 at 01:32:00AM +0300, Michael S. Tsirkin wrote:
> Greg, Martin, does the following make sense?
> If it does, should other architectures be updated as well?
>
> ---
>
> Convert i386/pci to use io_remap_pfn_range instead of remap_pfn_range.
>
> Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
>
> Index: linux-2.6.12.2/arch/i386/pci/i386.c
> ===================================================================
> --- linux-2.6.12.2.orig/arch/i386/pci/i386.c
> +++ linux-2.6.12.2/arch/i386/pci/i386.c
> @@ -295,9 +295,9 @@ int pci_mmap_page_range(struct pci_dev *
> /* Write-combine setting is ignored, it is changed via the mtrr
> * interfaces on this platform.
> */
> - if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
> - vma->vm_end - vma->vm_start,
> - vma->vm_page_prot))
> + if (io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
> + vma->vm_end - vma->vm_start,
> + vma->vm_page_prot))
Hm, you do realize that io_remap_pfn_range() is the same thing as
remap_pfn_range() on i386, right?
So, why would this patch change anything?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [openib-general] Re: [PATCH] arch/xx/pci: remap_pfn_range -> io_remap_pfn_range
2005-07-28 4:26 ` Greg KH
@ 2005-07-28 4:30 ` Roland Dreier
2005-07-28 4:50 ` Greg KH
2005-07-28 6:48 ` Michael S. Tsirkin
1 sibling, 1 reply; 7+ messages in thread
From: Roland Dreier @ 2005-07-28 4:30 UTC (permalink / raw)
To: Greg KH; +Cc: Michael S. Tsirkin, linux-pci, openib-general, linux-kernel, mj
Greg> Hm, you do realize that io_remap_pfn_range() is the same
Greg> thing as remap_pfn_range() on i386, right?
Greg> So, why would this patch change anything?
It's not the same thing under Xen. I think this patch fixes userspace
access to PCI memory for XenLinux.
- R.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [openib-general] Re: [PATCH] arch/xx/pci: remap_pfn_range -> io_remap_pfn_range
2005-07-28 4:30 ` [openib-general] " Roland Dreier
@ 2005-07-28 4:50 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2005-07-28 4:50 UTC (permalink / raw)
To: Roland Dreier
Cc: Michael S. Tsirkin, linux-pci, openib-general, linux-kernel, mj
On Wed, Jul 27, 2005 at 09:30:17PM -0700, Roland Dreier wrote:
> Greg> Hm, you do realize that io_remap_pfn_range() is the same
> Greg> thing as remap_pfn_range() on i386, right?
>
> Greg> So, why would this patch change anything?
>
> It's not the same thing under Xen. I think this patch fixes userspace
> access to PCI memory for XenLinux.
But Xen is a separate arch, and hence, will get different pci arch
specific functions, right?
In short, what is this patch trying to fix? What is the problem anyone
is seeing with the existing code?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arch/xx/pci: remap_pfn_range -> io_remap_pfn_range
2005-07-28 4:26 ` Greg KH
2005-07-28 4:30 ` [openib-general] " Roland Dreier
@ 2005-07-28 6:48 ` Michael S. Tsirkin
2005-07-28 6:58 ` Greg KH
1 sibling, 1 reply; 7+ messages in thread
From: Michael S. Tsirkin @ 2005-07-28 6:48 UTC (permalink / raw)
To: Greg KH; +Cc: linux-pci, linux-kernel, mj, openib-general
Quoting r. Greg KH <gregkh@suse.de>:
> Subject: Re: [PATCH] arch/xx/pci: remap_pfn_range -> io_remap_pfn_range
>
> On Tue, Jul 26, 2005 at 01:32:00AM +0300, Michael S. Tsirkin wrote:
> > Greg, Martin, does the following make sense?
> > If it does, should other architectures be updated as well?
> >
> Hm, you do realize that io_remap_pfn_range() is the same thing as
> remap_pfn_range() on i386, right?
>
> So, why would this patch change anything?
>
> thanks,
>
> greg k-h
>
It doesnt change any behaviour.
Its a style issue I'm trying to fix: even in arch specific code, isnt it better
to use a generic io_remap_pfn_range to map PCI memory?
--
MST
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arch/xx/pci: remap_pfn_range -> io_remap_pfn_range
2005-07-28 6:48 ` Michael S. Tsirkin
@ 2005-07-28 6:58 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2005-07-28 6:58 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: linux-pci, linux-kernel, mj, openib-general
On Thu, Jul 28, 2005 at 09:48:59AM +0300, Michael S. Tsirkin wrote:
> Quoting r. Greg KH <gregkh@suse.de>:
> > Subject: Re: [PATCH] arch/xx/pci: remap_pfn_range -> io_remap_pfn_range
> >
> > On Tue, Jul 26, 2005 at 01:32:00AM +0300, Michael S. Tsirkin wrote:
> > > Greg, Martin, does the following make sense?
> > > If it does, should other architectures be updated as well?
> > >
> > Hm, you do realize that io_remap_pfn_range() is the same thing as
> > remap_pfn_range() on i386, right?
> >
> > So, why would this patch change anything?
> >
> > thanks,
> >
> > greg k-h
> >
>
> It doesnt change any behaviour.
> Its a style issue I'm trying to fix: even in arch specific code, isnt it better
> to use a generic io_remap_pfn_range to map PCI memory?
As I said above, it's the same thing on i386.
But, if you are getting picky, you should fix all of the other arches
too, right?
Anyway, why change this, I don't really see the need.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arch/xx/pci: remap_pfn_range -> io_remap_pfn_range
2005-07-28 16:17 ` Greg KH
@ 2005-07-31 8:51 ` Michael S. Tsirkin
0 siblings, 0 replies; 7+ messages in thread
From: Michael S. Tsirkin @ 2005-07-31 8:51 UTC (permalink / raw)
To: Greg KH
Cc: Ian Pratt, Roland Dreier, linux-pci, openib-general, linux-kernel,
mj, ian.pratt
Quoting r. Greg KH <gregkh@suse.de>:
> Subject: Re: [openib-general] Re: [PATCH] arch/xx/pci: remap_pfn_range -> io_remap_pfn_range
> If this is a fix for xen, fine, then say so in the changelog information
> for the patch, as it is, no such information was given.
>
> thanks,
>
> greg k-h
>
Like this?
---
Convert i386/pci to use io_remap_pfn_range instead of remap_pfn_range.
This is good for Xen which reuses i386/pci/i386.c for domain 0 code.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Index: linux-2.6.12.2/arch/i386/pci/i386.c
===================================================================
--- linux-2.6.12.2.orig/arch/i386/pci/i386.c
+++ linux-2.6.12.2/arch/i386/pci/i386.c
@@ -295,9 +295,9 @@ int pci_mmap_page_range(struct pci_dev *
/* Write-combine setting is ignored, it is changed via the mtrr
* interfaces on this platform.
*/
- if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
- vma->vm_end - vma->vm_start,
- vma->vm_page_prot))
+ if (io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
+ vma->vm_end - vma->vm_start,
+ vma->vm_page_prot))
return -EAGAIN;
return 0;
--
MST
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-07-31 8:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-25 22:32 [PATCH] arch/xx/pci: remap_pfn_range -> io_remap_pfn_range Michael S. Tsirkin
2005-07-28 4:26 ` Greg KH
2005-07-28 4:30 ` [openib-general] " Roland Dreier
2005-07-28 4:50 ` Greg KH
2005-07-28 6:48 ` Michael S. Tsirkin
2005-07-28 6:58 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2005-07-28 11:57 [openib-general] " Ian Pratt
2005-07-28 16:17 ` Greg KH
2005-07-31 8:51 ` Michael S. Tsirkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox