[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGsJ_4wWK6B8GSc=cxPGnPU0Jt_o0YB55yk4+VNOm_hY_iditA@mail.gmail.com>
Date: Sun, 27 Apr 2025 16:22:27 +0800
From: Barry Song <21cnbao@...il.com>
To: Feng Lee <379943137@...com>
Cc: akpm@...ux-foundation.org, david@...hat.com, ryan.roberts@....com,
libang.li@...group.com, peterx@...hat.com, maobibo@...ngson.cn,
lance.yang@...ux.dev, anshuman.khandual@....com, trivial@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: remove useless code
On Sun, Apr 27, 2025 at 2:16 PM Feng Lee <379943137@...com> wrote:
>
> Remove unused conditional macros.
>
> Signed-off-by: Feng Lee <379943137@...com>
> ---
> include/linux/pgtable.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
> index b50447ef1c92..47c5a54b7551 100644
> --- a/include/linux/pgtable.h
> +++ b/include/linux/pgtable.h
> @@ -1164,9 +1164,7 @@ static inline void arch_swap_restore(swp_entry_t entry, struct folio *folio)
> }
> #endif
>
> -#ifndef __HAVE_ARCH_PGD_OFFSET_GATE
> #define pgd_offset_gate(mm, addr) pgd_offset(mm, addr)
> -#endif
Do you know who else had pgd_offset_gate() before except ia64?
/* Look up a pgd entry in the gate area. On IA-64, the gate-area
resides in the kernel-mapped segment, hence we use pgd_offset_k()
here. */
#define pgd_offset_gate(mm, addr) pgd_offset_k(addr)
btw, do we still
need pgd_offset_gate() given that nobody needs it now?
1 1168 include/linux/pgtable.h <<GLOBAL>>
#define pgd_offset_gate(mm, addr) pgd_offset(mm, addr)
2 1112 mm/gup.c <<get_gate_page>>
pgd = pgd_offset_gate(mm, address);
>
> #ifndef __HAVE_ARCH_MOVE_PTE
> #define move_pte(pte, old_addr, new_addr) (pte)
> --
> 2.49.0
Thanks
Barry
Powered by blists - more mailing lists