[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Remove generic pci.h and ioport.h header files.



ChangeSet 1.1437, 2005/05/11 09:31:59+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Remove generic pci.h and ioport.h header files.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 b/xen/arch/x86/mtrr/main.c |   20 -
 b/xen/arch/x86/setup.c     |    1 
 xen/common/resource.c      |  329 -----------------
 xen/include/xen/ioport.h   |  117 ------
 xen/include/xen/pci.h      |  834 ---------------------------------------------
 5 files changed, 1301 deletions(-)


diff -Nru a/xen/arch/x86/mtrr/main.c b/xen/arch/x86/mtrr/main.c
--- a/xen/arch/x86/mtrr/main.c  2005-05-11 05:03:53 -04:00
+++ b/xen/arch/x86/mtrr/main.c  2005-05-11 05:03:53 -04:00
@@ -33,7 +33,6 @@
 
 #include <xen/config.h>
 #include <xen/init.h>
-#include <xen/pci.h>
 #include <xen/slab.h>
 #include <xen/smp.h>
 #include <xen/spinlock.h>
@@ -97,25 +96,6 @@
 /*  Returns non-zero if we have the write-combining memory type  */
 static int have_wrcomb(void)
 {
-       struct pci_dev *dev;
-       
-       if ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) != NULL) {
-               /* ServerWorks LE chipsets have problems with write-combining 
-                  Don't allow it and leave room for other chipsets to be 
tagged */
-               if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS &&
-                   dev->device == PCI_DEVICE_ID_SERVERWORKS_LE) {
-                       printk(KERN_INFO "mtrr: Serverworks LE detected. 
Write-combining disabled.\n");
-                       return 0;
-               }
-               /* Intel 450NX errata # 23. Non ascending cachline evictions to
-                  write combining memory may resulting in data corruption */
-               if (dev->vendor == PCI_VENDOR_ID_INTEL &&
-                   dev->device == PCI_DEVICE_ID_INTEL_82451NX)
-               {
-                       printk(KERN_INFO "mtrr: Intel 450NX MMC detected. 
Write-combining disabled.\n");
-                       return 0;
-               }
-       }               
        return (mtrr_if->have_wrcomb ? mtrr_if->have_wrcomb() : 0);
 }
 
diff -Nru a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      2005-05-11 05:03:53 -04:00
+++ b/xen/arch/x86/setup.c      2005-05-11 05:03:53 -04:00
@@ -3,7 +3,6 @@
 #include <xen/init.h>
 #include <xen/lib.h>
 #include <xen/sched.h>
-#include <xen/pci.h>
 #include <xen/serial.h>
 #include <xen/softirq.h>
 #include <xen/acpi.h>
diff -Nru a/xen/common/resource.c b/xen/common/resource.c
--- a/xen/common/resource.c     2005-05-11 05:03:53 -04:00
+++ /dev/null   Wed Dec 31 16:00:00 196900
@@ -1,329 +0,0 @@
-/*
- *     linux/kernel/resource.c
- *
- * Copyright (C) 1999  Linus Torvalds
- * Copyright (C) 1999  Martin Mares <mj@xxxxxx>
- *
- * Arbitrary resource management.
- */
-
-#include <xen/config.h>
-#include <xen/lib.h>
-#include <xen/sched.h>
-#include <xen/errno.h>
-#include <xen/ioport.h>
-#include <xen/init.h>
-#include <xen/slab.h>
-#include <xen/spinlock.h>
-#include <asm/io.h>
-
-struct resource ioport_resource = { "PCI IO", 0x0000, IO_SPACE_LIMIT, 
IORESOURCE_IO };
-struct resource iomem_resource = { "PCI mem", 0x00000000, 0xffffffff, 
IORESOURCE_MEM };
-
-static rwlock_t resource_lock = RW_LOCK_UNLOCKED;
-
-/*
- * This generates reports for /proc/ioports and /proc/iomem
- */
-static char * do_resource_list(struct resource *entry, const char *fmt, int 
offset, char *buf, char *end)
-{
-       if (offset < 0)
-               offset = 0;
-
-       while (entry) {
-               const char *name = entry->name;
-               unsigned long from, to;
-
-               if ((int) (end-buf) < 80)
-                       return buf;
-
-               from = entry->start;
-               to = entry->end;
-               if (!name)
-                       name = "<BAD>";
-
-               buf += sprintf(buf, fmt + offset, from, to, name);
-               if (entry->child)
-                       buf = do_resource_list(entry->child, fmt, offset-2, 
buf, end);
-               entry = entry->sibling;
-       }
-
-       return buf;
-}
-
-int get_resource_list(struct resource *root, char *buf, int size)
-{
-       char *fmt;
-       int retval;
-
-       fmt = "        %08lx-%08lx : %s\n";
-       if (root->end < 0x10000)
-               fmt = "        %04lx-%04lx : %s\n";
-       read_lock(&resource_lock);
-       retval = do_resource_list(root->child, fmt, 8, buf, buf + size) - buf;
-       read_unlock(&resource_lock);
-       return retval;
-}      
-
-/* Return the conflict entry if you can't request it */
-static struct resource * __request_resource(struct resource *root, struct 
resource *new)
-{
-       unsigned long start = new->start;
-       unsigned long end = new->end;
-       struct resource *tmp, **p;
-
-       if (end < start)
-               return root;
-       if (start < root->start)
-               return root;
-       if (end > root->end)
-               return root;
-       p = &root->child;
-       for (;;) {
-               tmp = *p;
-               if (!tmp || tmp->start > end) {
-                       new->sibling = tmp;
-                       *p = new;
-                       new->parent = root;
-                       return NULL;
-               }
-               p = &tmp->sibling;
-               if (tmp->end < start)
-                       continue;
-               return tmp;
-       }
-}
-
-static int __release_resource(struct resource *old)
-{
-       struct resource *tmp, **p;
-
-       p = &old->parent->child;
-       for (;;) {
-               tmp = *p;
-               if (!tmp)
-                       break;
-               if (tmp == old) {
-                       *p = tmp->sibling;
-                       old->parent = NULL;
-                       return 0;
-               }
-               p = &tmp->sibling;
-       }
-       return -EINVAL;
-}
-
-int request_resource(struct resource *root, struct resource *new)
-{
-       struct resource *conflict;
-
-       write_lock(&resource_lock);
-       conflict = __request_resource(root, new);
-       write_unlock(&resource_lock);
-       return conflict ? -EBUSY : 0;
-}
-
-int release_resource(struct resource *old)
-{
-       int retval;
-
-       write_lock(&resource_lock);
-       retval = __release_resource(old);
-       write_unlock(&resource_lock);
-       return retval;
-}
-
-int check_resource(struct resource *root, unsigned long start, unsigned long 
len)
-{
-       struct resource *conflict, tmp;
-
-       tmp.start = start;
-       tmp.end = start + len - 1;
-       write_lock(&resource_lock);
-       conflict = __request_resource(root, &tmp);
-       if (!conflict)
-               __release_resource(&tmp);
-       write_unlock(&resource_lock);
-       return conflict ? -EBUSY : 0;
-}
-
-/*
- * Find empty slot in the resource tree given range and alignment.
- */
-static int find_resource(struct resource *root, struct resource *new,
-                        unsigned long size,
-                        unsigned long min, unsigned long max,
-                        unsigned long align,
-                        void (*alignf)(void *, struct resource *,
-                                       unsigned long, unsigned long),
-                        void *alignf_data)
-{
-       struct resource *this = root->child;
-
-       new->start = root->start;
-       for(;;) {
-               if (this)
-                       new->end = this->start;
-               else
-                       new->end = root->end;
-               if (new->start < min)
-                       new->start = min;
-               if (new->end > max)
-                       new->end = max;
-               new->start = (new->start + align - 1) & ~(align - 1);
-               if (alignf)
-                       alignf(alignf_data, new, size, align);
-               if (new->start < new->end && new->end - new->start + 1 >= size) 
{
-                       new->end = new->start + size - 1;
-                       return 0;
-               }
-               if (!this)
-                       break;
-               new->start = this->end + 1;
-               this = this->sibling;
-       }
-       return -EBUSY;
-}
-
-/*
- * Allocate empty slot in the resource tree given range and alignment.
- */
-int allocate_resource(struct resource *root, struct resource *new,
-                     unsigned long size,
-                     unsigned long min, unsigned long max,
-                     unsigned long align,
-                     void (*alignf)(void *, struct resource *,
-                                    unsigned long, unsigned long),
-                     void *alignf_data)
-{

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.