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