From: Lulu Cheng <chenglulu@loongson.cn>
To: Caroline Tice <cmtice@google.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
mliska@suse.cz, David Malcolm <dmalcolm@redhat.com>,
qijingwen <qijingwen@loongson.cn>,
xuchenghua@loongson.cn, i@xen0n.name
Subject: Re: [PATCH v2] LoongArch: Libvtv add loongarch support.
Date: Wed, 12 Oct 2022 10:52:28 +0800 [thread overview]
Message-ID: <7a6d077c-7a3b-1660-ba20-a24804e10b30@loongson.cn> (raw)
In-Reply-To: <CABtf2+TktYXnDASpRH-WtzoULcJwDe0PxwaHebuWyZry87gBDw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]
在 2022/10/12 上午4:57, Caroline Tice 写道:
> I think that if VTV_PAGE_SIZE is not set to the actual size being used
> by the system, it could result in some unexpected failures. I
> believe the right thing to do in this case, since the size may vary,
> is to get the actual size being used by the system and use that in the
> definition of VTV_PAGE_SIZE. So in include/vtv-permission.h you
> would have something like:
>
> +#elif defined(__loongarch_lp64)
> +#define VTV_PAGE_SIZE sysconf(_SC_PAGE_SIZE)
>
> Then you would have the accurate, correct size for the current system,
> and there would be no need to update the
> check in vtv_malloc.cc at all.
/* Page-aligned symbol to mark beginning of .vtable_map_vars
section. */
char _vtable_map_vars_start []
__attribute__ ((__visibility__ ("protected"), used,
aligned(VTV_PAGE_SIZE),
section(".vtable_map_vars")))
= { };
The above code is in the libgcc/vtv_start.c file. Alignment (aligned
(alignment) ) must be an
integer constant power of 2. So setting VTV_PAGE_SIZE as a variable is
not advisable.
As xiruoyao notes, the default value for the LoongArch Linux kernel
configuration is 16KB.
So let's set VTV_PAGE_SIZE to 16KB first and I will indicate in the
submission information
that only 16KB pages are supported.
next prev parent reply other threads:[~2022-10-12 2:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 7:49 Lulu Cheng
2022-09-27 11:44 ` Xi Ruoyao
2022-09-28 7:29 ` Lulu Cheng
2022-10-10 17:49 ` Caroline Tice
2022-10-11 9:41 ` Xi Ruoyao
2022-10-11 20:57 ` Caroline Tice
2022-10-12 2:52 ` Lulu Cheng [this message]
2022-10-12 4:05 ` Caroline Tice
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=7a6d077c-7a3b-1660-ba20-a24804e10b30@loongson.cn \
--to=chenglulu@loongson.cn \
--cc=cmtice@google.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=i@xen0n.name \
--cc=mliska@suse.cz \
--cc=qijingwen@loongson.cn \
--cc=xuchenghua@loongson.cn \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).