Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933363AbbFVNQb (ORCPT ); Mon, 22 Jun 2015 09:16:31 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59670 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754219AbbFVNQX (ORCPT ); Mon, 22 Jun 2015 09:16:23 -0400 Message-ID: <55880ABB.6030304@codeaurora.org> Date: Mon, 22 Jun 2015 08:16:43 -0500 From: Timur Tabi User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1 MIME-Version: 1.0 To: Will Deacon CC: Catalin Marinas , "abhimany@codeaurora.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ARM64: TTY: hvc_dcc: Add support for ARM64 dcc References: <1434751734-2178-1-git-send-email-timur@codeaurora.org> <20150622131228.GE1583@arm.com> In-Reply-To: <20150622131228.GE1583@arm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1381 Lines: 45 Will Deacon wrote: > On Fri, Jun 19, 2015 at 11:08:54PM +0100, Timur Tabi wrote: >> From: Abhimanyu Kapur >> >> Add support for debug communications channel based >> hvc console for arm64 cpus. > > I still think we should be disabling userspace access to the DCC if the > kernel is using it as its console. I don't disagree, I just don't know how to do that. >> + * A call to __dcc_getchar() or __dcc_putchar() is typically followed by >> + * a call to __dcc_getstatus(). We want to make sure that the CPU does >> + * not speculative read the DCC status before executing the read or write >> + * instruction. That's what the ISBs are for. >> + * >> + * The 'volatile' ensures that the compiler does not cache the status bits, >> + * and instead reads the DCC register every time. >> + */ > > Missing header guards. Will fix. >> +#include >> + >> +static inline u32 __dcc_getstatus(void) >> +{ >> + u32 __ret; >> + >> + asm volatile("mrs %0, mdccsr_el0" : "=r" (__ret) >> + : : "cc"); > > You don't need the "cc" clobber. Will fix. -- Sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/