From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 1/2] osdep: Un-inline qemu_real_host_page_size()
Date: Mon, 3 Nov 2025 11:51:09 +0100 [thread overview]
Message-ID: <20251103105111.68294-2-philmd@linaro.org> (raw)
In-Reply-To: <20251103105111.68294-1-philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/qemu/osdep.h | 6 +-----
util/osdep.c | 5 +++++
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index cf8d7cf7e61..fd714014eaf 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -763,14 +763,10 @@ bool qemu_finish_async_prealloc_mem(Error **errp);
*/
char *qemu_get_pid_name(pid_t pid);
+uintptr_t qemu_real_host_page_size(void);
/* Using intptr_t ensures that qemu_*_page_mask is sign-extended even
* when intptr_t is 32-bit and we are aligning a long long.
*/
-static inline uintptr_t qemu_real_host_page_size(void)
-{
- return getpagesize();
-}
-
static inline intptr_t qemu_real_host_page_mask(void)
{
return -(intptr_t)qemu_real_host_page_size();
diff --git a/util/osdep.c b/util/osdep.c
index 770369831bc..44fad13dcc7 100644
--- a/util/osdep.c
+++ b/util/osdep.c
@@ -613,3 +613,8 @@ int qemu_fdatasync(int fd)
return fsync(fd);
#endif
}
+
+uintptr_t qemu_real_host_page_size(void)
+{
+ return getpagesize();
+}
--
2.51.0
next prev parent reply other threads:[~2025-11-03 10:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 10:51 [PATCH 0/2] osdep: Cache getpagesize() call in qemu_real_host_page_size() Philippe Mathieu-Daudé
2025-11-03 10:51 ` Philippe Mathieu-Daudé [this message]
2025-11-03 10:51 ` [PATCH 2/2] " Philippe Mathieu-Daudé
2025-11-06 10:53 ` [PATCH 0/2] " Richard Henderson
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=20251103105111.68294-2-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).