From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id C235C67B3D for ; Thu, 7 Apr 2005 09:50:14 +1000 (EST) From: Benjamin Herrenschmidt To: Chris Friesen In-Reply-To: <42547112.9000302@nortel.com> References: <425429BF.1050706@nortel.com> <1112829596.9518.210.camel@gaston> <42547112.9000302@nortel.com> Content-Type: text/plain Date: Thu, 07 Apr 2005 09:49:23 +1000 Message-Id: <1112831363.9518.215.camel@gaston> Mime-Version: 1.0 Cc: linuxppc-dev list Subject: Re: question on inline assembly and long long values List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 2005-04-06 at 17:30 -0600, Chris Friesen wrote: > Benjamin Herrenschmidt wrote: > > On Wed, 2005-04-06 at 12:26 -0600, Chris Friesen wrote: > > > >>I want to retrieve the msr (which is 64-bits) on a 970 when running in > >>32-bit mode. > > > Is this in kernel mode ? Why are you doing that ? > > Yes it is. > > We wanted to manipulate the high word of the msr on the 970, from C > code, while running in 32-bit mode. I'll be doing something similar to > get at the high word of HID1 (to enable the en_icbi bit). > > Is there some other way to do this? But the kernel code always runs in 64 bits mode... or are you trying to pass that down to userland ? In the later case, your optimisations are pretty much nothing compared to the cost of a syscall Ben.