From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGeMr-0008D7-70 for qemu-devel@nongnu.org; Thu, 20 Feb 2014 19:53:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGeMq-0005xv-66 for qemu-devel@nongnu.org; Thu, 20 Feb 2014 19:53:29 -0500 Received: from mail-oa0-x236.google.com ([2607:f8b0:4003:c02::236]:33134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGeMq-0005xm-1V for qemu-devel@nongnu.org; Thu, 20 Feb 2014 19:53:28 -0500 Received: by mail-oa0-f54.google.com with SMTP id g12so2776312oah.41 for ; Thu, 20 Feb 2014 16:53:27 -0800 (PST) MIME-Version: 1.0 Sender: alistair23@gmail.com In-Reply-To: References: <57a391d51a6430e74fad5b88316c504b9217c306.1392853953.git.alistair.francis@xilinx.com> From: Alistair Francis Date: Fri, 21 Feb 2014 10:52:56 +1000 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] [PATCH target-arm v7 1/1] target-arm: Implements the ARM PMCCNTR register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Peter Crosthwaite , QEMU Developers , Alistair Francis On Fri, Feb 21, 2014 at 10:07 AM, Peter Maydell wrote: > On 20 February 2014 23:58, Alistair Francis wrote: >> On Fri, Feb 21, 2014 at 1:44 AM, Peter Maydell wrote: >>> This breaks compilation of the arm-linux-user target >>> (the qemu_clock_get_* functions are only available in >>> system mode). You probably want to do something similar >>> to how we handle the generic timers, where we #ifdef >>> everything out. (I don't think Linux gives user >>> space access to the perf monitor registers.) > >> What do you think the functions should do when in user space? Should >> they just return 0? > > Just don't define reginfo entries for them at all -- then we will > UNDEF because the lookup will return no result. This is what > the generic timer code does. > > thanks > -- PMM > Ok, so if it is user mode, it just treats the pmccntr register exactly as it does before the patch. I've implemented that and it seems to work. I'll submit the patch now