From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Dave Martin <Dave.Martin@arm.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] ARM: domains: add memory dependencies to get_domain/set_domain
Date: Fri, 11 Sep 2015 16:10:17 +0100 [thread overview]
Message-ID: <20150911151017.GS21084@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <87si6lt36s.fsf@belgarion.home>
On Fri, Sep 11, 2015 at 04:56:27PM +0200, Robert Jarzmik wrote:
> Russell King <rmk+kernel@arm.linux.org.uk> writes:
> > We need to have memory dependencies on get_domain/set_domain to avoid
> > the compiler over-optimising these inline assembly instructions.
> >
> > Loads/stores must not be reordered across a set_domain(), so introduce
> > a compiler barrier for that assembly.
> >
> > The value of get_domain() must not be cached across a set_domain(), but
> > we still want to allow the compiler to optimise it away. Introduce a
> > dependency on current_thread_info()->cpu_domain to avoid this; the new
> > memory clobber in set_domain() should therefore cause the compiler to
> > re-load this. The other advantage of using this is we should have its
> > address in the register set already, or very soon after at most call
> > sites.
> >
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
>
> The test is failing without these 2 patches, while with them, an unaligned
> access is fixed, and the generated code looks good :
> 7ac: ee13cf10 mrc 15, 0, ip, cr3, cr0, {0}
> 7b0: e3cc300c bic r3, ip, #12
> 7b4: e58dc014 str ip, [sp, #20]
> 7b8: e3833004 orr r3, r3, #4
> 7bc: ee033f10 mcr 15, 0, r3, cr3, cr0, {0}
Thanks Robert, I've queued these as fixes now.
If you want to put the bug alignment patch in the patch system, I'll get
that off to Linus this weekend too.
--
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
WARNING: multiple messages have this Message-ID (diff)
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: domains: add memory dependencies to get_domain/set_domain
Date: Fri, 11 Sep 2015 16:10:17 +0100 [thread overview]
Message-ID: <20150911151017.GS21084@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <87si6lt36s.fsf@belgarion.home>
On Fri, Sep 11, 2015 at 04:56:27PM +0200, Robert Jarzmik wrote:
> Russell King <rmk+kernel@arm.linux.org.uk> writes:
> > We need to have memory dependencies on get_domain/set_domain to avoid
> > the compiler over-optimising these inline assembly instructions.
> >
> > Loads/stores must not be reordered across a set_domain(), so introduce
> > a compiler barrier for that assembly.
> >
> > The value of get_domain() must not be cached across a set_domain(), but
> > we still want to allow the compiler to optimise it away. Introduce a
> > dependency on current_thread_info()->cpu_domain to avoid this; the new
> > memory clobber in set_domain() should therefore cause the compiler to
> > re-load this. The other advantage of using this is we should have its
> > address in the register set already, or very soon after at most call
> > sites.
> >
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
>
> The test is failing without these 2 patches, while with them, an unaligned
> access is fixed, and the generated code looks good :
> 7ac: ee13cf10 mrc 15, 0, ip, cr3, cr0, {0}
> 7b0: e3cc300c bic r3, ip, #12
> 7b4: e58dc014 str ip, [sp, #20]
> 7b8: e3833004 orr r3, r3, #4
> 7bc: ee033f10 mcr 15, 0, r3, cr3, cr0, {0}
Thanks Robert, I've queued these as fixes now.
If you want to put the bug alignment patch in the patch system, I'll get
that off to Linus this weekend too.
--
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2015-09-11 15:10 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 6:23 [PATCH] ARM: fix alignement of __bug_table section entries Robert Jarzmik
2015-09-02 6:23 ` Robert Jarzmik
2015-09-02 10:39 ` Dave Martin
2015-09-02 10:39 ` Dave Martin
2015-09-05 13:48 ` Robert Jarzmik
2015-09-05 13:48 ` Robert Jarzmik
2015-09-05 14:25 ` Russell King - ARM Linux
2015-09-05 14:25 ` Russell King - ARM Linux
2015-09-05 17:10 ` Robert Jarzmik
2015-09-05 17:10 ` Robert Jarzmik
2015-09-05 20:38 ` Russell King - ARM Linux
2015-09-05 20:38 ` Russell King - ARM Linux
2015-09-05 22:12 ` Robert Jarzmik
2015-09-05 22:12 ` Robert Jarzmik
2015-09-06 17:25 ` Robert Jarzmik
2015-09-06 17:25 ` Robert Jarzmik
2015-09-06 19:48 ` Russell King - ARM Linux
2015-09-06 19:48 ` Russell King - ARM Linux
2015-09-06 21:31 ` Robert Jarzmik
2015-09-06 21:31 ` Robert Jarzmik
2015-09-06 23:54 ` Russell King - ARM Linux
2015-09-06 23:54 ` Russell King - ARM Linux
2015-09-08 17:01 ` Robert Jarzmik
2015-09-08 17:01 ` Robert Jarzmik
2015-09-08 20:08 ` Russell King - ARM Linux
2015-09-08 20:08 ` Russell King - ARM Linux
2015-09-08 20:46 ` Robert Jarzmik
2015-09-08 20:46 ` Robert Jarzmik
2015-09-09 23:06 ` Robert Jarzmik
2015-09-09 23:06 ` Robert Jarzmik
2015-09-10 19:01 ` Robert Jarzmik
2015-09-10 19:01 ` Robert Jarzmik
2015-09-10 19:16 ` Russell King - ARM Linux
2015-09-10 19:16 ` Russell King - ARM Linux
2015-09-10 20:53 ` Robert Jarzmik
2015-09-10 20:53 ` Robert Jarzmik
2015-09-11 9:54 ` Russell King - ARM Linux
2015-09-11 9:54 ` Russell King - ARM Linux
2015-09-11 9:56 ` [PATCH 1/2] ARM: domains: thread_info.h no longer needs asm/domains.h Russell King
2015-09-11 9:56 ` Russell King
2015-09-11 9:56 ` [PATCH 2/2] ARM: domains: add memory dependencies to get_domain/set_domain Russell King
2015-09-11 9:56 ` Russell King
2015-09-11 14:56 ` Robert Jarzmik
2015-09-11 14:56 ` Robert Jarzmik
2015-09-11 15:10 ` Russell King - ARM Linux [this message]
2015-09-11 15:10 ` Russell King - ARM Linux
2015-09-11 15:40 ` Robert Jarzmik
2015-09-11 15:40 ` Robert Jarzmik
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=20150911151017.GS21084@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=Dave.Martin@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robert.jarzmik@free.fr \
/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.