From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DQ7Uk-00072p-V6 for qemu-devel@nongnu.org; Mon, 25 Apr 2005 13:35:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DQ7Uj-000723-P2 for qemu-devel@nongnu.org; Mon, 25 Apr 2005 13:35:42 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DQ7Uj-000627-Ed for qemu-devel@nongnu.org; Mon, 25 Apr 2005 13:35:41 -0400 Received: from [65.74.133.9] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DQ7RE-0005QZ-Hh for qemu-devel@nongnu.org; Mon, 25 Apr 2005 13:32:04 -0400 From: Paul Brook Subject: Re: [Qemu-devel] [patch] option -no-tsc for i386 with speedstep Date: Mon, 25 Apr 2005 18:28:19 +0100 References: <20050425111532.GA2554@dizzy.ath.cx> <20050425170752.GA20078@jbrown.mylinuxbox.org> In-Reply-To: <20050425170752.GA20078@jbrown.mylinuxbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504251828.21730.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Jim C. Brown" On Monday 25 April 2005 18:07, Jim C. Brown wrote: > On Mon, Apr 25, 2005 at 01:15:32PM +0200, Massimo Dal Zotto wrote: > > The patch works for me but I don't know if this is the best way of fixing > > this bug. If anyone has a better suggestion it is welcome. > > > > -- > > Massimo Dal Zotto > > I just want to point out that your patches break qemu for almost every > platform other than i386. Rubbish. > You probably want to do this, because notsc is only declared for the i386 > platform. > > int64_t cpu_get_real_ticks(void) > { > int64_t val; > +#ifdef __i386__ > + if (notsc) { > + return get_clock(); > + } > +#endif > asm volatile ("rdtsc" : "=A" (val)); > return val; > } This is already inside a #if defined(__i386__) block Paul