@@ -69,55 +69,6 @@ void __init smp_setup_processor_id(void)
69
69
cpuid_to_hartid_map (0 ) = boot_cpu_hartid ;
70
70
}
71
71
72
- pgd_t swapper_pg_dir [PTRS_PER_PGD ] __page_aligned_bss ;
73
- pgd_t trampoline_pg_dir [PTRS_PER_PGD ] __initdata __aligned (PAGE_SIZE );
74
-
75
- #ifndef __PAGETABLE_PMD_FOLDED
76
- #define NUM_SWAPPER_PMDS ((uintptr_t)-PAGE_OFFSET >> PGDIR_SHIFT)
77
- pmd_t swapper_pmd [PTRS_PER_PMD * ((- PAGE_OFFSET )/PGDIR_SIZE )] __page_aligned_bss ;
78
- pmd_t trampoline_pmd [PTRS_PER_PGD ] __initdata __aligned (PAGE_SIZE );
79
- #endif
80
-
81
- asmlinkage void __init setup_vm (void )
82
- {
83
- extern char _start ;
84
- uintptr_t i ;
85
- uintptr_t pa = (uintptr_t ) & _start ;
86
- pgprot_t prot = __pgprot (pgprot_val (PAGE_KERNEL ) | _PAGE_EXEC );
87
-
88
- va_pa_offset = PAGE_OFFSET - pa ;
89
- pfn_base = PFN_DOWN (pa );
90
-
91
- /* Sanity check alignment and size */
92
- BUG_ON ((PAGE_OFFSET % PGDIR_SIZE ) != 0 );
93
- BUG_ON ((pa % (PAGE_SIZE * PTRS_PER_PTE )) != 0 );
94
-
95
- #ifndef __PAGETABLE_PMD_FOLDED
96
- trampoline_pg_dir [(PAGE_OFFSET >> PGDIR_SHIFT ) % PTRS_PER_PGD ] =
97
- pfn_pgd (PFN_DOWN ((uintptr_t )trampoline_pmd ),
98
- __pgprot (_PAGE_TABLE ));
99
- trampoline_pmd [0 ] = pfn_pmd (PFN_DOWN (pa ), prot );
100
-
101
- for (i = 0 ; i < (- PAGE_OFFSET )/PGDIR_SIZE ; ++ i ) {
102
- size_t o = (PAGE_OFFSET >> PGDIR_SHIFT ) % PTRS_PER_PGD + i ;
103
- swapper_pg_dir [o ] =
104
- pfn_pgd (PFN_DOWN ((uintptr_t )swapper_pmd ) + i ,
105
- __pgprot (_PAGE_TABLE ));
106
- }
107
- for (i = 0 ; i < ARRAY_SIZE (swapper_pmd ); i ++ )
108
- swapper_pmd [i ] = pfn_pmd (PFN_DOWN (pa + i * PMD_SIZE ), prot );
109
- #else
110
- trampoline_pg_dir [(PAGE_OFFSET >> PGDIR_SHIFT ) % PTRS_PER_PGD ] =
111
- pfn_pgd (PFN_DOWN (pa ), prot );
112
-
113
- for (i = 0 ; i < (- PAGE_OFFSET )/PGDIR_SIZE ; ++ i ) {
114
- size_t o = (PAGE_OFFSET >> PGDIR_SHIFT ) % PTRS_PER_PGD + i ;
115
- swapper_pg_dir [o ] =
116
- pfn_pgd (PFN_DOWN (pa + i * PGDIR_SIZE ), prot );
117
- }
118
- #endif
119
- }
120
-
121
72
void __init parse_dtb (unsigned int hartid , void * dtb )
122
73
{
123
74
if (!early_init_dt_scan (__va (dtb )))
0 commit comments