From 9dfd3cd674dc6ea716243c00c35102fa00d31ab1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 14 Mar 2022 19:00:44 -0700 Subject: qemu: Fix build on ppc64 add a missing system include (From OE-Core rev: e057fc5fe6209f44a49b8dd6cc9b4b2d410064ea) Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- ...-asm-ptrace.h-for-pt_regs-struct-definiti.patch | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/0001-ppc-Include-asm-ptrace.h-for-pt_regs-struct-definiti.patch (limited to 'meta/recipes-devtools/qemu/qemu') 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 @@ +From 91e15627fd05d5a59fd2b88bc5c3491d3e0b56b0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 14 Mar 2022 09:58:21 -0700 +Subject: [PATCH] ppc: Include asm/ptrace.h for pt_regs struct definition +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes +../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs' + return uc->uc_mcontext.regs->nip; + ~~~~~~~~~~~~~~~~~~~~^ + +Upstream-Status: Submitted [https://patchwork.kernel.org/project/qemu-devel/patch/20220314170223.554679-1-raj.khem@gmail.com/] + +Signed-off-by: Khem Raj +Cc: Peter Maydell +Cc: Philippe Mathieu-Daudé +Cc: Richard Henderson +--- + linux-user/include/host/ppc/host-signal.h | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/linux-user/host/ppc/host-signal.h ++++ /dev/null +@@ -1,30 +0,0 @@ +-/* +- * host-signal.h: signal info dependent on the host architecture +- * +- * Copyright (c) 2003-2005 Fabrice Bellard +- * Copyright (c) 2021 Linaro Limited +- * +- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. +- * See the COPYING file in the top-level directory. +- */ +- +-#ifndef PPC_HOST_SIGNAL_H +-#define PPC_HOST_SIGNAL_H +- +-static inline uintptr_t host_signal_pc(ucontext_t *uc) +-{ +- return uc->uc_mcontext.regs->nip; +-} +- +-static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc) +-{ +- uc->uc_mcontext.regs->nip = pc; +-} +- +-static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc) +-{ +- return uc->uc_mcontext.regs->trap != 0x400 +- && (uc->uc_mcontext.regs->dsisr & 0x02000000); +-} +- +-#endif +--- a/linux-user/host/ppc64/host-signal.h ++++ b/linux-user/host/ppc64/host-signal.h +@@ -1 +1,32 @@ +-#include "../ppc/host-signal.h" ++/* ++ * host-signal.h: signal info dependent on the host architecture ++ * ++ * Copyright (c) 2003-2005 Fabrice Bellard ++ * Copyright (c) 2021 Linaro Limited ++ * ++ * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. ++ * See the COPYING file in the top-level directory. ++ */ ++ ++#ifndef PPC_HOST_SIGNAL_H ++#define PPC_HOST_SIGNAL_H ++ ++#include ++ ++static inline uintptr_t host_signal_pc(ucontext_t *uc) ++{ ++ return uc->uc_mcontext.gp_regs[PT_NIP]; ++} ++ ++static inline void host_signal_set_pc(ucontext_t *uc, uintptr_t pc) ++{ ++ uc->uc_mcontext.gp_regs[PT_NIP] = pc; ++} ++ ++static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc) ++{ ++ return uc->uc_mcontext.gp_regs[PT_TRAP] != 0x400 ++ && (uc->uc_mcontext.gp_regs[PT_DSISR] & 0x02000000); ++} ++ ++#endif -- cgit v1.2.3-54-g00ecf