diff options
Diffstat (limited to 'linux/dev/glue')
-rw-r--r-- | linux/dev/glue/glue.h | 4 | ||||
-rw-r--r-- | linux/dev/glue/kmem.c | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/linux/dev/glue/glue.h b/linux/dev/glue/glue.h index 5d4f6d8..8cb118c 100644 --- a/linux/dev/glue/glue.h +++ b/linux/dev/glue/glue.h @@ -25,8 +25,8 @@ extern int linux_auto_config; extern int linux_intr_pri; -extern void *alloc_contig_mem (unsigned, unsigned, unsigned, vm_page_t *); -extern void free_contig_mem (vm_page_t); +extern unsigned long alloc_contig_mem (unsigned, unsigned, unsigned, vm_page_t *); +extern void free_contig_mem (vm_page_t, unsigned); extern void init_IRQ (void); extern void restore_IRQ (void); extern void linux_kmem_init (void); diff --git a/linux/dev/glue/kmem.c b/linux/dev/glue/kmem.c index ff052ff..ed57610 100644 --- a/linux/dev/glue/kmem.c +++ b/linux/dev/glue/kmem.c @@ -111,10 +111,8 @@ linux_kmem_init () for (p = pages, j = 0; j < MEM_CHUNK_SIZE - PAGE_SIZE; j += PAGE_SIZE) { assert (p->phys_addr < MEM_DMA_LIMIT); - assert (p->phys_addr + PAGE_SIZE - == ((vm_page_t) p->pageq.next)->phys_addr); - - p = (vm_page_t) p->pageq.next; + assert (p->phys_addr + PAGE_SIZE == (p + 1)->phys_addr); + p++; } pages_free[i].end = pages_free[i].start + MEM_CHUNK_SIZE; |