WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] xen: miscellaneous adjustments (mostl

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xen: miscellaneous adjustments (mostly missing from earlier upstream merges)
From: Xen patchbot-linux-2.6.18-xen <patchbot@xxxxxxx>
Date: Tue, 05 Apr 2011 12:50:06 +0100
Delivery-date: Tue, 05 Apr 2011 04:50:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1302003573 -3600
# Node ID e6edaed332cba4ddc3e25fe061cbf7b29bc5264a
# Parent  b78a36ec9895c141b5d75ccbbbd23253640a138f
xen: miscellaneous adjustments (mostly missing from earlier upstream merges)

Remove unused bits, use kmem_cache_zalloc(), consistently constify
instances of struct file_operations, fix an error cleanup path.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---


diff -r b78a36ec9895 -r e6edaed332cb arch/i386/mm/ioremap-xen.c
--- a/arch/i386/mm/ioremap-xen.c        Tue Apr 05 12:38:55 2011 +0100
+++ b/arch/i386/mm/ioremap-xen.c        Tue Apr 05 12:39:33 2011 +0100
@@ -154,21 +154,6 @@
 
 EXPORT_SYMBOL(create_lookup_pte_addr);
 
-static int noop_fn(
-       pte_t *pte, struct page *pmd_page, unsigned long addr, void *data)
-{
-       return 0;
-}
-
-int touch_pte_range(struct mm_struct *mm,
-                   unsigned long address,
-                   unsigned long size)
-{
-       return apply_to_page_range(mm, address, size, noop_fn, NULL);
-} 
-
-EXPORT_SYMBOL(touch_pte_range);
-
 /*
  * Does @address reside within a non-highmem page that is local to this virtual
  * machine (i.e., not an I/O page, nor a memory page belonging to another VM).
diff -r b78a36ec9895 -r e6edaed332cb arch/x86_64/kernel/process-xen.c
--- a/arch/x86_64/kernel/process-xen.c  Tue Apr 05 12:38:55 2011 +0100
+++ b/arch/x86_64/kernel/process-xen.c  Tue Apr 05 12:39:33 2011 +0100
@@ -50,7 +50,6 @@
 #include <asm/pda.h>
 #include <asm/prctl.h>
 #include <asm/kdebug.h>
-#include <xen/interface/platform.h>
 #include <xen/interface/physdev.h>
 #include <xen/interface/vcpu.h>
 #include <asm/desc.h>
diff -r b78a36ec9895 -r e6edaed332cb drivers/char/agp/intel-agp.c
--- a/drivers/char/agp/intel-agp.c      Tue Apr 05 12:38:55 2011 +0100
+++ b/drivers/char/agp/intel-agp.c      Tue Apr 05 12:39:33 2011 +0100
@@ -174,6 +174,10 @@
        if (change_page_attr(page, 4, PAGE_KERNEL_NOCACHE) < 0) {
                change_page_attr(page, 4, PAGE_KERNEL);
                global_flush_tlb();
+#ifdef CONFIG_XEN
+               xen_destroy_contiguous_region((unsigned long)page_address(page),
+                                             2);
+#endif
                __free_pages(page, 2);
                return NULL;
        }
diff -r b78a36ec9895 -r e6edaed332cb drivers/xen/balloon/balloon.c
--- a/drivers/xen/balloon/balloon.c     Tue Apr 05 12:38:55 2011 +0100
+++ b/drivers/xen/balloon/balloon.c     Tue Apr 05 12:39:33 2011 +0100
@@ -111,7 +111,6 @@
 /* Main work function, always executed in process context. */
 static void balloon_process(void *unused);
 static DECLARE_WORK(balloon_worker, balloon_process, NULL);
-static struct timer_list balloon_timer;
 
 /* When ballooning out (allocating memory to return to Xen) we don't really 
    want the kernel to try too hard since that can trigger the oom killer. */
@@ -197,6 +196,7 @@
 {
        schedule_work(&balloon_worker);
 }
+static DEFINE_TIMER(balloon_timer, balloon_alarm, 0, 0);
 
 static unsigned long current_target(void)
 {
@@ -563,10 +563,6 @@
        bs.balloon_high  = 0;
        bs.driver_pages  = 0UL;
 
-       init_timer(&balloon_timer);
-       balloon_timer.data = 0;
-       balloon_timer.function = balloon_alarm;
-    
 #ifdef CONFIG_PROC_FS
        if ((balloon_pde = create_xen_proc_entry("balloon", 0644)) == NULL) {
                WPRINTK("Unable to create /proc/xen/balloon.\n");
diff -r b78a36ec9895 -r e6edaed332cb drivers/xen/blkback/interface.c
--- a/drivers/xen/blkback/interface.c   Tue Apr 05 12:38:55 2011 +0100
+++ b/drivers/xen/blkback/interface.c   Tue Apr 05 12:39:33 2011 +0100
@@ -41,11 +41,10 @@
 {
        blkif_t *blkif;
 
-       blkif = kmem_cache_alloc(blkif_cachep, GFP_KERNEL);
+       blkif = kmem_cache_zalloc(blkif_cachep, GFP_KERNEL);
        if (!blkif)
                return ERR_PTR(-ENOMEM);
 
-       memset(blkif, 0, sizeof(*blkif));
        blkif->domid = domid;
        spin_lock_init(&blkif->blk_ring_lock);
        atomic_set(&blkif->refcnt, 1);
diff -r b78a36ec9895 -r e6edaed332cb drivers/xen/blktap/interface.c
--- a/drivers/xen/blktap/interface.c    Tue Apr 05 12:38:55 2011 +0100
+++ b/drivers/xen/blktap/interface.c    Tue Apr 05 12:39:33 2011 +0100
@@ -41,11 +41,10 @@
 {
        blkif_t *blkif;
 
-       blkif = kmem_cache_alloc(blkif_cachep, GFP_KERNEL);
+       blkif = kmem_cache_zalloc(blkif_cachep, GFP_KERNEL);
        if (!blkif)
                return ERR_PTR(-ENOMEM);
 
-       memset(blkif, 0, sizeof(*blkif));
        blkif->domid = domid;
        spin_lock_init(&blkif->blk_ring_lock);
        atomic_set(&blkif->refcnt, 1);
diff -r b78a36ec9895 -r e6edaed332cb drivers/xen/blktap2/control.c
--- a/drivers/xen/blktap2/control.c     Tue Apr 05 12:38:55 2011 +0100
+++ b/drivers/xen/blktap2/control.c     Tue Apr 05 12:39:33 2011 +0100
@@ -145,7 +145,7 @@
        return -ENOIOCTLCMD;
 }
 
-static struct file_operations blktap_control_file_operations = {
+static const struct file_operations blktap_control_file_operations = {
        .owner    = THIS_MODULE,
        .ioctl    = blktap_control_ioctl,
 };
diff -r b78a36ec9895 -r e6edaed332cb drivers/xen/blktap2/ring.c
--- a/drivers/xen/blktap2/ring.c        Tue Apr 05 12:38:55 2011 +0100
+++ b/drivers/xen/blktap2/ring.c        Tue Apr 05 12:39:33 2011 +0100
@@ -479,7 +479,7 @@
        return 0;
 }
 
-static struct file_operations blktap_ring_file_operations = {
+static const struct file_operations blktap_ring_file_operations = {
        .owner    = THIS_MODULE,
        .open     = blktap_ring_open,
        .release  = blktap_ring_release,
diff -r b78a36ec9895 -r e6edaed332cb drivers/xen/core/xen_proc.c
--- a/drivers/xen/core/xen_proc.c       Tue Apr 05 12:38:55 2011 +0100
+++ b/drivers/xen/core/xen_proc.c       Tue Apr 05 12:39:33 2011 +0100
@@ -13,11 +13,13 @@
        return create_proc_entry(name, mode, xen_base);
 }
 
+#ifdef MODULE
 EXPORT_SYMBOL_GPL(create_xen_proc_entry); 
+#else
 
 void remove_xen_proc_entry(const char *name)
 {
        remove_proc_entry(name, xen_base);
 }
 
-EXPORT_SYMBOL_GPL(remove_xen_proc_entry); 
+#endif
diff -r b78a36ec9895 -r e6edaed332cb drivers/xen/netback/common.h
--- a/drivers/xen/netback/common.h      Tue Apr 05 12:38:55 2011 +0100
+++ b/drivers/xen/netback/common.h      Tue Apr 05 12:39:33 2011 +0100
@@ -91,7 +91,7 @@
        struct timer_list tx_queue_timeout;
 
        /* Statistics */
-       int nr_copied_skbs;
+       unsigned long nr_copied_skbs;
 
        /* Miscellaneous private stuff. */
        struct list_head list;  /* scheduling list */
diff -r b78a36ec9895 -r e6edaed332cb drivers/xen/netback/interface.c
--- a/drivers/xen/netback/interface.c   Tue Apr 05 12:38:55 2011 +0100
+++ b/drivers/xen/netback/interface.c   Tue Apr 05 12:39:33 2011 +0100
@@ -171,7 +171,7 @@
        char name[ETH_GSTRING_LEN];
        u16 offset;
 } netbk_stats[] = {
-       { "copied_skbs", offsetof(netif_t, nr_copied_skbs) },
+       { "copied_skbs", offsetof(netif_t, nr_copied_skbs) / sizeof(long) },
 };
 
 static int netbk_get_stats_count(struct net_device *dev)
@@ -182,11 +182,11 @@
 static void netbk_get_ethtool_stats(struct net_device *dev,
                                   struct ethtool_stats *stats, u64 * data)
 {
-       void *netif = netdev_priv(dev);
+       unsigned long *np = netdev_priv(dev);
        int i;
 
        for (i = 0; i < ARRAY_SIZE(netbk_stats); i++)
-               data[i] = *(int *)(netif + netbk_stats[i].offset);
+               data[i] = np[netbk_stats[i].offset];
 }
 
 static void netbk_get_strings(struct net_device *dev, u32 stringset, u8 * data)
diff -r b78a36ec9895 -r e6edaed332cb drivers/xen/scsiback/interface.c
--- a/drivers/xen/scsiback/interface.c  Tue Apr 05 12:38:55 2011 +0100
+++ b/drivers/xen/scsiback/interface.c  Tue Apr 05 12:39:33 2011 +0100
@@ -47,11 +47,10 @@
 {
        struct vscsibk_info *info;
 
-       info = kmem_cache_alloc(scsiback_cachep, GFP_KERNEL);
+       info = kmem_cache_zalloc(scsiback_cachep, GFP_KERNEL);
        if (!info)
                return ERR_PTR(-ENOMEM);
 
-       memset(info, 0, sizeof(*info));
        info->domid = domid;
        spin_lock_init(&info->ring_lock);
        atomic_set(&info->nr_unreplied_reqs, 0);
diff -r b78a36ec9895 -r e6edaed332cb drivers/xen/tpmback/interface.c
--- a/drivers/xen/tpmback/interface.c   Tue Apr 05 12:38:55 2011 +0100
+++ b/drivers/xen/tpmback/interface.c   Tue Apr 05 12:39:33 2011 +0100
@@ -27,11 +27,10 @@
 {
        tpmif_t *tpmif;
 
-       tpmif = kmem_cache_alloc(tpmif_cachep, GFP_KERNEL);
+       tpmif = kmem_cache_zalloc(tpmif_cachep, GFP_KERNEL);
        if (tpmif == NULL)
                goto out_of_memory;
 
-       memset(tpmif, 0, sizeof (*tpmif));
        tpmif->domid = domid;
        tpmif->status = DISCONNECTED;
        tpmif->bi = bi;
diff -r b78a36ec9895 -r e6edaed332cb drivers/xen/xenbus/xenbus_probe.c
--- a/drivers/xen/xenbus/xenbus_probe.c Tue Apr 05 12:38:55 2011 +0100
+++ b/drivers/xen/xenbus/xenbus_probe.c Tue Apr 05 12:39:33 2011 +0100
@@ -813,7 +813,6 @@
        xenbus_backend_suspend(suspend_dev);
        xs_suspend();
 }
-EXPORT_SYMBOL_GPL(xenbus_suspend);
 
 void xenbus_resume(void)
 {
@@ -823,7 +822,6 @@
                bus_for_each_dev(&xenbus_frontend.bus, NULL, NULL, resume_dev);
        xenbus_backend_resume(resume_dev);
 }
-EXPORT_SYMBOL_GPL(xenbus_resume);
 
 void xenbus_suspend_cancel(void)
 {
@@ -832,12 +830,15 @@
                bus_for_each_dev(&xenbus_frontend.bus, NULL, NULL, 
suspend_cancel_dev);
        xenbus_backend_resume(suspend_cancel_dev);
 }
-EXPORT_SYMBOL_GPL(xenbus_suspend_cancel);
 
 /* A flag to determine if xenstored is 'ready' (i.e. has started) */
 atomic_t xenbus_xsd_state = ATOMIC_INIT(XENBUS_XSD_UNCOMMITTED);
 
-int register_xenstore_notifier(struct notifier_block *nb)
+int
+#ifdef CONFIG_XEN
+__init
+#endif
+register_xenstore_notifier(struct notifier_block *nb)
 {
        int ret = 0;
 
@@ -848,6 +849,7 @@
 
        return ret;
 }
+#ifndef CONFIG_XEN
 EXPORT_SYMBOL_GPL(register_xenstore_notifier);
 
 void unregister_xenstore_notifier(struct notifier_block *nb)
@@ -855,6 +857,7 @@
        blocking_notifier_chain_unregister(&xenstore_chain, nb);
 }
 EXPORT_SYMBOL_GPL(unregister_xenstore_notifier);
+#endif
 
 
 void xenbus_probe(void *unused)
diff -r b78a36ec9895 -r e6edaed332cb include/asm-i386/mach-xen/asm/pgtable.h
--- a/include/asm-i386/mach-xen/asm/pgtable.h   Tue Apr 05 12:38:55 2011 +0100
+++ b/include/asm-i386/mach-xen/asm/pgtable.h   Tue Apr 05 12:39:33 2011 +0100
@@ -521,9 +521,6 @@
 int create_lookup_pte_addr(struct mm_struct *mm,
                            unsigned long address,
                            uint64_t *ptep);
-int touch_pte_range(struct mm_struct *mm,
-                    unsigned long address,
-                    unsigned long size);
 
 int xen_change_pte_range(struct mm_struct *mm, pmd_t *pmd,
                unsigned long addr, unsigned long end, pgprot_t newprot);
diff -r b78a36ec9895 -r e6edaed332cb include/asm-x86_64/mach-xen/asm/pgtable.h
--- a/include/asm-x86_64/mach-xen/asm/pgtable.h Tue Apr 05 12:38:55 2011 +0100
+++ b/include/asm-x86_64/mach-xen/asm/pgtable.h Tue Apr 05 12:39:33 2011 +0100
@@ -394,7 +394,6 @@
 
 /*
  * Level 4 access.
- * Never use these in the common code.
  */
 #define pgd_page(pgd) ((unsigned long) __va(pgd_val(pgd) & PTE_MASK))
 #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
@@ -543,10 +542,6 @@
                            unsigned long address,
                            uint64_t *ptep);
 
-int touch_pte_range(struct mm_struct *mm,
-                    unsigned long address,
-                    unsigned long size);
-
 int xen_change_pte_range(struct mm_struct *mm, pmd_t *pmd,
                unsigned long addr, unsigned long end, pgprot_t newprot);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] xen: miscellaneous adjustments (mostly missing from earlier upstream merges), Xen patchbot-linux-2 . 6 . 18-xen <=