ia64/xen-unstable

view patches/linux-2.6.11/iomap.patch @ 4547:73ef7f1fc714

bitkeeper revision 1.1307 (42604f23zhUwzxPQ-mNyzol0cpHWlg)

[PATCH] Eliminate kernel version checks from

Eliminate kernel version checks from x86_64/kernel/pci-dma.c as a trivial
first pass cleanup towards merging.

Signed-off-by: Chris Wright <chrisw@osdl.org>
author chrisw@osdl.org[iap10]
date Fri Apr 15 23:32:51 2005 +0000 (2005-04-15)
parents a01199a95070
children 56a63f9f378f
line source
1 diff -ur linux-2.6.11/drivers/char/agp/frontend.c linux-2.6.11-io/drivers/char/agp/frontend.c
2 --- linux-2.6.11/drivers/char/agp/frontend.c 2005-03-02 07:37:49.000000000 +0000
3 +++ linux-2.6.11-io/drivers/char/agp/frontend.c 2005-03-15 17:38:30.000000000 +0000
4 @@ -627,7 +627,7 @@
5 DBG("client vm_ops=%p", kerninfo.vm_ops);
6 if (kerninfo.vm_ops) {
7 vma->vm_ops = kerninfo.vm_ops;
8 - } else if (remap_pfn_range(vma, vma->vm_start,
9 + } else if (io_remap_pfn_range(vma, vma->vm_start,
10 (kerninfo.aper_base + offset) >> PAGE_SHIFT,
11 size, vma->vm_page_prot)) {
12 goto out_again;
13 @@ -643,7 +643,7 @@
14 DBG("controller vm_ops=%p", kerninfo.vm_ops);
15 if (kerninfo.vm_ops) {
16 vma->vm_ops = kerninfo.vm_ops;
17 - } else if (remap_pfn_range(vma, vma->vm_start,
18 + } else if (io_remap_pfn_range(vma, vma->vm_start,
19 kerninfo.aper_base >> PAGE_SHIFT,
20 size, vma->vm_page_prot)) {
21 goto out_again;
22 diff -ur linux-2.6.11/drivers/char/drm/drm_vm.c linux-2.6.11-io/drivers/char/drm/drm_vm.c
23 --- linux-2.6.11/drivers/char/drm/drm_vm.c 2005-03-02 07:38:33.000000000 +0000
24 +++ linux-2.6.11-io/drivers/char/drm/drm_vm.c 2005-03-15 17:43:26.000000000 +0000
25 @@ -630,7 +630,7 @@
26 vma->vm_end - vma->vm_start,
27 vma->vm_page_prot, 0))
28 #else
29 - if (remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start,
30 + if (io_remap_pfn_range(vma, vma->vm_start,
31 (VM_OFFSET(vma) + offset) >> PAGE_SHIFT,
32 vma->vm_end - vma->vm_start,
33 vma->vm_page_prot))
34 diff -ur linux-2.6.11/drivers/char/drm/i810_dma.c linux-2.6.11-io/drivers/char/drm/i810_dma.c
35 --- linux-2.6.11/drivers/char/drm/i810_dma.c 2005-03-02 07:37:55.000000000 +0000
36 +++ linux-2.6.11-io/drivers/char/drm/i810_dma.c 2005-03-15 17:53:36.000000000 +0000
37 @@ -139,7 +139,7 @@
38 buf_priv->currently_mapped = I810_BUF_MAPPED;
39 unlock_kernel();
41 - if (remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start,
42 + if (io_remap_pfn_range(vma, vma->vm_start,
43 VM_OFFSET(vma) >> PAGE_SHIFT,
44 vma->vm_end - vma->vm_start,
45 vma->vm_page_prot)) return -EAGAIN;
46 diff -ur linux-2.6.11/drivers/char/drm/i830_dma.c linux-2.6.11-io/drivers/char/drm/i830_dma.c
47 --- linux-2.6.11/drivers/char/drm/i830_dma.c 2005-03-02 07:37:48.000000000 +0000
48 +++ linux-2.6.11-io/drivers/char/drm/i830_dma.c 2005-03-15 17:53:46.000000000 +0000
49 @@ -157,7 +157,7 @@
50 buf_priv->currently_mapped = I830_BUF_MAPPED;
51 unlock_kernel();
53 - if (remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start,
54 + if (io_remap_pfn_range(vma, vma->vm_start,
55 VM_OFFSET(vma) >> PAGE_SHIFT,
56 vma->vm_end - vma->vm_start,
57 vma->vm_page_prot)) return -EAGAIN;
58 diff -ur linux-2.6.11/drivers/char/hpet.c linux-2.6.11-io/drivers/char/hpet.c
59 --- linux-2.6.11/drivers/char/hpet.c 2005-03-02 07:38:10.000000000 +0000
60 +++ linux-2.6.11-io/drivers/char/hpet.c 2005-03-15 17:37:22.000000000 +0000
61 @@ -76,6 +76,7 @@
62 struct hpets {
63 struct hpets *hp_next;
64 struct hpet __iomem *hp_hpet;
65 + unsigned long hp_hpet_phys;
66 struct time_interpolator *hp_interpolator;
67 unsigned long hp_period;
68 unsigned long hp_delta;
69 @@ -265,7 +266,7 @@
70 return -EINVAL;
72 devp = file->private_data;
73 - addr = (unsigned long)devp->hd_hpet;
74 + addr = devp->hd_hpets->hp_hpet_phys;
76 if (addr & (PAGE_SIZE - 1))
77 return -ENOSYS;
78 @@ -274,7 +275,7 @@
79 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
80 addr = __pa(addr);
82 - if (remap_pfn_range(vma, vma->vm_start, addr >> PAGE_SHIFT,
83 + if (io_remap_pfn_range(vma, vma->vm_start, addr >> PAGE_SHIFT,
84 PAGE_SIZE, vma->vm_page_prot)) {
85 printk(KERN_ERR "remap_pfn_range failed in hpet.c\n");
86 return -EAGAIN;
87 @@ -795,6 +796,7 @@
89 hpetp->hp_which = hpet_nhpet++;
90 hpetp->hp_hpet = hdp->hd_address;
91 + hpetp->hp_hpet_phys = hdp->hd_phys_address;
93 hpetp->hp_ntimer = hdp->hd_nirqs;
95 diff -ur linux-2.6.11/drivers/sbus/char/flash.c linux-2.6.11-io/drivers/sbus/char/flash.c
96 --- linux-2.6.11/drivers/sbus/char/flash.c 2005-03-02 07:38:10.000000000 +0000
97 +++ linux-2.6.11-io/drivers/sbus/char/flash.c 2005-03-15 17:20:22.000000000 +0000
98 @@ -75,7 +75,7 @@
99 pgprot_val(vma->vm_page_prot) |= _PAGE_E;
100 vma->vm_flags |= (VM_SHM | VM_LOCKED);
102 - if (remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot))
103 + if (io_remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot))
104 return -EAGAIN;
106 return 0;
107 diff -ur linux-2.6.11/include/linux/mm.h linux-2.6.11-io/include/linux/mm.h
108 --- linux-2.6.11/include/linux/mm.h 2005-03-02 07:37:47.000000000 +0000
109 +++ linux-2.6.11-io/include/linux/mm.h 2005-03-15 17:03:46.000000000 +0000
110 @@ -815,6 +815,10 @@
111 extern int check_user_page_readable(struct mm_struct *mm, unsigned long address);
112 int remap_pfn_range(struct vm_area_struct *, unsigned long,
113 unsigned long, unsigned long, pgprot_t);
114 +/* Allow arch override for mapping of device and I/O (non-RAM) pages. */
115 +#ifndef io_remap_pfn_range
116 +#define io_remap_pfn_range remap_pfn_range
117 +#endif
119 #ifdef CONFIG_PROC_FS
120 void __vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);