Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NvEpv-0002vF-P1 for qemu-devel@nongnu.org; Fri, 26 Mar 2010 15:04:51 -0400 Received: from [140.186.70.92] (port=33046 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvEpu-0002tS-7W for qemu-devel@nongnu.org; Fri, 26 Mar 2010 15:04:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NvEpr-0007dk-5r for qemu-devel@nongnu.org; Fri, 26 Mar 2010 15:04:48 -0400 Received: from mail-pz0-f194.google.com ([209.85.222.194]:52504) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NvEpq-0007as-VH for qemu-devel@nongnu.org; Fri, 26 Mar 2010 15:04:47 -0400 Received: by mail-pz0-f194.google.com with SMTP id 32so2910330pzk.4 for ; Fri, 26 Mar 2010 12:04:46 -0700 (PDT) MIME-Version: 1.0 Date: Fri, 26 Mar 2010 21:04:46 +0200 Message-ID: From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Subject: [Qemu-devel] [PATCH 10/10] Compile virtio-blk only once List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Replace access macros with direct accesses. Signed-off-by: Blue Swirl --- Makefile.objs | 3 ++- Makefile.target | 2 +- hw/virtio-blk.c | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index cad6490..5612ec2 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -128,7 +128,8 @@ user-obj-y += cutils.o cache-utils.o hw-obj-y = hw-obj-y += loader.o -hw-obj-y += virtio.o virtio-console.o virtio-pci.o virtio-net.o virtio-serial-bus.o +hw-obj-y += virtio.o virtio-console.o virtio-pci.o +hw-obj-y += virtio-blk.o virtio-net.o virtio-serial-bus.o hw-obj-y += fw_cfg.o pci.o pci_host.o pcie_host.o hw-obj-y += watchdog.o hw-obj-$(CONFIG_ISA_MMIO) += isa_mmio.o diff --git a/Makefile.target b/Makefile.target index e43e138..169c11e 100644 --- a/Makefile.target +++ b/Makefile.target @@ -165,7 +165,7 @@ obj-y = vl.o monitor.o machine.o gdbstub.o obj-y += qemu-timer.o # virtio has to be here due to weird dependency between PCI and virtio-net. # need to fix this properly -obj-y += virtio-blk.o virtio-balloon.o +obj-y += virtio-balloon.o obj-y += rwhandler.o obj-$(CONFIG_KVM) += kvm.o kvm-all.o LIBS+=-lz diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 9915840..d9dd9a7 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -411,9 +411,9 @@ static void virtio_blk_update_config(VirtIODevice *vdev, uint8_t *config) bdrv_get_geometry(s->bs, &capacity); bdrv_get_geometry_hint(s->bs, &cylinders, &heads, &secs); memset(&blkcfg, 0, sizeof(blkcfg)); - stq_raw(&blkcfg.capacity, capacity); - stl_raw(&blkcfg.seg_max, 128 - 2); - stw_raw(&blkcfg.cylinders, cylinders); + blkcfg.capacity = capacity; + blkcfg.seg_max = 128 - 2; + blkcfg.cylinders = cylinders; blkcfg.heads = heads; blkcfg.sectors = secs & ~s->sector_mask; blkcfg.blk_size = s->conf->logical_block_size; -- 1.6.2.4