aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/mm/init.c')
-rw-r--r--arch/parisc/mm/init.c72
1 files changed, 0 insertions, 72 deletions
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 0bef864264c0..15dbe81cf5f3 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -750,78 +750,6 @@ static void __init gateway_init(void)
750 PAGE_SIZE, PAGE_GATEWAY, 1); 750 PAGE_SIZE, PAGE_GATEWAY, 1);
751} 751}
752 752
753#ifdef CONFIG_HPUX
754void
755map_hpux_gateway_page(struct task_struct *tsk, struct mm_struct *mm)
756{
757 pgd_t *pg_dir;
758 pmd_t *pmd;
759 pte_t *pg_table;
760 unsigned long start_pmd;
761 unsigned long start_pte;
762 unsigned long address;
763 unsigned long hpux_gw_page_addr;
764 /* FIXME: This is 'const' in order to trick the compiler
765 into not treating it as DP-relative data. */
766 extern void * const hpux_gateway_page;
767
768 hpux_gw_page_addr = HPUX_GATEWAY_ADDR & PAGE_MASK;
769
770 /*
771 * Setup HP-UX Gateway page.
772 *
773 * The HP-UX gateway page resides in the user address space,
774 * so it needs to be aliased into each process.
775 */
776
777 pg_dir = pgd_offset(mm,hpux_gw_page_addr);
778
779#if PTRS_PER_PMD == 1
780 start_pmd = 0;
781#else
782 start_pmd = ((hpux_gw_page_addr >> PMD_SHIFT) & (PTRS_PER_PMD - 1));
783#endif
784 start_pte = ((hpux_gw_page_addr >> PAGE_SHIFT) & (PTRS_PER_PTE - 1));
785
786 address = __pa(&hpux_gateway_page);
787#if PTRS_PER_PMD == 1
788 pmd = (pmd_t *)__pa(pg_dir);
789#else
790 pmd = (pmd_t *) pgd_address(*pg_dir);
791
792 /*
793 * pmd is physical at this point
794 */
795
796 if (!pmd) {
797 pmd = (pmd_t *) get_zeroed_page(GFP_KERNEL);
798 pmd = (pmd_t *) __pa(pmd);
799 }
800
801 __pgd_val_set(*pg_dir, PxD_FLAG_PRESENT | PxD_FLAG_VALID | (unsigned long) pmd);
802#endif
803 /* now change pmd to kernel virtual addresses */
804
805 pmd = (pmd_t *)__va(pmd) + start_pmd;
806
807 /*
808 * pg_table is physical at this point
809 */
810
811 pg_table = (pte_t *) pmd_address(*pmd);
812 if (!pg_table)
813 pg_table = (pte_t *) __pa(get_zeroed_page(GFP_KERNEL));
814
815 __pmd_val_set(*pmd, PxD_FLAG_PRESENT | PxD_FLAG_VALID | (unsigned long) pg_table);
816
817 /* now change pg_table to kernel virtual addresses */
818
819 pg_table = (pte_t *) __va(pg_table) + start_pte;
820 set_pte(pg_table, __mk_pte(address, PAGE_GATEWAY));
821}
822EXPORT_SYMBOL(map_hpux_gateway_page);
823#endif
824
825void __init paging_init(void) 753void __init paging_init(void)
826{ 754{
827 int i; 755 int i;