From: Nikolay Borisov <nik.borisov@suse.com>
To: Youling Tang <youling.tang@linux.dev>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
Mateusz Guzik <mjguzik@gmail.com>,
Youling Tang <tangyouling@kylinos.cn>
Subject: Re: [PATCH 2/2] prefetch: Add ARCH_HAS_PREFETCH definition when the architecture is not defined
Date: Thu, 30 May 2024 18:30:15 +0300 [thread overview]
Message-ID: <186d2d79-b7c2-4fab-8243-4c7080412074@suse.com> (raw)
In-Reply-To: <20240529032059.899347-2-youling.tang@linux.dev>
On 29.05.24 г. 6:20 ч., Youling Tang wrote:
> From: Youling Tang <tangyouling@kylinos.cn>
>
> After commit ab483570a13b ("x86 & generic: change to __builtin_prefetch()"), the
> __builtin_prefetch implementation will be used by default, so add its definition
> to return to a state similar to before commit[1].
I find those references to the past state somewhat confusing and not
really adding sustenance to the explanation.
>
> Currently prefetch_range() will be empty implemented under the x86_64 architecture,
> there was a concrete implementation before "x86 & generic: change to
> __builtin_prefetch()", so fix it.
Actually prefetch_range will be empty for every architecture which
doesn't defined ARCH_HAS_PREFETCH and since we have a working generic
fallback this indeed seems backwards. So defining ARCH_HAS_PREFETCH
makes sense.
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
>
> No similar changes have been made to ARCH_HAS_PREFETCHW at this time.
>
> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/include/linux/prefetch.h?id=8e4f2fd31bf737abb392e694898a1496157623b5
>
> Fixes: ab483570a13b ("x86 & generic: change to __builtin_prefetch()")
> Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
> ---
> include/linux/prefetch.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/prefetch.h b/include/linux/prefetch.h
> index b068e2e60939..162b7105e37c 100644
> --- a/include/linux/prefetch.h
> +++ b/include/linux/prefetch.h
> @@ -36,6 +36,7 @@ struct page;
> */
>
> #ifndef ARCH_HAS_PREFETCH
> +#define ARCH_HAS_PREFETCH
> #define prefetch(x) __builtin_prefetch(x)
> #endif
>
next prev parent reply other threads:[~2024-05-30 15:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 3:20 [PATCH 1/2] x86: Remove the prefetch() specific implementation on x86_64 Youling Tang
2024-05-29 3:20 ` [PATCH 2/2] prefetch: Add ARCH_HAS_PREFETCH definition when the architecture is not defined Youling Tang
2024-05-30 15:30 ` Nikolay Borisov [this message]
2024-05-29 20:03 ` [PATCH 1/2] x86: Remove the prefetch() specific implementation on x86_64 kernel test robot
2024-05-30 1:51 ` Youling Tang
2024-05-30 15:26 ` Nikolay Borisov
2024-05-31 1:17 ` Youling Tang
2024-07-24 7:45 ` Youling Tang
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=186d2d79-b7c2-4fab-8243-4c7080412074@suse.com \
--to=nik.borisov@suse.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mjguzik@gmail.com \
--cc=tangyouling@kylinos.cn \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=youling.tang@linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®