diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 22:17:26 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 22:17:26 +0000 |
commit | 984760dbf5e48f6224dfe9e26e03536b3d38b6cd (patch) | |
tree | a99674322e524c4c90009b3bdae5fab0eebf2094 /arch/sparc | |
parent | a7ce7d5e94c98ef5b867f61b2ebecd563f4b6ec9 (diff) |
Merge with Linux 2.4.0-test6-pre8.
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/sun4d_smp.c | 12 | ||||
-rw-r--r-- | arch/sparc/kernel/sun4m_smp.c | 12 | ||||
-rw-r--r-- | arch/sparc/mm/generic.c | 6 | ||||
-rw-r--r-- | arch/sparc/mm/init.c | 8 | ||||
-rw-r--r-- | arch/sparc/mm/io-unit.c | 2 | ||||
-rw-r--r-- | arch/sparc/mm/iommu.c | 2 | ||||
-rw-r--r-- | arch/sparc/mm/srmmu.c | 4 | ||||
-rw-r--r-- | arch/sparc/mm/sun4c.c | 6 |
8 files changed, 26 insertions, 26 deletions
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c index 1294ad31a..280392629 100644 --- a/arch/sparc/kernel/sun4d_smp.c +++ b/arch/sparc/kernel/sun4d_smp.c @@ -298,20 +298,20 @@ void __init smp4d_boot_cpus(void) } /* Free unneeded trap tables */ - ClearPageReserved(mem_map + MAP_NR(trapbase_cpu1)); - set_page_count(mem_map + MAP_NR(trapbase_cpu1), 1); + ClearPageReserved(virt_to_page(trapbase_cpu1)); + set_page_count(virt_to_page(trapbase_cpu1), 1); free_page((unsigned long)trapbase_cpu1); totalram_pages++; num_physpages++; - ClearPageReserved(mem_map + MAP_NR(trapbase_cpu2)); - set_page_count(mem_map + MAP_NR(trapbase_cpu2), 1); + ClearPageReserved(virt_to_page(trapbase_cpu2)); + set_page_count(virt_to_page(trapbase_cpu2), 1); free_page((unsigned long)trapbase_cpu2); totalram_pages++; num_physpages++; - ClearPageReserved(mem_map + MAP_NR(trapbase_cpu3)); - set_page_count(mem_map + MAP_NR(trapbase_cpu3), 1); + ClearPageReserved(virt_to_page(trapbase_cpu3)); + set_page_count(virt_to_page(trapbase_cpu3), 1); free_page((unsigned long)trapbase_cpu3); totalram_pages++; num_physpages++; diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 60c37373e..d6c126d00 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c @@ -279,22 +279,22 @@ void __init smp4m_boot_cpus(void) /* Free unneeded trap tables */ if (!(cpu_present_map & (1 << 1))) { - ClearPageReserved(mem_map + MAP_NR(trapbase_cpu1)); - set_page_count(mem_map + MAP_NR(trapbase_cpu1), 1); + ClearPageReserved(virt_to_page(trapbase_cpu1)); + set_page_count(virt_to_page(trapbase_cpu1), 1); free_page((unsigned long)trapbase_cpu1); totalram_pages++; num_physpages++; } if (!(cpu_present_map & (1 << 2))) { - ClearPageReserved(mem_map + MAP_NR(trapbase_cpu2)); - set_page_count(mem_map + MAP_NR(trapbase_cpu2), 1); + ClearPageReserved(virt_to_page(trapbase_cpu2)); + set_page_count(virt_to_page(trapbase_cpu2), 1); free_page((unsigned long)trapbase_cpu2); totalram_pages++; num_physpages++; } if (!(cpu_present_map & (1 << 3))) { - ClearPageReserved(mem_map + MAP_NR(trapbase_cpu3)); - set_page_count(mem_map + MAP_NR(trapbase_cpu3), 1); + ClearPageReserved(virt_to_page(trapbase_cpu3)); + set_page_count(virt_to_page(trapbase_cpu3), 1); free_page((unsigned long)trapbase_cpu3); totalram_pages++; num_physpages++; diff --git a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c index 9e599fd9d..ad74d0ed2 100644 --- a/arch/sparc/mm/generic.c +++ b/arch/sparc/mm/generic.c @@ -18,14 +18,14 @@ static inline void forget_pte(pte_t page) if (pte_none(page)) return; if (pte_present(page)) { - unsigned long nr = pte_pagenr(page); - if (nr >= max_mapnr || PageReserved(mem_map+nr)) + struct page *ptpage = pte_page(page); + if ((!VALID_PAGE(ptpage)) || PageReserved(ptpage)) return; /* * free_page() used to be able to clear swap cache * entries. We may now have to do it manually. */ - free_page_and_swap_cache(mem_map+nr); + free_page_and_swap_cache(ptpage); return; } swap_free(pte_to_swp_entry(page)); diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c index ced31b91f..3d42e0c63 100644 --- a/arch/sparc/mm/init.c +++ b/arch/sparc/mm/init.c @@ -369,8 +369,8 @@ void __init free_mem_map_range(struct page *first, struct page *last) prom_printf("[%p,%p] ", first, last); #endif while (first < last) { - ClearPageReserved(mem_map + MAP_NR(first)); - set_page_count(mem_map + MAP_NR(first), 1); + ClearPageReserved(virt_to_page(first)); + set_page_count(virt_to_page(first), 1); free_page((unsigned long)first); totalram_pages++; num_physpages++; @@ -542,7 +542,7 @@ void free_initmem (void) struct page *p; page = addr + phys_base; - p = mem_map + MAP_NR(page); + p = virt_to_page(page); ClearPageReserved(p); set_page_count(p, 1); @@ -559,7 +559,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) if (start < end) printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); for (; start < end; start += PAGE_SIZE) { - struct page *p = mem_map + MAP_NR(start); + struct page *p = virt_to_page(start); ClearPageReserved(p); set_page_count(p, 1); diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c index a370ea2d4..f395f06f5 100644 --- a/arch/sparc/mm/io-unit.c +++ b/arch/sparc/mm/io-unit.c @@ -190,7 +190,7 @@ static void iounit_map_dma_area(unsigned long va, __u32 addr, int len) pmdp = pmd_offset(pgdp, addr); ptep = pte_offset(pmdp, addr); - set_pte(ptep, pte_val(mk_pte(mem_map + MAP_NR(page), dvma_prot))); + set_pte(ptep, pte_val(mk_pte(virt_to_page(page), dvma_prot))); i = ((addr - IOUNIT_DMA_BASE) >> PAGE_SHIFT); diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index 5fde9a52a..e48128479 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c @@ -247,7 +247,7 @@ static void iommu_map_dma_area(unsigned long va, __u32 addr, int len) pmdp = pmd_offset(pgdp, addr); ptep = pte_offset(pmdp, addr); - set_pte(ptep, mk_pte(mem_map + MAP_NR(page), dvma_prot)); + set_pte(ptep, mk_pte(virt_to_page(page), dvma_prot)); if (ipte_cache != 0) { iopte_val(*iopte++) = MKIOPTE(__pa(page)); } else { diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index c7f839f28..7e76841de 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -612,7 +612,7 @@ static void srmmu_free_task_struct(struct task_struct *tsk) static void srmmu_get_task_struct(struct task_struct *tsk) { - atomic_inc(&mem_map[MAP_NR(tsk)].count); + atomic_inc(&virt_to_page(tsk)->count); } /* tsunami.S */ @@ -2153,7 +2153,7 @@ void __init ld_mmu_srmmu(void) BTFIXUPSET_CALL(set_pte, srmmu_set_pte, BTFIXUPCALL_SWAPO0O1); BTFIXUPSET_CALL(switch_mm, srmmu_switch_mm, BTFIXUPCALL_NORM); - BTFIXUPSET_CALL(pte_pagenr, srmmu_pte_pagenr, BTFIXUPCALL_NORM); + BTFIXUPSET_CALL(sparc_pte_pagenr, srmmu_pte_pagenr, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(pmd_page, srmmu_pmd_page, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(pgd_page, srmmu_pgd_page, BTFIXUPCALL_NORM); diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index 55551c561..717269b68 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c @@ -1320,7 +1320,7 @@ static __u32 sun4c_get_scsi_one(char *bufptr, unsigned long len, struct sbus_bus unsigned long page; page = ((unsigned long)bufptr) & PAGE_MASK; - if (MAP_NR(page) > max_mapnr) { + if (!VALID_PAGE(virt_to_page(page))) { sun4c_flush_page(page); return (__u32)bufptr; /* already locked */ } @@ -2095,7 +2095,7 @@ static int sun4c_pmd_none(pmd_t pmd) { return !pmd_val(pmd); } static int sun4c_pmd_bad(pmd_t pmd) { return (((pmd_val(pmd) & ~PAGE_MASK) != PGD_TABLE) || - (MAP_NR(pmd_val(pmd)) > max_mapnr)); + (!VALID_PAGE(virt_to_page(pmd_val(pmd))))); } static int sun4c_pmd_present(pmd_t pmd) @@ -2650,7 +2650,7 @@ void __init ld_mmu_sun4c(void) BTFIXUPSET_CALL(set_pte, sun4c_set_pte, BTFIXUPCALL_STO1O0); - BTFIXUPSET_CALL(pte_pagenr, sun4c_pte_pagenr, BTFIXUPCALL_NORM); + BTFIXUPSET_CALL(sparc_pte_pagenr, sun4c_pte_pagenr, BTFIXUPCALL_NORM); #if PAGE_SHIFT <= 12 BTFIXUPSET_CALL(pmd_page, sun4c_pmd_page, BTFIXUPCALL_ANDNINT(PAGE_SIZE - 1)); #else |