This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [AArch64] support -mfentry feature for arm64
- From: Andrew Haley <aph at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>, Michael Matz <matz at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Apr 2016 16:02:00 +0100
- Subject: Re: [PATCH] [AArch64] support -mfentry feature for arm64
- Authentication-results: sourceware.org; auth=none
- References: <1457943260-30894-1-git-send-email-huawei dot libin at huawei dot com> <B6E2AECD-096C-489F-A217-8140E781E722 at linaro dot org> <alpine dot LSU dot 2 dot 20 dot 1604151739210 dot 20277 at wotan dot suse dot de> <alpine dot LNX dot 2 dot 20 dot 1604152026570 dot 26109 at monopod dot intra dot ispras dot ru> <5714F001 dot 8090408 at redhat dot com> <alpine dot LSU dot 2 dot 20 dot 1604181910520 dot 20277 at wotan dot suse dot de> <57151699 dot 6020602 at redhat dot com> <alpine dot LSU dot 2 dot 20 dot 1604181929170 dot 20277 at wotan dot suse dot de> <5715E5A9 dot 8060500 at redhat dot com> <alpine dot LSU dot 2 dot 20 dot 1604191508390 dot 20277 at wotan dot suse dot de> <571631D6 dot 1020803 at redhat dot com> <571642BB dot 40708 at redhat dot com>
On 04/19/2016 03:37 PM, Pedro Alves wrote:
> On 04/19/2016 02:25 PM, Andrew Haley wrote:
>> On 04/19/2016 02:19 PM, Michael Matz wrote:
>>
>>> Well, yeah, that's traditional insn caches on multiple cores. From
>>> user space you need kernel help for this, doing interprocess
>>> interrupts to flush all such buffers on all cores (or at least those
>>> potentially fetching stuff in the patched region, if such
>>> granularity is possible). An implementation providing such is
>>> non-broken :)
>>
>> Sure. If you know of any such facility in Linux userspace, please let
>> me know. :-)
>
> Sounds like a job for the sys_membarrier system call:
>
> https://lkml.org/lkml/2015/3/18/531
> https://lwn.net/Articles/369567/
>
> I think it's available in Linux 4.3+.
So it is, thanks. I'm guessing that might be good enough for full
instruction synchronization barriers, but from looking at the kernel
source I can't really tell.
Andrew.