bitkeeper revision 1.1502 (428f0d94bUM6nCIYBQRzeFSs29KMDg)

Clean up droppings that occured when pulling the upgrade to 2.4.30 from 2.0-testing into unstable.


Signed-off-by: ian@xensource.com
This commit is contained in:
iap10@freefall.cl.cam.ac.uk committed 2005-05-21 10:29:40 +00:00
1 parent 5547368967
commit 51359ed895
7 files changed
-1713

No files matched your search

-6
View File
@@ -123,12 +123,6 @@
423e7e8dVDL1WLfbmQWuXMbetYk4jA freebsd-5.3-xen-sparse/mkbuildtree
423e7e8dBrOrAbydK6h49bY0VvDgPw freebsd-5.3-xen-sparse/xenfbsd_kernel_build
4187ca95_eQN62ugV1zliQcfzXrHnw install.sh
41ee5e8b_2rt-qHzbDXtIoBzOli0EA linux-2.4.29-xen-sparse/arch/xen/drivers/usbif/Makefile
41ee5e8bUhF4tH7OoJaVbUxdXqneVw linux-2.4.29-xen-sparse/arch/xen/drivers/usbif/backend/Makefile
41ee5e8bSPpxzhGO6TrY20TegW3cZg linux-2.4.29-xen-sparse/arch/xen/drivers/usbif/frontend/Makefile
4241709bNBs1q4Ss32YW0CyFVOGhEg linux-2.4.29-xen-sparse/arch/xen/kernel/ioport.c
4270e964iKFC24KiVm6jC5Eo7MxV6w linux-2.4.29-xen-sparse/arch/xen/kernel/pci-dma.c
41f97f64nW0wmgLxhwzPTzkF4E5ERA linux-2.4.29-xen-sparse/drivers/usb/hcd.c
3e5a4e6589G-U42lFKs43plskXoFxQ linux-2.4.30-xen-sparse/Makefile
3e5a4e65IEPjnWPZ5w3TxS5scV8Ewg linux-2.4.30-xen-sparse/arch/xen/Makefile
3e5a4e65n-KhsEAs-A4ULiStBp-r6w linux-2.4.30-xen-sparse/arch/xen/boot/Makefile
@@ -1,10 +0,0 @@
O_TARGET := drv.o
subdir-$(CONFIG_XEN_USB_FRONTEND) += frontend
obj-$(CONFIG_XEN_USB_FRONTEND) += frontend/drv.o
subdir-$(CONFIG_XEN_USB_BACKEND) += backend
obj-$(CONFIG_XEN_USB_BACKEND) += backend/drv.o
include $(TOPDIR)/Rules.make
@@ -1,3 +0,0 @@
O_TARGET := drv.o
obj-y := main.o interface.o control.o # vrh.o don't think I need this!
include $(TOPDIR)/Rules.make
@@ -1,3 +0,0 @@
O_TARGET := drv.o
obj-y := main.o
include $(TOPDIR)/Rules.make
@@ -1,43 +0,0 @@
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/types.h>
#include <linux/ioport.h>
#include <linux/mm.h>
#include <linux/smp.h>
#include <linux/smp_lock.h>
#include <linux/stddef.h>
#include <linux/slab.h>
#include <asm-xen/xen-public/physdev.h>
asmlinkage long sys_iopl(unsigned int new_io_pl)
{
unsigned int old_io_pl = current->thread.io_pl;
physdev_op_t op;
if (new_io_pl > 3)
return -EINVAL;
/* Need "raw I/O" privileges for direct port access. */
if ((new_io_pl > old_io_pl) && !capable(CAP_SYS_RAWIO))
return -EPERM;
/* Maintain OS privileges even if user attempts to relinquish them. */
if (new_io_pl == 0)
new_io_pl = 1;
/* Change our version of the privilege levels. */
current->thread.io_pl = new_io_pl;
/* Force the change at ring 0. */
op.cmd = PHYSDEVOP_SET_IOPL;
op.u.set_iopl.iopl = new_io_pl;
HYPERVISOR_physdev_op(&op);
return 0;
}
asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
{
return turn_on ? sys_iopl(3) : 0;
}
@@ -1,137 +0,0 @@
/*
* Dynamic DMA mapping support.
*
* On i386 there is no hardware dynamic DMA address translation,
* so consistent alloc/free are merely page allocation/freeing.
* The rest of the dynamic DMA mapping interface is implemented
* in asm/pci.h.
*/
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/pci.h>
#include <linux/version.h>
#include <asm/io.h>
#include <asm-xen/balloon.h>
#define pte_offset_kernel pte_offset
struct dma_coherent_mem {
void *virt_base;
u32 device_base;
int size;
int flags;
unsigned long *bitmap;
};
static void
xen_contig_memory(unsigned long vstart, unsigned int order)
{
/*
* Ensure multi-page extents are contiguous in machine memory.
* This code could be cleaned up some, and the number of
* hypercalls reduced.
*/
pgd_t *pgd;
pmd_t *pmd;
pte_t *pte;
unsigned long pfn, i, flags;
scrub_pages(vstart, 1 << order);
balloon_lock(flags);
/* 1. Zap current PTEs, giving away the underlying pages. */
for (i = 0; i < (1<<order); i++) {
pgd = pgd_offset_k( (vstart + (i*PAGE_SIZE)));
pmd = pmd_offset(pgd, (vstart + (i*PAGE_SIZE)));
pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
pfn = pte->pte_low >> PAGE_SHIFT;
HYPERVISOR_update_va_mapping(
vstart + (i*PAGE_SIZE), __pte_ma(0), 0);
phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
INVALID_P2M_ENTRY;
if (HYPERVISOR_dom_mem_op(MEMOP_decrease_reservation,
&pfn, 1, 0) != 1) BUG();
}
/* 2. Get a new contiguous memory extent. */
if (HYPERVISOR_dom_mem_op(MEMOP_increase_reservation,
&pfn, 1, order) != 1) BUG();
/* 3. Map the new extent in place of old pages. */
for (i = 0; i < (1<<order); i++) {
pgd = pgd_offset_k( (vstart + (i*PAGE_SIZE)));
pmd = pmd_offset(pgd, (vstart + (i*PAGE_SIZE)));
pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
HYPERVISOR_update_va_mapping(
vstart + (i*PAGE_SIZE),
__pte_ma(((pfn+i)<<PAGE_SHIFT)|__PAGE_KERNEL), 0);
xen_machphys_update(
pfn+i, (__pa(vstart)>>PAGE_SHIFT)+i);
phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
pfn+i;
}
/* Flush updates through and flush the TLB. */
flush_tlb_all();
balloon_unlock(flags);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
dma_addr_t *dma_handle)
#else
void *dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, int gfp)
#endif
{
void *ret;
unsigned int order = get_order(size);
unsigned long vstart;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
int gfp = GFP_ATOMIC;
if (hwdev == NULL || ((u32)hwdev->dma_mask < 0xffffffff))
gfp |= GFP_DMA;
#else
struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
/* ignore region specifiers */
gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
if (mem) {
int page = bitmap_find_free_region(mem->bitmap, mem->size,
order);
if (page >= 0) {
*dma_handle = mem->device_base + (page << PAGE_SHIFT);
ret = mem->virt_base + (page << PAGE_SHIFT);
memset(ret, 0, size);
return ret;
}
if (mem->flags & DMA_MEMORY_EXCLUSIVE)
return NULL;
}
if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
gfp |= GFP_DMA;
#endif
vstart = __get_free_pages(gfp, order);
ret = (void *)vstart;
if (ret == NULL)
return ret;
xen_contig_memory(vstart, order);
memset(ret, 0, size);
*dma_handle = virt_to_bus(ret);
return ret;
}
void pci_free_consistent(struct pci_dev *hwdev, size_t size,
void *vaddr, dma_addr_t dma_handle)
{
free_pages((unsigned long)vaddr, get_order(size));
}
File diff suppressed because it is too large. Load diff
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.