From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MquhZ-00037X-GC for qemu-devel@nongnu.org; Thu, 24 Sep 2009 16:14:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MquhV-000354-Ru for qemu-devel@nongnu.org; Thu, 24 Sep 2009 16:14:05 -0400 Received: from [199.232.76.173] (port=42702 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MquhV-00034t-JV for qemu-devel@nongnu.org; Thu, 24 Sep 2009 16:14:01 -0400 Received: from mail-fx0-f214.google.com ([209.85.220.214]:50095) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MquhU-0003Pl-Q4 for qemu-devel@nongnu.org; Thu, 24 Sep 2009 16:14:01 -0400 Received: by fxm10 with SMTP id 10so1756637fxm.8 for ; Thu, 24 Sep 2009 13:13:59 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20090924191121.GB29419@redhat.com> References: <20090923200635.GA21246@redhat.com> <20090924191121.GB29419@redhat.com> From: Blue Swirl Date: Thu, 24 Sep 2009 23:13:38 +0300 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCHv2] qemu: target library, use it in msix List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On Thu, Sep 24, 2009 at 10:11 PM, Michael S. Tsirkin wrote= : > On Thu, Sep 24, 2009 at 08:50:11PM +0300, Blue Swirl wrote: >> On Wed, Sep 23, 2009 at 11:06 PM, Michael S. Tsirkin wr= ote: >> > This creates target.c, which builds per-target, and makes it possible >> > for devices to become target-independent. =C2=A0Use it in msix, revert= ing >> > part of 5e520a7d500ec2569d22d80f9ef4272a34cb3c80, as we no longer have >> > to pass target page around. >> >> > +unsigned target_page_align(unsigned value) >> > +{ >> > + =C2=A0 =C2=A0 =C2=A0 return TARGET_PAGE_ALIGN(value); >> > +} >> >> This must be: >> target_phys_addr_t target_page_align(target_phys_addr_t value) > > what's the point then? It has to be target independent. > Let's make it unsigned long long, should be good enough. target_phys_addr_t is handled by hwlib definitions, so it can be used for hwlib devices. If you can remove all target_phys_addr_t uses, then the compilation of the file could be moved from Makefile.hw to Makefile. One day the bus addresses should be decoupled from the target CPU addresses, but for now we are stick with target_phys_addr_t. >> As this is not a clean revert anyway, please don't revert the part chang= ing >> if (x) >> =C2=A0y; >> else >> =C2=A0z; >> >> to >> >> if (x) { >> =C2=A0y; >> } else { >> =C2=A0z; >> } > > Did I mention I hate this style? But okay :). I'm not a great fan of this either, but this is the CODING_STYLE.