patch-2.4.0-test10 linux/arch/sparc/kernel/ioport.c
Next file: linux/arch/sparc/kernel/process.c
Previous file: linux/arch/sparc/kernel/ebus.c
Back to the patch index
Back to the overall index
- Lines: 55
- Date:
Fri Oct 13 12:08:01 2000
- Orig file:
v2.4.0-test9/linux/arch/sparc/kernel/ioport.c
- Orig date:
Thu Jun 22 07:21:12 2000
diff -u --recursive --new-file v2.4.0-test9/linux/arch/sparc/kernel/ioport.c linux/arch/sparc/kernel/ioport.c
@@ -1,4 +1,4 @@
-/* $Id: ioport.c,v 1.39 2000/06/20 01:10:00 anton Exp $
+/* $Id: ioport.c,v 1.40 2000/10/10 09:44:46 anton Exp $
* ioport.c: Simple io mapping allocator.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -244,6 +244,7 @@
unsigned long plen;
plen = res->end - res->start + 1;
+ plen = (plen + PAGE_SIZE-1) & PAGE_MASK;
while (plen != 0) {
plen -= PAGE_SIZE;
(*_sparc_unmapioaddr)(res->start + plen);
@@ -323,7 +324,7 @@
return;
}
- if (((unsigned long)p & (PAGE_MASK-1)) != 0) {
+ if (((unsigned long)p & (PAGE_SIZE-1)) != 0) {
printk("sbus_free_consistent: unaligned va %p\n", p);
return;
}
@@ -496,7 +497,7 @@
if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) {
free_pages(va, order);
- printk("sbus_alloc_consistent: no core\n");
+ printk("pci_alloc_consistent: no core\n");
return NULL;
}
memset((char*)res, 0, sizeof(struct resource));
@@ -546,18 +547,18 @@
if ((res = _sparc_find_resource(&_sparc_dvma,
(unsigned long)p)) == NULL) {
- printk("sbus_free_consistent: cannot free %p\n", p);
+ printk("pci_free_consistent: cannot free %p\n", p);
return;
}
- if (((unsigned long)p & (PAGE_MASK-1)) != 0) {
- printk("sbus_free_consistent: unaligned va %p\n", p);
+ if (((unsigned long)p & (PAGE_SIZE-1)) != 0) {
+ printk("pci_free_consistent: unaligned va %p\n", p);
return;
}
n = (n + PAGE_SIZE-1) & PAGE_MASK;
if ((res->end-res->start)+1 != n) {
- printk("sbus_free_consistent: region 0x%lx asked 0x%lx\n",
+ printk("pci_free_consistent: region 0x%lx asked 0x%lx\n",
(long)((res->end-res->start)+1), (long)n);
return;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)