From: Dave A. <ai...@us...> - 2001-06-10 10:20:45
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv10564/include/asm-vax/mm Modified Files: pgtable.h Log Message: DA: add a new definition for VMALLOC_START the old one didn't take Linux page alignment into a/c, work out where the vmalloc area starts from the vmallocmap_base SPTE... Index: pgtable.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pgtable.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- pgtable.h 2001/05/19 12:06:58 1.11 +++ pgtable.h 2001/06/10 10:20:42 1.12 @@ -1,3 +1,4 @@ +/* (c) 2001 Vax Porting Project, atp, kenn, airlied */ #ifndef _VAX_MM_PGTABLE_H #define _VAX_MM_PGTABLE_H @@ -65,16 +66,24 @@ /* macro to get the virtual address represented by an SPTE, given the address of the SPTE */ #define SPTE_TO_VIRT(p) (void *)((((unsigned long)p - (unsigned long)swapper_pg_dir[2].br) << (PAGE_SHIFT-SIZEOF_PTE_LOG2)) + PAGE_OFFSET) - + #ifndef __ASSEMBLY__ /* Other architectures put a virtual hole between the end of mapped physical memory and lowest address that vmalloc() will hand out. This isn't really practical on the VAX, since the system page table must be contiguous, so virtual holes in S0 - space waste precious SPTEs. */ + space waste precious SPTEs. +*/ + /* the previous definition of VMALLOC START relied on the + * VAX phy memory being an exact 4k multiple, + * my VAX has 7f1f hw-pages so isn't aligned on 4K + * workout the VMALLOC_START from the vmallocmap_base and the + * system base register.- + */ #define VMALLOC_OFFSET (SPT_MAX_IOMAP * 1024) -#define VMALLOC_START ((unsigned long) high_memory + VMALLOC_OFFSET) + /*#define VMALLOC_START ((unsigned long) high_memory + VMALLOC_OFFSET)*/ +#define VMALLOC_START (PAGE_OFFSET+((vmallocmap_base-swapper_pg_dir[2].br)<<(PAGELET_SHIFT-2))) #define VMALLOC_VMADDR(x) ((unsigned long)(x)) #define VMALLOC_END (VMALLOC_START + (SPT_MAX_VMALLOC * 1024)) @@ -87,6 +96,9 @@ /* Number of SPTEs in system page table */ extern unsigned int spt_size; + +/* external pointer to vmallocmap_base in head.S */ +extern unsigned long vmallocmap_base; /* zero page used for uninitialized stuff */ /* extern unsigned long empty_zero_page[1024]; */ |