From: Andy P. <at...@us...> - 2001-06-16 14:05:34
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv31609/arch/vax/mm Modified Files: init.c Log Message: implement DMA memory zone for ISA heritage peripherals. Tell vaxlance.c to use memory in DMA zone for now. Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/init.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- init.c 2001/06/07 21:23:51 1.11 +++ init.c 2001/06/16 14:05:30 1.12 @@ -41,8 +41,17 @@ void __init paging_init() { unsigned long zones_size[MAX_NR_ZONES] = { 0, 0, 0 }; - /* max_pfn is the number of hwptes */ - zones_size[ZONE_DMA] = max_pfn; + unsigned int max_dma, max_norm; + + max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT; + + /* max_pfn is the number of 4k ptes */ + if (max_pfn < max_dma) { + zones_size[ZONE_DMA] = max_pfn; + } else { + zones_size[ZONE_DMA] = max_dma; + zones_size[ZONE_NORMAL] = max_pfn - max_dma; + } free_area_init(zones_size); } |