All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yanteng Si <si.yanteng@linux.dev>
To: george <dongtai.guo@linux.dev>, chenhuacai@kernel.org, kernel@xen0n.name
Cc: rppt@kernel.org, akpm@linux-foundation.org,
	dave.hansen@linux.intel.com, geert@linux-m68k.org,
	ptesarik@suse.com, guoweikang.kernel@gmail.com,
	maobibo@loongson.cn, loongarch@lists.linux.dev,
	George Guo <guodongtai@kylinos.cn>
Subject: Re: [PATCH 1/1] LoongArch: mm: remove redundant pte occupancy check in __set_fixmap()
Date: Thu, 8 May 2025 13:23:38 +0800	[thread overview]
Message-ID: <ca0a9d8d-9a89-4727-9b4d-732f716b80fc@linux.dev> (raw)
In-Reply-To: <20250508030506.7076-1-dongtai.guo@linux.dev>

在 5/8/25 11:05 AM, george 写道:
> From: George Guo <guodongtai@kylinos.cn>
This is unnecessary. Please remove it.

Thanks,
Yanteng
> 
> This check could falsely report errors when PTEs are remapped:
> arch/loongarch/mm/init.c:204: bad pte 0000000107b601c3.
> 
> The check was unnecessary because:
> - Fixmap slots are designed to be reusable
> - Other architectures (x86/arm64) allow PTE overwrites
> - Callers are responsible for proper mapping management
> 
> Signed-off-by: George Guo <guodongtai@kylinos.cn>
> ---
>   arch/loongarch/mm/init.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c
> index 06f11d9e4ec1..7b7e3b1aa00d 100644
> --- a/arch/loongarch/mm/init.c
> +++ b/arch/loongarch/mm/init.c
> @@ -200,10 +200,6 @@ void __init __set_fixmap(enum fixed_addresses idx,
>   	BUG_ON(idx <= FIX_HOLE || idx >= __end_of_fixed_addresses);
>   
>   	ptep = populate_kernel_pte(addr);
> -	if (!pte_none(ptep_get(ptep))) {
> -		pte_ERROR(*ptep);
> -		return;
> -	}
>   
>   	if (pgprot_val(flags))
>   		set_pte(ptep, pfn_pte(phys >> PAGE_SHIFT, flags));


  reply	other threads:[~2025-05-08  5:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08  3:05 [PATCH 1/1] LoongArch: mm: remove redundant pte occupancy check in __set_fixmap() george
2025-05-08  5:23 ` Yanteng Si [this message]
2025-05-08  5:42   ` Andrew Morton
2025-05-08  5:56     ` Yanteng Si
2025-05-10  7:34 ` Huacai Chen
2025-05-13  2:19   ` George Guo
2025-08-21  3:05     ` [PATCH v2] " george
2025-08-28  6:34       ` Huacai Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca0a9d8d-9a89-4727-9b4d-732f716b80fc@linux.dev \
    --to=si.yanteng@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=chenhuacai@kernel.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=dongtai.guo@linux.dev \
    --cc=geert@linux-m68k.org \
    --cc=guodongtai@kylinos.cn \
    --cc=guoweikang.kernel@gmail.com \
    --cc=kernel@xen0n.name \
    --cc=loongarch@lists.linux.dev \
    --cc=maobibo@loongson.cn \
    --cc=ptesarik@suse.com \
    --cc=rppt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.