From: Timur Tabi <timur@codeaurora.org>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Shanker Donthineni <shankerd@codeaurora.org>,
awallis@codeaurora.org, abhimany@codeaurora.org,
will.deacon@arm.com, Vipul Gandhi <vgandhi@codeaurora.org>
Subject: Re: [PATCH 4/4] hvc_dcc: disable user-space access to DCC
Date: Fri, 3 Jul 2015 10:53:12 -0400 [thread overview]
Message-ID: <830CD79F-C263-4C3B-A27F-77A4DA55236F@codeaurora.org> (raw)
In-Reply-To: <55947F1C.3020904@codeaurora.org>
On Jul 1, 2015, at 8:00 PM, Stephen Boyd wrote:
>>
>> #include <asm/barrier.h>
>> +#include <asm/hardware/cp14.h>
>
> That's new.
And no one else is using it either.
>>
>> +
>> +static inline void __dcc_initialize(void)
>> +{
>> + u32 val;
>> +
>> + /* Disable user-space access to DCC */
>> + val = MRC14(0, c0, c1, 0);
>> + val |= 1 << 12; /* DSCR[Comms] */
>> + MCR14(val, 0, c0, c1, 0);
>> +}
>
> Nitpick: We do raw cp14 accesses for other functions in this file, so it
> would be nice to be consistent throughout.
I agree, but I didn't want to expand the scope of this patch beyond what it's supposed to do.
>>
>> +static inline void __dcc_initialize(void)
>> +{
>> + u32 val;
>> +
>> + /* Disable user-space access to DCC */
>> + asm ("mrs %0, mdscr_el1\n"
>
> shouldn't this be volatile?
Well, I figured it wasn't important exactly why these instructions are executed, since it just disables user-space. I usually get chewed out by someone if I add volatile where it's not needed, so I didn't add it this time.
>
>> + " orr %0, %0, #4096\n" /* Set the TDCC bit */
>
> arm64 has some #defines in debug-monitors.h which we should probably
> extend to have this bit as a #define too.
Hmmm, the only thing I see in debug_monitors.h that seems applicable are the mdscr_write() and mdscr_read() functions, which seem to overlap cp14.h.
next prev parent reply other threads:[~2015-07-03 14:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-30 21:23 [PATCH 1/4] hvc_dcc: bind driver to core0 for reads and writes Timur Tabi
2015-06-30 21:23 ` [PATCH 2/4] hvc_dcc: don't ignore errors during initialization Timur Tabi
2015-07-01 23:54 ` Stephen Boyd
2015-07-03 14:46 ` Timur Tabi
2015-06-30 21:23 ` [PATCH 3/4] [v3] ARM64: TTY: hvc_dcc: Add support for ARM64 dcc Timur Tabi
2015-06-30 21:23 ` [PATCH 4/4] hvc_dcc: disable user-space access to DCC Timur Tabi
2015-07-02 0:00 ` Stephen Boyd
2015-07-03 14:53 ` Timur Tabi [this message]
2015-07-01 1:37 ` [PATCH 1/4] hvc_dcc: bind driver to core0 for reads and writes Stephen Boyd
2015-07-01 1:57 ` Timur Tabi
2015-07-01 23:38 ` Stephen Boyd
2015-07-03 14:42 ` Timur Tabi
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=830CD79F-C263-4C3B-A27F-77A4DA55236F@codeaurora.org \
--to=timur@codeaurora.org \
--cc=abhimany@codeaurora.org \
--cc=awallis@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sboyd@codeaurora.org \
--cc=shankerd@codeaurora.org \
--cc=vgandhi@codeaurora.org \
--cc=will.deacon@arm.com \
/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
Powered by JetHome