@@ -93,7 +93,7 @@ struct sme_populate_pgd_data {
9393 * section is 2MB aligned to allow for simple pagetable setup using only
9494 * PMD entries (see vmlinux.lds.S).
9595 */
96- static char sme_workarea [2 * PMD_PAGE_SIZE ] __section (".init.scratch" );
96+ static char sme_workarea [2 * PMD_SIZE ] __section (".init.scratch" );
9797
9898static char sme_cmdline_arg [] __initdata = "mem_encrypt" ;
9999static char sme_cmdline_on [] __initdata = "on" ;
@@ -198,8 +198,8 @@ static void __init __sme_map_range_pmd(struct sme_populate_pgd_data *ppd)
198198 while (ppd -> vaddr < ppd -> vaddr_end ) {
199199 sme_populate_pgd_large (ppd );
200200
201- ppd -> vaddr += PMD_PAGE_SIZE ;
202- ppd -> paddr += PMD_PAGE_SIZE ;
201+ ppd -> vaddr += PMD_SIZE ;
202+ ppd -> paddr += PMD_SIZE ;
203203 }
204204}
205205
@@ -225,11 +225,11 @@ static void __init __sme_map_range(struct sme_populate_pgd_data *ppd,
225225 vaddr_end = ppd -> vaddr_end ;
226226
227227 /* If start is not 2MB aligned, create PTE entries */
228- ppd -> vaddr_end = ALIGN (ppd -> vaddr , PMD_PAGE_SIZE );
228+ ppd -> vaddr_end = ALIGN (ppd -> vaddr , PMD_SIZE );
229229 __sme_map_range_pte (ppd );
230230
231231 /* Create PMD entries */
232- ppd -> vaddr_end = vaddr_end & PMD_PAGE_MASK ;
232+ ppd -> vaddr_end = vaddr_end & PMD_MASK ;
233233 __sme_map_range_pmd (ppd );
234234
235235 /* If end is not 2MB aligned, create PTE entries */
@@ -325,7 +325,7 @@ void __init sme_encrypt_kernel(struct boot_params *bp)
325325
326326 /* Physical addresses gives us the identity mapped virtual addresses */
327327 kernel_start = __pa_symbol (_text );
328- kernel_end = ALIGN (__pa_symbol (_end ), PMD_PAGE_SIZE );
328+ kernel_end = ALIGN (__pa_symbol (_end ), PMD_SIZE );
329329 kernel_len = kernel_end - kernel_start ;
330330
331331 initrd_start = 0 ;
@@ -355,12 +355,12 @@ void __init sme_encrypt_kernel(struct boot_params *bp)
355355 * executable encryption area size:
356356 * stack page (PAGE_SIZE)
357357 * encryption routine page (PAGE_SIZE)
358- * intermediate copy buffer (PMD_PAGE_SIZE )
358+ * intermediate copy buffer (PMD_SIZE )
359359 * pagetable structures for the encryption of the kernel
360360 * pagetable structures for workarea (in case not currently mapped)
361361 */
362362 execute_start = workarea_start ;
363- execute_end = execute_start + (PAGE_SIZE * 2 ) + PMD_PAGE_SIZE ;
363+ execute_end = execute_start + (PAGE_SIZE * 2 ) + PMD_SIZE ;
364364 execute_len = execute_end - execute_start ;
365365
366366 /*
@@ -383,7 +383,7 @@ void __init sme_encrypt_kernel(struct boot_params *bp)
383383 * before it is mapped.
384384 */
385385 workarea_len = execute_len + pgtable_area_len ;
386- workarea_end = ALIGN (workarea_start + workarea_len , PMD_PAGE_SIZE );
386+ workarea_end = ALIGN (workarea_start + workarea_len , PMD_SIZE );
387387
388388 /*
389389 * Set the address to the start of where newly created pagetable
0 commit comments