public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: sboyd@codeaurora•org (sboyd at codeaurora.org)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 2/3] [v4] ARM64: TTY: hvc_dcc: Add support for ARM64 dcc
Date: Mon, 24 Aug 2015 16:51:44 -0700	[thread overview]
Message-ID: <20150824235144.GH14330@codeaurora.org> (raw)
In-Reply-To: <20150819163736.GC6281@e103592.cambridge.arm.com>

On 08/19, Dave Martin wrote:
> On Wed, Aug 19, 2015 at 11:16:52AM -0500, Timur Tabi wrote:
> > On 08/19/2015 05:14 AM, Dave Martin wrote:
> > >>>So does that mean that ldrb will zero-extend the byte to all 64 bits of x3?
> > >Yes.  No extra operation is required.
> > 
> > So my patch is actually correct as-is?
> 
> +static inline void __dcc_putchar(char c)
> +{
> +	asm volatile("msr dbgdtrtx_el0, %0"
> +			: /* No output register */
> +			: "r" (c));
> 
> For safety, you still need to make sure that c is appropriately masked
> before passing it to the asm.  Something like this should definitely be
> safe:
> 
> 			: "r" ((unsigned long)(unsigned char)c)
> 
> GCC can then emit uxtb or not, depending on whether it's needed in each
> context where the asm is inlined.

Does this mean we ought to do the same thing in the arm header
file too?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2015-08-24 23:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-08  0:16 [PATCH 1/3] [v2] hvc_dcc: don't ignore errors during initialization Timur Tabi
2015-08-08  0:16 ` [PATCH 2/3] [v4] ARM64: TTY: hvc_dcc: Add support for ARM64 dcc Timur Tabi
2015-08-10  9:40   ` Will Deacon
2015-08-17 23:56     ` Timur Tabi
2015-08-18  8:21       ` Dave Martin
2015-08-18 19:07         ` Timur Tabi
2015-08-19 10:14           ` Dave Martin
2015-08-19 16:16             ` Timur Tabi
2015-08-19 16:37               ` Dave Martin
2015-08-24 23:51                 ` sboyd at codeaurora.org [this message]
2015-09-02 11:10                   ` Dave Martin
2015-08-08  0:16 ` [PATCH 3/3] [v2] hvc_dcc: disable user-space access to DCC Timur Tabi
2015-08-10  9:47   ` Will Deacon
2015-08-17 22:45     ` Timur Tabi
2015-08-10  9:48 ` [PATCH 1/3] [v2] hvc_dcc: don't ignore errors during initialization Will Deacon
2015-08-19 22:51   ` 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=20150824235144.GH14330@codeaurora.org \
    --to=sboyd@codeaurora$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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