From: Kenn H. <ke...@us...> - 2001-01-24 00:07:25
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory usw-pr-cvs1:/tmp/cvs-serv32677/mm Modified Files: pgtable.h Log Message: Bring over latter 2.2 changes and a few fixes for 2.4 Index: pgtable.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/pgtable.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pgtable.h 2001/01/18 18:49:49 1.3 --- pgtable.h 2001/01/24 00:07:42 1.4 *************** *** 5,9 **** #include <linux/config.h> #include <linux/types.h> - #endif /* !__ASSEMBLY__ */ #include <asm/mtpr.h> --- 5,8 ---- *************** *** 11,14 **** --- 10,14 ---- #include <asm/mm/virt_trans.h> + #endif /* !__ASSEMBLY__ */ /* *************** *** 30,37 **** --- 30,39 ---- #define flush_cache_page(vma, vmaddr) do { } while (0) #define flush_page_to_ram(page) do { } while (0) + #define flush_dcache_page(page) do { } while (0) /* Flushing the instruction cache is all-or-nothing on VAX. */ #define flush_icache_range(start, end) flush_icache() + #define flush_icache_page(vma, pg) flush_icache() static inline void flush_icache(void) *************** *** 57,66 **** /* PMD_SHIFT determines the size of the area a second-level page table can map */ /* 128 * 512. 128 ptes/page */ ! #define PMD_SHIFT 16 #define PMD_SIZE (1UL << PMD_SHIFT) #define PMD_MASK (~(PMD_SIZE-1)) /* PGDIR_SHIFT determines what a third-level page table entry can map */ ! #define PGDIR_SHIFT 16 #define PGDIR_SIZE (1UL << PGDIR_SHIFT) #define PGDIR_MASK (~(PGDIR_SIZE-1)) --- 59,68 ---- /* PMD_SHIFT determines the size of the area a second-level page table can map */ /* 128 * 512. 128 ptes/page */ ! #define PMD_SHIFT 30 #define PMD_SIZE (1UL << PMD_SHIFT) #define PMD_MASK (~(PMD_SIZE-1)) /* PGDIR_SHIFT determines what a third-level page table entry can map */ ! #define PGDIR_SHIFT 30 #define PGDIR_SIZE (1UL << PGDIR_SHIFT) #define PGDIR_MASK (~(PGDIR_SIZE-1)) *************** *** 73,83 **** #define PTRS_PER_PTE 128 #define PTRS_PER_PMD 1 ! #define PTRS_PER_PGD 128 ! /* fix this FIXME: */ ! #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) /* * pgd entries used up by user/kernel: */ - #define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT) #define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) --- 75,88 ---- #define PTRS_PER_PTE 128 #define PTRS_PER_PMD 1 ! #define PTRS_PER_PGD 6 /* not actually real pointers. We store ! P0BR, P0LR, P1BR, P1LR, SBR and SLR ! in the PGD. SBR is stored here as a ! _virtual_ address, while the SBR ! processor hold a physical address */ ! #define USER_PTRS_PER_PGD 4 ! /* * pgd entries used up by user/kernel: */ #define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT) #define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) *************** *** 86,90 **** #define FIRST_USER_PGD_NR 0 - #define pte_ERROR(e) \ printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e)) --- 91,94 ---- *************** *** 122,126 **** /* nb, this block assumes page_size 512 bytes. FIXME: */ ! #define SPT_MAX_IOMAP 128 #define SPT_MAX_VMALLOC 4096 #define SPT_ENTRIES_IOMAP (SPT_MAX_IOMAP * 2) --- 126,130 ---- /* nb, this block assumes page_size 512 bytes. FIXME: */ ! #define SPT_MAX_IOMAP 1024 #define SPT_MAX_VMALLOC 4096 #define SPT_ENTRIES_IOMAP (SPT_MAX_IOMAP * 2) *************** *** 204,219 **** #ifndef __ASSEMBLY__ - /* page table for 0-4MB for everybody */ - /* This is a c reference to the start of the system page table - * (see arch/vax/boot/head.S). The spt is initialised to cover physical - * memory by early boot code, based on VMB supplied information. Further - * expansion happens later in the boot sequence */ - extern pte_t *pg0; - - /* Number of SPTEs in system page table */ - extern unsigned int spt_size; - - /* zero page used for uninitialized stuff */ - /* extern unsigned long empty_zero_page[1024]; */ /* --- 208,211 ---- *************** *** 229,233 **** #define BAD_PAGETABLE __bad_pagetable() #define BAD_PAGE __bad_page() ! #define ZERO_PAGE(vaddr) ((unsigned long) (PAGE_OFFSET+0x10800)) /* number of bits that fit into a memory pointer */ #define BITS_PER_PTR (8*sizeof(unsigned long)) --- 221,228 ---- #define BAD_PAGETABLE __bad_pagetable() #define BAD_PAGE __bad_page() ! ! extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)]; ! #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page)) ! /* number of bits that fit into a memory pointer */ #define BITS_PER_PTR (8*sizeof(unsigned long)) *************** *** 346,356 **** ! extern pgd_t swapper_pg_dir[1024]; /* copy_segments and friends now in system.h */ - #endif /* !__ASSEMBLY__ */ - /* Needs to be defined here and not in linux/mm.h, as it is arch dependent * This is used on sparc processors to implement memory holes */ --- 341,349 ---- ! extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* copy_segments and friends now in system.h */ /* Needs to be defined here and not in linux/mm.h, as it is arch dependent * This is used on sparc processors to implement memory holes */ *************** *** 385,390 **** --- 378,388 ---- #define swp_entry_to_pte(x) ((pte_t) { (x).val }) + /* Memory sizing. You'll need to #include <asm/rpb.h> to get + the declaration of boot_rpb. */ + #define max_pfn (boot_rpb.l_max_pfn) + #include <asm-generic/pgtable.h> + #endif /* !__ASSEMBLY__ */ |