[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH trivial for-8.1 3/3] Fixed incorrect LLONG alignment for openrisc
From: |
Michael Tokarev |
Subject: |
[PATCH trivial for-8.1 3/3] Fixed incorrect LLONG alignment for openrisc and cris |
Date: |
Mon, 7 Aug 2023 13:56:51 +0300 |
From: Luca Bonissi <qemu@bonslack.org>
OpenRISC (or1k) has long long alignment to 4 bytes, but currently not
defined in abitypes.h. This lead to incorrect packing of /epoll_event/
structure and eventually infinite loop while waiting for file
descriptor[s] event[s].
Fixed also CRIS alignments (1 byte for all types).
Signed-off-by: Luca Bonissi <qemu@bonslack.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1770
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
include/exec/user/abitypes.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/exec/user/abitypes.h b/include/exec/user/abitypes.h
index 6191ce9f74..6178453d94 100644
--- a/include/exec/user/abitypes.h
+++ b/include/exec/user/abitypes.h
@@ -15,8 +15,16 @@
#define ABI_LLONG_ALIGNMENT 2
#endif
+#ifdef TARGET_CRIS
+#define ABI_SHORT_ALIGNMENT 1
+#define ABI_INT_ALIGNMENT 1
+#define ABI_LONG_ALIGNMENT 1
+#define ABI_LLONG_ALIGNMENT 1
+#endif
+
#if (defined(TARGET_I386) && !defined(TARGET_X86_64)) \
|| defined(TARGET_SH4) \
+ || defined(TARGET_OPENRISC) \
|| defined(TARGET_MICROBLAZE) \
|| defined(TARGET_NIOS2)
#define ABI_LLONG_ALIGNMENT 4
--
2.39.2
- [PATCH trivial for-8.1 0/3] trivial-patches for 2023-08-07, Michael Tokarev, 2023/08/07
- [PATCH trivial for-8.1 1/3] hw/i2c: Fix bitbang_i2c_data trace event, Michael Tokarev, 2023/08/07
- [PATCH trivial for-8.1 3/3] Fixed incorrect LLONG alignment for openrisc and cris,
Michael Tokarev <=
- [PATCH trivial for-8.1 2/3] stubs/colo.c: spelling, Michael Tokarev, 2023/08/07
- Re: [PATCH trivial for-8.1 0/3] trivial-patches for 2023-08-07, Richard Henderson, 2023/08/07
- [PATCH 02/24] bsd-user: spelling fixes, Michael Tokarev, 2023/08/23
- [PATCH 03/24] ui: spelling fixes, Michael Tokarev, 2023/08/23
- [PATCH 04/24] util: spelling fixes, Michael Tokarev, 2023/08/23
- [PATCH 05/24] tcg: spelling fixes, Michael Tokarev, 2023/08/23
- [PATCH 06/24] docs: spelling fixes, Michael Tokarev, 2023/08/23
- [PATCH 07/24] i386: spelling fixes, Michael Tokarev, 2023/08/23
- [PATCH 08/24] mips: spelling fixes, Michael Tokarev, 2023/08/23
- [PATCH 09/24] ppc: spelling fixes, Michael Tokarev, 2023/08/23