All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/mprotect04: Use __builtin___clear_cache() to sync caches
Date: Mon, 1 Aug 2016 06:29:59 -0400 (EDT)	[thread overview]
Message-ID: <1476945951.10231924.1470047399416.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1469550665-12918-1-git-send-email-peter.maydell@linaro.org>





----- Original Message -----
> From: "Peter Maydell" <peter.maydell@linaro.org>
> To: ltp@lists.linux.it
> Cc: patches@linaro.org, "Cyril Hrubis" <chrubis@suse.cz>, "Jan Stancek" <jstancek@redhat.com>, "Mark Rutland"
> <mark.rutland@arm.com>
> Sent: Tuesday, 26 July, 2016 6:31:05 PM
> Subject: [PATCH] syscalls/mprotect04: Use __builtin___clear_cache() to sync caches
> 
> In commit cf9a0800cd0 code was added to mprotect04 to synchronize
> the instruction and data caches on PowerPC before executing
> the copied code. This is also necessary on other architectures
> which have split instruction and data caches and need explicit
> cache maintenance operations, like ARM.
> 
> The GCC builtin __builtin___clear_cache() will correctly handle
> this for all architectures, so switch to using it. The builtin
> was only implemented at around GCC 4.1, so use a configure
> check so that we will skip the test with TCONF if the compiler
> doesn't support the builtin.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Looks good to me.

> ---
> Disclaimer: untested on PPC.

I don't have such HW available at the moment, but I tested this
on RHEL5.6/6.0/7.2 x86_64. RHEL5.6 exits with TCONF as expected.

Regards,
Jan

  reply	other threads:[~2016-08-01 10:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26 16:31 [LTP] [PATCH] syscalls/mprotect04: Use __builtin___clear_cache() to sync caches Peter Maydell
2016-08-01 10:29 ` Jan Stancek [this message]
2016-08-01 11:06   ` Peter Maydell
2016-08-01 11:31 ` Cyril Hrubis
2016-08-01 12:23   ` Peter Maydell
2016-08-01 16:17     ` Cyril Hrubis
2016-08-05 10:08       ` Peter Maydell
2016-08-09 12:13         ` Cyril Hrubis
2016-08-09 12:25           ` Peter Maydell

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=1476945951.10231924.1470047399416.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.com \
    --cc=ltp@lists.linux.it \
    /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.