[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] merge with linux-2.6.18-xen.hg (staging)
# HG changeset patch # User Alex Williamson <alex.williamson@xxxxxx> # Date 1193929665 21600 # Node ID d827dfc6593e7300c68de12106ad510b6f832cda # Parent b4ace76fb245f3981cab1f167e2e70015b17e50d # Parent 7df27803297a62661947de9bd5c83af0b4640878 merge with linux-2.6.18-xen.hg (staging) --- drivers/pci/bus.c | 7 +++++++ drivers/pci/quirks.c | 34 ++++++++++++++++++++++++++++++++++ drivers/xen/blkfront/vbd.c | 4 ++-- drivers/xen/core/xencomm.c | 4 ++++ drivers/xen/netfront/netfront.c | 38 +++++++++++++++++++++++--------------- 5 files changed, 70 insertions(+), 17 deletions(-) diff -r b4ace76fb245 -r d827dfc6593e drivers/pci/bus.c --- a/drivers/pci/bus.c Tue Oct 30 16:44:52 2007 -0600 +++ b/drivers/pci/bus.c Thu Nov 01 09:07:45 2007 -0600 @@ -16,6 +16,8 @@ #include <linux/init.h> #include "pci.h" + +extern int pci_mem_align; /** * pci_bus_alloc_resource - allocate a resource from a parent bus @@ -43,6 +45,11 @@ pci_bus_alloc_resource(struct pci_bus *b int i, ret = -ENOMEM; type_mask |= IORESOURCE_IO | IORESOURCE_MEM; + + /* If the boot parameter 'pci-mem-align' was specified then we need to + align the memory addresses, at page size alignment. */ + if (pci_mem_align && (align < (PAGE_SIZE-1))) + align = PAGE_SIZE - 1; for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { struct resource *r = bus->resource[i]; diff -r b4ace76fb245 -r d827dfc6593e drivers/pci/quirks.c --- a/drivers/pci/quirks.c Tue Oct 30 16:44:52 2007 -0600 +++ b/drivers/pci/quirks.c Thu Nov 01 09:07:45 2007 -0600 @@ -22,6 +22,40 @@ #include <linux/delay.h> #include <linux/acpi.h> #include "pci.h" + +/* A global flag which signals if we should page-align PCI mem windows. */ +int pci_mem_align = 0; + +static int __init set_pci_mem_align(char *str) +{ + pci_mem_align = 1; + return 1; +} +__setup("pci-mem-align", set_pci_mem_align); + +/* This quirk function enables us to force all memory resources which are + * assigned to PCI devices, to be page-aligned. + */ +static void __devinit quirk_align_mem_resources(struct pci_dev *dev) +{ + int i; + struct resource *r; + resource_size_t old_start; + + if (!pci_mem_align) + return; + + for (i=0; i < DEVICE_COUNT_RESOURCE; i++) { + r = &dev->resource[i]; + if ((r == NULL) || !(r->flags & IORESOURCE_MEM)) + continue; + + old_start = r->start; + r->start = (r->start + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); + r->end = r->end - (old_start - r->start); + } +} +DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_align_mem_resources); /* The Mellanox Tavor device gives false positive parity errors * Mark this device with a broken_parity_status, to allow diff -r b4ace76fb245 -r d827dfc6593e drivers/xen/blkfront/vbd.c --- a/drivers/xen/blkfront/vbd.c Tue Oct 30 16:44:52 2007 -0600 +++ b/drivers/xen/blkfront/vbd.c Thu Nov 01 09:07:45 2007 -0600 @@ -361,7 +361,7 @@ xlvbd_barrier(struct blkfront_info *info info->feature_barrier ? QUEUE_ORDERED_DRAIN : QUEUE_ORDERED_NONE, NULL); if (err) return err; - printk("blkfront: %s: barriers %s\n", + printk(KERN_INFO "blkfront: %s: barriers %s\n", info->gd->disk_name, info->feature_barrier ? "enabled" : "disabled"); return 0; } @@ -369,7 +369,7 @@ int int xlvbd_barrier(struct blkfront_info *info) { - printk("blkfront: %s: barriers disabled\n", info->gd->disk_name); + printk(KERN_INFO "blkfront: %s: barriers disabled\n", info->gd->disk_name); return -ENOSYS; } #endif diff -r b4ace76fb245 -r d827dfc6593e drivers/xen/core/xencomm.c --- a/drivers/xen/core/xencomm.c Tue Oct 30 16:44:52 2007 -0600 +++ b/drivers/xen/core/xencomm.c Thu Nov 01 09:07:45 2007 -0600 @@ -27,6 +27,10 @@ #include <asm/xen/xencomm.h> /* for is_kern_addr() */ #endif +#ifdef HAVE_XEN_PLATFORM_COMPAT_H +#include <xen/platform-compat.h> +#endif + static int xencomm_init(struct xencomm_desc *desc, void *buffer, unsigned long bytes) { diff -r b4ace76fb245 -r d827dfc6593e drivers/xen/netfront/netfront.c --- a/drivers/xen/netfront/netfront.c Tue Oct 30 16:44:52 2007 -0600 +++ b/drivers/xen/netfront/netfront.c Thu Nov 01 09:07:45 2007 -0600 @@ -221,7 +221,7 @@ static int network_connect(struct net_de static int network_connect(struct net_device *); static void network_tx_buf_gc(struct net_device *); static void network_alloc_rx_buffers(struct net_device *); -static int send_fake_arp(struct net_device *); +static void send_fake_arp(struct net_device *); static irqreturn_t netif_int(int irq, void *dev_id, struct pt_regs *ptregs); @@ -542,7 +542,7 @@ static void backend_changed(struct xenbu if (network_connect(netdev) != 0) break; xenbus_switch_state(dev, XenbusStateConnected); - (void)send_fake_arp(netdev); + send_fake_arp(netdev); break; case XenbusStateClosing: @@ -557,8 +557,9 @@ static void backend_changed(struct xenbu * @param dev device * @return 0 on success, error code otherwise */ -static int send_fake_arp(struct net_device *dev) -{ +static void send_fake_arp(struct net_device *dev) +{ +#ifdef CONFIG_INET struct sk_buff *skb; u32 src_ip, dst_ip; @@ -567,16 +568,17 @@ static int send_fake_arp(struct net_devi /* No IP? Then nothing to do. */ if (src_ip == 0) - return 0; + return; skb = arp_create(ARPOP_REPLY, ETH_P_ARP, dst_ip, dev, src_ip, /*dst_hw*/ NULL, /*src_hw*/ NULL, /*target_hw*/ dev->dev_addr); if (skb == NULL) - return -ENOMEM; - - return dev_queue_xmit(skb); + return; + + dev_queue_xmit(skb); +#endif } static inline int netfront_tx_slot_available(struct netfront_info *np) @@ -2098,6 +2100,7 @@ static struct net_device * __devinit cre return ERR_PTR(err); } +#ifdef CONFIG_INET /* * We use this notifier to send out a fake ARP reply to reset switches and * router ARP caches when an IP interface is brought up on a VIF. @@ -2110,10 +2113,17 @@ inetdev_notify(struct notifier_block *th /* UP event and is it one of our devices? */ if (event == NETDEV_UP && dev->open == network_open) - (void)send_fake_arp(dev); + send_fake_arp(dev); return NOTIFY_DONE; } + +static struct notifier_block notifier_inetdev = { + .notifier_call = inetdev_notify, + .next = NULL, + .priority = 0 +}; +#endif static void netif_disconnect_backend(struct netfront_info *info) @@ -2168,12 +2178,6 @@ static struct xenbus_driver netfront = { }; -static struct notifier_block notifier_inetdev = { - .notifier_call = inetdev_notify, - .next = NULL, - .priority = 0 -}; - static int __init netif_init(void) { if (!is_running_on_xen()) @@ -2196,7 +2200,9 @@ static int __init netif_init(void) IPRINTK("Initialising virtual ethernet driver.\n"); +#ifdef CONFIG_INET (void)register_inetaddr_notifier(¬ifier_inetdev); +#endif return xenbus_register_frontend(&netfront); } @@ -2208,7 +2214,9 @@ static void __exit netif_exit(void) if (is_initial_xendomain()) return; +#ifdef CONFIG_INET unregister_inetaddr_notifier(¬ifier_inetdev); +#endif netif_exit_accel(); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |