diff options
author | awilliam@xenbuild2.aw <awilliam@xenbuild2.aw> | 2007-03-15 09:04:23 -0600 |
---|---|---|
committer | awilliam@xenbuild2.aw <awilliam@xenbuild2.aw> | 2007-03-15 09:04:23 -0600 |
commit | bd5672880676bdcd166bc853e1ae757a14a83714 (patch) | |
tree | 7c969bd1effaa26cfa658c05e9f1766f6b0e7646 /linux-2.6-xen-sparse | |
parent | 8581ea938ad6f7f1cadb9f1ce09146d480a922c8 (diff) | |
parent | 8183fb7b82f01d079d146a6d98ac8943e2ad5fc6 (diff) | |
download | xen-bd5672880676bdcd166bc853e1ae757a14a83714.tar.gz xen-bd5672880676bdcd166bc853e1ae757a14a83714.tar.bz2 xen-bd5672880676bdcd166bc853e1ae757a14a83714.zip |
merge with xen-unstable.hg
Diffstat (limited to 'linux-2.6-xen-sparse')
9 files changed, 35 insertions, 39 deletions
diff --git a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c index a3ac4371a4..597deb733d 100644 --- a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c +++ b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c @@ -1010,7 +1010,7 @@ static void stop_hz_timer(void) singleshot.timeout_abs_ns = jiffies_to_st(j); singleshot.flags = 0; rc = HYPERVISOR_vcpu_op(VCPUOP_set_singleshot_timer, cpu, &singleshot); -#ifdef XEN_COMPAT_030004 +#ifdef CONFIG_XEN_COMPAT_030004 if (rc) { BUG_ON(rc != -ENOSYS); rc = HYPERVISOR_set_timer_op(singleshot.timeout_abs_ns); diff --git a/linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c b/linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c index 1b4bda2184..5fa4c31a9b 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c +++ b/linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c @@ -299,7 +299,9 @@ static void tap_backend_changed(struct xenbus_watch *watch, * and disk info to xenstore */ err = xenbus_gather(XBT_NIL, dev->nodename, "info", "%lu", &info, - NULL); + NULL); + if (XENBUS_EXIST_ERR(err)) + return; if (err) { xenbus_dev_error(dev, err, "getting info"); return; diff --git a/linux-2.6-xen-sparse/drivers/xen/char/mem.c b/linux-2.6-xen-sparse/drivers/xen/char/mem.c index 4fba735afa..7e857b222e 100644 --- a/linux-2.6-xen-sparse/drivers/xen/char/mem.c +++ b/linux-2.6-xen-sparse/drivers/xen/char/mem.c @@ -27,7 +27,7 @@ #include <asm/hypervisor.h> #ifndef ARCH_HAS_VALID_PHYS_ADDR_RANGE -static inline int valid_phys_addr_range(unsigned long addr, size_t *count) +static inline int valid_phys_addr_range(unsigned long addr, size_t count) { return 1; } @@ -44,7 +44,7 @@ static ssize_t read_mem(struct file * file, char __user * buf, ssize_t read = 0, sz; void __iomem *v; - if (!valid_phys_addr_range(p, &count)) + if (!valid_phys_addr_range(p, count)) return -EFAULT; while (count > 0) { @@ -95,7 +95,7 @@ static ssize_t write_mem(struct file * file, const char __user * buf, ssize_t written = 0, sz; void __iomem *v; - if (!valid_phys_addr_range(p, &count)) + if (!valid_phys_addr_range(p, count)) return -EFAULT; while (count > 0) { diff --git a/linux-2.6-xen-sparse/drivers/xen/console/console.c b/linux-2.6-xen-sparse/drivers/xen/console/console.c index 78fbc79940..1053ef8ff1 100644 --- a/linux-2.6-xen-sparse/drivers/xen/console/console.c +++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c @@ -348,8 +348,11 @@ void xencons_rx(char *buf, unsigned len, struct pt_regs *regs) #ifdef CONFIG_MAGIC_SYSRQ if (sysrq_enabled) { if (buf[i] == '\x0f') { /* ^O */ - sysrq_requested = jiffies; - continue; /* don't print the sysrq key */ + if (!sysrq_requested) { + sysrq_requested = jiffies; + continue; /* don't print sysrq key */ + } + sysrq_requested = 0; } else if (sysrq_requested) { unsigned long sysrq_timeout = sysrq_requested + HZ*2; diff --git a/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c b/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c index 1110e62888..6f6ac97195 100644 --- a/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c +++ b/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c @@ -84,7 +84,7 @@ static void post_suspend(int suspend_cancelled) pfn_to_mfn(xen_start_info->console.domU.mfn); } else { #ifdef CONFIG_SMP - cpu_initialized_map = cpumask_of_cpu(0); + cpu_initialized_map = cpu_online_map; #endif } @@ -180,20 +180,6 @@ static int take_machine_down(void *p_fast_suspend) time_resume(); local_irq_enable(); - if (fast_suspend && !suspend_cancelled) { - /* - * In fast-suspend mode the APs may not be brought back online - * when we resume. In that case we do it here. - */ - for_each_online_cpu(cpu) { - if (cpu == 0) - continue; - cpu_set_initialized(cpu); - err = HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL); - BUG_ON(err); - } - } - return suspend_cancelled; } diff --git a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c index b05e3000e3..7e0c340832 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c @@ -110,6 +110,7 @@ static unsigned int alloc_index = 0; static inline unsigned long alloc_mfn(void) { + BUG_ON(alloc_index == 0); return mfn_list[--alloc_index]; } @@ -552,6 +553,7 @@ static void net_rx_action(unsigned long unused) *(int *)skb->cb = nr_frags; if (!xen_feature(XENFEAT_auto_translated_physmap) && + !((netif_t *)netdev_priv(skb->dev))->copying_receiver && check_mfn(nr_frags + 1)) { /* Memory squeeze? Back off for an arbitrary while. */ if ( net_ratelimit() ) diff --git a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pci.h b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pci.h index 584f65e178..14c1d27629 100644 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pci.h +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pci.h @@ -143,11 +143,4 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, /* generic pci stuff */ #include <asm-generic/pci.h> -/* On Xen we have to scan all functions since Xen hides bridges from - * us. If a bridge is at fn=0 and that slot has a multifunction - * device, we won't find the additional devices without scanning all - * functions. */ -#undef pcibios_scan_all_fns -#define pcibios_scan_all_fns(a, b) 1 - #endif /* __i386_PCI_H */ diff --git a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h index 8ec15d931e..764270fa4f 100644 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pci.h @@ -163,11 +163,4 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev) #include <asm-generic/pci.h> #endif -/* On Xen we have to scan all functions since Xen hides bridges from - * us. If a bridge is at fn=0 and that slot has a multifunction - * device, we won't find the additional devices without scanning all - * functions. */ -#undef pcibios_scan_all_fns -#define pcibios_scan_all_fns(a, b) 1 - #endif /* __x8664_PCI_H */ diff --git a/linux-2.6-xen-sparse/kernel/kexec.c b/linux-2.6-xen-sparse/kernel/kexec.c index c46558f7da..a6e2120138 100644 --- a/linux-2.6-xen-sparse/kernel/kexec.c +++ b/linux-2.6-xen-sparse/kernel/kexec.c @@ -330,13 +330,27 @@ static int kimage_is_destination_range(struct kimage *image, return 0; } -static struct page *kimage_alloc_pages(gfp_t gfp_mask, unsigned int order) +static struct page *kimage_alloc_pages(gfp_t gfp_mask, unsigned int order, unsigned long limit) { struct page *pages; pages = alloc_pages(gfp_mask, order); if (pages) { unsigned int count, i; +#ifdef CONFIG_XEN + int address_bits; + + if (limit == ~0UL) + address_bits = BITS_PER_LONG; + else + address_bits = long_log2(limit); + + if (xen_create_contiguous_region((unsigned long)page_address(pages), + order, address_bits) < 0) { + __free_pages(pages, order); + return NULL; + } +#endif pages->mapping = NULL; set_page_private(pages, order); count = 1 << order; @@ -355,6 +369,9 @@ static void kimage_free_pages(struct page *page) count = 1 << order; for (i = 0; i < count; i++) ClearPageReserved(page + i); +#ifdef CONFIG_XEN + xen_destroy_contiguous_region((unsigned long)page_address(page), order); +#endif __free_pages(page, order); } @@ -400,7 +417,7 @@ static struct page *kimage_alloc_normal_control_pages(struct kimage *image, do { unsigned long pfn, epfn, addr, eaddr; - pages = kimage_alloc_pages(GFP_KERNEL, order); + pages = kimage_alloc_pages(GFP_KERNEL, order, KEXEC_CONTROL_MEMORY_LIMIT); if (!pages) break; pfn = kexec_page_to_pfn(pages); @@ -709,7 +726,7 @@ static struct page *kimage_alloc_page(struct kimage *image, kimage_entry_t *old; /* Allocate a page, if we run out of memory give up */ - page = kimage_alloc_pages(gfp_mask, 0); + page = kimage_alloc_pages(gfp_mask, 0, KEXEC_SOURCE_MEMORY_LIMIT); if (!page) return NULL; /* If the page cannot be used file it away */ |