[PATCH 0/4] x86/mm: some cleanups for pagetable setup code

Brendan Jackman posted 4 patches 2 months, 2 weeks ago
arch/x86/include/asm/pgtable.h |  3 +-
arch/x86/mm/init.c             | 19 ++++----
arch/x86/mm/init_32.c          |  5 +--
arch/x86/mm/init_64.c          | 99 ++++++++++++++----------------------------
arch/x86/mm/mm_internal.h      | 11 ++---
5 files changed, 48 insertions(+), 89 deletions(-)
[PATCH 0/4] x86/mm: some cleanups for pagetable setup code
Posted by Brendan Jackman 2 months, 2 weeks ago
Per discussion in [0] I'm looking for ways to refactor this code to make
ASI easier to deal with. But, while looking, I found some little things
that seem like just straightforward cleanups without any real
refactoring needed. So let's start there.

The last two patches are closely related and could potentially be
squashed, but I've split it in two because the first half is trivial,
the second is more tricky and likely to be wrong.

This applies to tip/master.

[0] https://lore.kernel.org/all/20250924-b4-asi-page-alloc-v1-0-2d861768041f@google.com/T/#t

Signed-off-by: Brendan Jackman <jackmanb@google.com>
---
Brendan Jackman (4):
      x86/mm: delete disabled debug code
      x86/mm: harmonize return value of phys_pte_init()
      x86/mm: drop unused return from pgtable setup functions
      x86/mm: simplify calculation of max_pfn_mapped

 arch/x86/include/asm/pgtable.h |  3 +-
 arch/x86/mm/init.c             | 19 ++++----
 arch/x86/mm/init_32.c          |  5 +--
 arch/x86/mm/init_64.c          | 99 ++++++++++++++----------------------------
 arch/x86/mm/mm_internal.h      | 11 ++---
 5 files changed, 48 insertions(+), 89 deletions(-)
---
base-commit: 47870f1fa057a411519108f0833dd2603179234f
change-id: 20251003-x86-init-cleanup-0ad754910bac

Best regards,
-- 
Brendan Jackman <jackmanb@google.com>
Re: [PATCH 0/4] x86/mm: some cleanups for pagetable setup code
Posted by Brendan Jackman 1 month, 3 weeks ago
On Fri Oct 3, 2025 at 4:56 PM UTC, Brendan Jackman wrote:
> Per discussion in [0] I'm looking for ways to refactor this code to make
> ASI easier to deal with. But, while looking, I found some little things
> that seem like just straightforward cleanups without any real
> refactoring needed. So let's start there.
>
> The last two patches are closely related and could potentially be
> squashed, but I've split it in two because the first half is trivial,
> the second is more tricky and likely to be wrong.
>
> This applies to tip/master.
>
> [0] https://lore.kernel.org/all/20250924-b4-asi-page-alloc-v1-0-2d861768041f@google.com/T/#t
>
> Signed-off-by: Brendan Jackman <jackmanb@google.com>
> ---
> Brendan Jackman (4):
>       x86/mm: delete disabled debug code
>       x86/mm: harmonize return value of phys_pte_init()
>       x86/mm: drop unused return from pgtable setup functions
>       x86/mm: simplify calculation of max_pfn_mapped
>
>  arch/x86/include/asm/pgtable.h |  3 +-
>  arch/x86/mm/init.c             | 19 ++++----
>  arch/x86/mm/init_32.c          |  5 +--
>  arch/x86/mm/init_64.c          | 99 ++++++++++++++----------------------------
>  arch/x86/mm/mm_internal.h      | 11 ++---
>  5 files changed, 48 insertions(+), 89 deletions(-)
> ---
> base-commit: 47870f1fa057a411519108f0833dd2603179234f
> change-id: 20251003-x86-init-cleanup-0ad754910bac
>
> Best regards,

Hey, is anyone able to take a look at this?