Re: [PATCH] microblaze: restore the page alignment of swapper_pg_dir

From: Andrew Morton

Date: Mon Jul 27 2026 - 21:07:41 EST


On Mon, 27 Jul 2026 23:58:23 +0200 Ramin Moussavi <ramin.moussavi@xxxxxxxxx> wrote:

> microblaze handles TLB misses in software, and the handler builds the
> address of the L1 entry by ORing the index into the page directory base
> instead of adding it (hw_exception_handler.S):
>

Well that was a convincing changelog.

>
> Fixes: 6215d9f4470f ("arch, mm: consolidate empty_zero_page")

I'll queue for 7.2-rcX.

> Cc: stable@xxxxxxxxxxxxxxx

With this.

> --- a/arch/microblaze/kernel/head.S
> +++ b/arch/microblaze/kernel/head.S
> @@ -39,6 +39,8 @@
> #include <asm/processor.h>
>
> .section .data
> +/* The MMU requires a page aligned page directory. */
> +.align 12
> .global swapper_pg_dir
> swapper_pg_dir:
> .space PAGE_SIZE

Thanks.

Hard-coding "12" is a bit sad. Can we do ".align PAGE_SHIFT" or
similar?