cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
5d360b
From b718e298552cbecd1737c9401dc3ea613d6cd63b Mon Sep 17 00:00:00 2001
12e206
From: Gerd Hoffmann <kraxel@redhat.com>
12e206
Date: Thu, 5 Oct 2017 14:51:13 +0200
5d360b
Subject: [PATCH 17/27] bswap.h: Remove cpu_to_32wu()
12e206
12e206
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
12e206
Message-id: <20171005145119.15277-2-kraxel@redhat.com>
12e206
Patchwork-id: 76821
12e206
O-Subject: [RHEL-7.5 qemu-kvm PATCH 1/7] bswap.h: Remove cpu_to_32wu()
5d360b
Bugzilla: 1486642
12e206
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
12e206
RH-Acked-by: Thomas Huth <thuth@redhat.com>
12e206
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
12e206
12e206
From: Peter Maydell <peter.maydell@linaro.org>
12e206
12e206
Replace the legacy cpu_to_32wu() with stl_p().
12e206
12e206
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12e206
Reviewed-by: Richard Henderson <rth@twiddle.net>
12e206
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
12e206
Message-id: 1383669517-25598-10-git-send-email-peter.maydell@linaro.org
12e206
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
12e206
(cherry picked from commit 7d579514a5a7b308b52d4e8567aa9bd1f7aa761b)
12e206
12e206
[ rhel: pick vga update, drop drop include/qemu/bswap.h chunk ]
12e206
12e206
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
12e206
---
12e206
 hw/display/vga_template.h | 14 ++++++++------
12e206
 1 file changed, 8 insertions(+), 6 deletions(-)
12e206
12e206
diff --git a/hw/display/vga_template.h b/hw/display/vga_template.h
12e206
index f6f6a01..6cfae56 100644
12e206
--- a/hw/display/vga_template.h
12e206
+++ b/hw/display/vga_template.h
12e206
@@ -113,20 +113,22 @@ static void glue(vga_draw_glyph9_, DEPTH)(uint8_t *d, int linesize,
12e206
     do {
12e206
         font_data = font_ptr[0];
12e206
 #if BPP == 1
12e206
-        cpu_to_32wu((uint32_t *)d, (dmask16[(font_data >> 4)] & xorcol) ^ bgcol);
12e206
+        stl_p((uint32_t *)d, (dmask16[(font_data >> 4)] & xorcol) ^ bgcol);
12e206
         v = (dmask16[(font_data >> 0) & 0xf] & xorcol) ^ bgcol;
12e206
-        cpu_to_32wu(((uint32_t *)d)+1, v);
12e206
+        stl_p(((uint32_t *)d)+1, v);
12e206
         if (dup9)
12e206
             ((uint8_t *)d)[8] = v >> (24 * (1 - BIG));
12e206
         else
12e206
             ((uint8_t *)d)[8] = bgcol;
12e206
 
12e206
 #elif BPP == 2
12e206
-        cpu_to_32wu(((uint32_t *)d)+0, (dmask4[(font_data >> 6)] & xorcol) ^ bgcol);
12e206
-        cpu_to_32wu(((uint32_t *)d)+1, (dmask4[(font_data >> 4) & 3] & xorcol) ^ bgcol);
12e206
-        cpu_to_32wu(((uint32_t *)d)+2, (dmask4[(font_data >> 2) & 3] & xorcol) ^ bgcol);
12e206
+        stl_p(((uint32_t *)d)+0, (dmask4[(font_data >> 6)] & xorcol) ^ bgcol);
12e206
+        stl_p(((uint32_t *)d)+1,
12e206
+              (dmask4[(font_data >> 4) & 3] & xorcol) ^ bgcol);
12e206
+        stl_p(((uint32_t *)d)+2,
12e206
+              (dmask4[(font_data >> 2) & 3] & xorcol) ^ bgcol);
12e206
         v = (dmask4[(font_data >> 0) & 3] & xorcol) ^ bgcol;
12e206
-        cpu_to_32wu(((uint32_t *)d)+3, v);
12e206
+        stl_p(((uint32_t *)d)+3, v);
12e206
         if (dup9)
12e206
             ((uint16_t *)d)[8] = v >> (16 * (1 - BIG));
12e206
         else
12e206
-- 
12e206
1.8.3.1
12e206