diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-28 12:49:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-28 12:49:27 -0400 |
commit | 0d8762c9ee40cf83d5dbf3a22843bc566912b592 (patch) | |
tree | d3ae691a55226e3671caa1f837e127693f6742e8 /drivers | |
parent | cf76dddb22c019f03ada6479210f894f19bd591b (diff) | |
parent | 6afe40b4dace385d7ba2faf24b352f066f3b71bf (diff) |
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
lockdep: fix irqs on/off ip tracing
lockdep: minor fix for debug_show_all_locks()
x86: restore the old swiotlb alloc_coherent behavior
x86: use GFP_DMA for 24bit coherent_dma_mask
swiotlb: remove panic for alloc_coherent failure
xen: compilation fix of drivers/xen/events.c on IA64
xen: portability clean up and some minor clean up for xencomm.c
xen: don't reload cr3 on suspend
kernel/resource: fix reserve_region_with_split() section mismatch
printk: remove unused code from kernel/printk.c
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/xen/events.c | 2 | ||||
-rw-r--r-- | drivers/xen/manage.c | 2 | ||||
-rw-r--r-- | drivers/xen/xencomm.c | 23 |
3 files changed, 5 insertions, 22 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 9ce1ab6c268d..1e3b934a4cf7 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -774,7 +774,7 @@ void xen_poll_irq(int irq) | |||
774 | 774 | ||
775 | poll.nr_ports = 1; | 775 | poll.nr_ports = 1; |
776 | poll.timeout = 0; | 776 | poll.timeout = 0; |
777 | poll.ports = &evtchn; | 777 | set_xen_guest_handle(poll.ports, &evtchn); |
778 | 778 | ||
779 | if (HYPERVISOR_sched_op(SCHEDOP_poll, &poll) != 0) | 779 | if (HYPERVISOR_sched_op(SCHEDOP_poll, &poll) != 0) |
780 | BUG(); | 780 | BUG(); |
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index d0e87cbe157c..9b91617b9582 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
@@ -39,8 +39,6 @@ static int xen_suspend(void *data) | |||
39 | 39 | ||
40 | BUG_ON(!irqs_disabled()); | 40 | BUG_ON(!irqs_disabled()); |
41 | 41 | ||
42 | load_cr3(swapper_pg_dir); | ||
43 | |||
44 | err = device_power_down(PMSG_SUSPEND); | 42 | err = device_power_down(PMSG_SUSPEND); |
45 | if (err) { | 43 | if (err) { |
46 | printk(KERN_ERR "xen_suspend: device_power_down failed: %d\n", | 44 | printk(KERN_ERR "xen_suspend: device_power_down failed: %d\n", |
diff --git a/drivers/xen/xencomm.c b/drivers/xen/xencomm.c index 797cb4e31f07..a240b2c20b99 100644 --- a/drivers/xen/xencomm.c +++ b/drivers/xen/xencomm.c | |||
@@ -23,13 +23,7 @@ | |||
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | #include <xen/xencomm.h> | 24 | #include <xen/xencomm.h> |
25 | #include <xen/interface/xen.h> | 25 | #include <xen/interface/xen.h> |
26 | #ifdef __ia64__ | 26 | #include <asm/xen/xencomm.h> /* for xencomm_is_phys_contiguous() */ |
27 | #include <asm/xen/xencomm.h> /* for is_kern_addr() */ | ||
28 | #endif | ||
29 | |||
30 | #ifdef HAVE_XEN_PLATFORM_COMPAT_H | ||
31 | #include <xen/platform-compat.h> | ||
32 | #endif | ||
33 | 27 | ||
34 | static int xencomm_init(struct xencomm_desc *desc, | 28 | static int xencomm_init(struct xencomm_desc *desc, |
35 | void *buffer, unsigned long bytes) | 29 | void *buffer, unsigned long bytes) |
@@ -157,20 +151,11 @@ static int xencomm_create(void *buffer, unsigned long bytes, | |||
157 | return 0; | 151 | return 0; |
158 | } | 152 | } |
159 | 153 | ||
160 | /* check if memory address is within VMALLOC region */ | ||
161 | static int is_phys_contiguous(unsigned long addr) | ||
162 | { | ||
163 | if (!is_kernel_addr(addr)) | ||
164 | return 0; | ||
165 | |||
166 | return (addr < VMALLOC_START) || (addr >= VMALLOC_END); | ||
167 | } | ||
168 | |||
169 | static struct xencomm_handle *xencomm_create_inline(void *ptr) | 154 | static struct xencomm_handle *xencomm_create_inline(void *ptr) |
170 | { | 155 | { |
171 | unsigned long paddr; | 156 | unsigned long paddr; |
172 | 157 | ||
173 | BUG_ON(!is_phys_contiguous((unsigned long)ptr)); | 158 | BUG_ON(!xencomm_is_phys_contiguous((unsigned long)ptr)); |
174 | 159 | ||
175 | paddr = (unsigned long)xencomm_pa(ptr); | 160 | paddr = (unsigned long)xencomm_pa(ptr); |
176 | BUG_ON(paddr & XENCOMM_INLINE_FLAG); | 161 | BUG_ON(paddr & XENCOMM_INLINE_FLAG); |
@@ -202,7 +187,7 @@ struct xencomm_handle *xencomm_map(void *ptr, unsigned long bytes) | |||
202 | int rc; | 187 | int rc; |
203 | struct xencomm_desc *desc; | 188 | struct xencomm_desc *desc; |
204 | 189 | ||
205 | if (is_phys_contiguous((unsigned long)ptr)) | 190 | if (xencomm_is_phys_contiguous((unsigned long)ptr)) |
206 | return xencomm_create_inline(ptr); | 191 | return xencomm_create_inline(ptr); |
207 | 192 | ||
208 | rc = xencomm_create(ptr, bytes, &desc, GFP_KERNEL); | 193 | rc = xencomm_create(ptr, bytes, &desc, GFP_KERNEL); |
@@ -219,7 +204,7 @@ struct xencomm_handle *__xencomm_map_no_alloc(void *ptr, unsigned long bytes, | |||
219 | int rc; | 204 | int rc; |
220 | struct xencomm_desc *desc = NULL; | 205 | struct xencomm_desc *desc = NULL; |
221 | 206 | ||
222 | if (is_phys_contiguous((unsigned long)ptr)) | 207 | if (xencomm_is_phys_contiguous((unsigned long)ptr)) |
223 | return xencomm_create_inline(ptr); | 208 | return xencomm_create_inline(ptr); |
224 | 209 | ||
225 | rc = xencomm_create_mini(ptr, bytes, xc_desc, | 210 | rc = xencomm_create_mini(ptr, bytes, xc_desc, |