diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-03-14 19:00:44 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-16 10:31:40 +0000 |
commit | 9dfd3cd674dc6ea716243c00c35102fa00d31ab1 (patch) | |
tree | ef2e2974006eab581d21b3a646a39c5ccea8b75d | |
parent | 00bc2e68f98e8a868dac26fe2f45954fbfdc2222 (diff) | |
download | poky-9dfd3cd674dc6ea716243c00c35102fa00d31ab1.tar.gz |
qemu: Fix build on ppc64
add a missing system include
(From OE-Core rev: e057fc5fe6209f44a49b8dd6cc9b4b2d410064ea)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch | 92 |
2 files changed, 93 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index cbbb99f611..de3320aef3 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc | |||
@@ -28,6 +28,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ | |||
28 | file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \ | 28 | file://0001-tests-meson.build-use-relative-path-to-refer-to-file.patch \ |
29 | file://0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch \ | 29 | file://0001-riscv-Set-5.4-as-minimum-kernel-version-for-riscv32.patch \ |
30 | file://0001-acpi-tpm-Add-missing-device-identification-objects.patch \ | 30 | file://0001-acpi-tpm-Add-missing-device-identification-objects.patch \ |
31 | file://0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch \ | ||
31 | " | 32 | " |
32 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | 33 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" |
33 | 34 | ||
diff --git a/meta/recipes-devtools/qemu/qemu/0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch b/meta/recipes-devtools/qemu/qemu/0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch new file mode 100644 index 0000000000..e8e42007df --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch | |||
@@ -0,0 +1,92 @@ | |||
1 | From 91e15627fd05d5a59fd2b88bc5c3491d3e0b56b0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 14 Mar 2022 09:58:21 -0700 | ||
4 | Subject: [PATCH] ppc: Include asm/ptrace.h for pt_regs struct definition | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Fixes | ||
10 | ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs' | ||
11 | return uc->uc_mcontext.regs->nip; | ||
12 | ~~~~~~~~~~~~~~~~~~~~^ | ||
13 | |||
14 | Upstream-Status: Submitted [https://patchwork.kernel.org/project/qemu-devel/patch/20220314170223.554679-1-raj.khem@gmail.com/] | ||
15 | |||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | Cc: Peter Maydell <peter.maydell@linaro.org> | ||
18 | Cc: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
19 | Cc: Richard Henderson <richard.henderson@linaro.org> | ||
20 | --- | ||
21 | linux-user/include/host/ppc/host-signal.h | 4 ++++ | ||
22 | 1 file changed, 4 insertions(+) | ||
23 | |||
24 | --- a/linux-user/host/ppc/host-signal.h | ||
25 | +++ /dev/null | ||
26 | @@ -1,30 +0,0 @@ | ||
27 | -/* | ||
28 | - * host-signal.h: signal info dependent on the host architecture | ||
29 | - * | ||
30 | - * Copyright (c) 2003-2005 Fabrice Bellard | ||
31 | - * Copyright (c) 2021 Linaro Limited | ||
32 | - * | ||
33 | - * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. | ||
34 | - * See the COPYING file in the top-level directory. | ||
35 | - */ | ||
36 | - | ||
37 | -#ifndef PPC_HOST_SIGNAL_H | ||
38 | -#define PPC_HOST_SIGNAL_H | ||
39 | - | ||
40 | -static inline uintptr_t host_signal_pc(ucontext_t *uc) | ||
41 | -{ | ||
42 | - return uc->uc_mcontext.regs->nip; | ||
43 | -} | ||
44 | - | ||
45 | -static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc) | ||
46 | -{ | ||
47 | - uc->uc_mcontext.regs->nip = pc; | ||
48 | -} | ||
49 | - | ||
50 | -static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc) | ||
51 | -{ | ||
52 | - return uc->uc_mcontext.regs->trap != 0x400 | ||
53 | - && (uc->uc_mcontext.regs->dsisr & 0x02000000); | ||
54 | -} | ||
55 | - | ||
56 | -#endif | ||
57 | --- a/linux-user/host/ppc64/host-signal.h | ||
58 | +++ b/linux-user/host/ppc64/host-signal.h | ||
59 | @@ -1 +1,32 @@ | ||
60 | -#include "../ppc/host-signal.h" | ||
61 | +/* | ||
62 | + * host-signal.h: signal info dependent on the host architecture | ||
63 | + * | ||
64 | + * Copyright (c) 2003-2005 Fabrice Bellard | ||
65 | + * Copyright (c) 2021 Linaro Limited | ||
66 | + * | ||
67 | + * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. | ||
68 | + * See the COPYING file in the top-level directory. | ||
69 | + */ | ||
70 | + | ||
71 | +#ifndef PPC_HOST_SIGNAL_H | ||
72 | +#define PPC_HOST_SIGNAL_H | ||
73 | + | ||
74 | +#include <asm/ptrace.h> | ||
75 | + | ||
76 | +static inline uintptr_t host_signal_pc(ucontext_t *uc) | ||
77 | +{ | ||
78 | + return uc->uc_mcontext.gp_regs[PT_NIP]; | ||
79 | +} | ||
80 | + | ||
81 | +static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc) | ||
82 | +{ | ||
83 | + uc->uc_mcontext.gp_regs[PT_NIP] = pc; | ||
84 | +} | ||
85 | + | ||
86 | +static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc) | ||
87 | +{ | ||
88 | + return uc->uc_mcontext.gp_regs[PT_TRAP] != 0x400 | ||
89 | + && (uc->uc_mcontext.gp_regs[PT_DSISR] & 0x02000000); | ||
90 | +} | ||
91 | + | ||
92 | +#endif | ||