tricore insn bugfixes for qemu 8.0
# -----BEGIN PGP SIGNATURE-----
#
# iQJTBAABCgA9FiEEbmNqfoPy3Qz6bm43CtLGOWtpyhQFAmPjZjUfHGtiYXN0aWFu
# QG1haWwudW5pLXBhZGVyYm9ybi5kZQAKCRAK0sY5a2nKFHBmD/9r8dgNWWMYdXrC
# PO9fNg1lk+zR9AfTBc7YonuNo/aRmoh48r36FCIKPVWIspyXaEpjyCUAA79Lmhw7
# XGRqDbosa7TNSyQgOfqKyxAc7uISRBSFIQocbTCKTcpwcBpOUhSQFMjwc4yj1HGE
# D7511nyPd4ekqTVzaLrXwWVIFdefW85F7DoXK2G5k7NyO1I2TBoFdbjosDff4cOu
# T0ZYPTmZoSvUgP80WUyQPcs0lKk56oFqFsgjtqhmhdGf4FNxxrIMHNhJeZJsHt6I
# aG1MZbVAyOAGXyLZmu6PFxVOckkoMMZMxXV6rMfgmztt8PxRcvzUu5DceovI2xt4
# OQb6b13XwHB2ShUCqM8eQAQyAUMrYdjVMu5gLsO5rpzcZz+2cZmUUGXtjZojLRzY
# m2IyCQIDjR6GlBnLqzD8lKWbW8c7v6bHnhyYZpy1K1I54/dsbia9Hl40v/Ebch5f
# CYfgJQFe5CfkyY+Ya9bItTf/cfcnmOKpKhmFy3r005BzbSVWJ+Ax3AXKuRey5MF7
# itHS2wVYq5Fap/SCS4slL/4u/Doo9DybwLRdTXtqMxUcl7WpyjA5L/W5VhJrDb+a
# F21uAtqaYf+0UHLmGOJRMx3LAf/YvvPQLYO8FmnfVoS6t6V+/B5/eyXPRwmX1mJC
# jLu6hzzX4kR9zZ7lNhOlv0d9vkt5Sg==
# =83AO
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 08 Feb 2023 09:07:01 GMT
# gpg: using RSA key
6E636A7E83F2DD0CFA6E6E370AD2C6396B69CA14
# gpg: issuer "kbastian@mail.uni-paderborn.de"
# gpg: Good signature from "Bastian Koppelmann <kbastian@mail.uni-paderborn.de>" [full]
# Primary key fingerprint: 6E63 6A7E 83F2 DD0C FA6E 6E37 0AD2 C639 6B69 CA14
* tag 'pull-tricore-
20230208' of https://github.com/bkoppelmann/qemu:
tests/tcg/tricore: Add test for ld.h
target/tricore: Fix OPC1_16_SRO_LD_H translation
tests/tcg/tricore: Add LD.BU tests
target/tricore: Fix OPC2_32_BO_LD_BU_PREINC
tests/tcg/tricore: Add OPC2_32_RRRR_DEXTR tests
target/tricore: Fix OPC2_32_RRRR_DEXTR
tests/tcg/tricore: Add tests for RRPW_DEXTR
target/tricore: Fix RRPW_DEXTR
tests/tcg/tricore: Add test for OPC2_32_RCRW_INSERT
target/tricore: Fix OPC2_32_RCRW_INSERT translation
tests/tcg/tricore: Add test for OPC2_32_RCRW_IMASK
target/tricore: Fix OPC2_32_RCRW_IMASK translation
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
#include "exec/exec-all.h"
#include "tcg/tcg.h"
#include "qemu/atomic.h"
-#include "qemu/compiler.h"
#include "qemu/timer.h"
#include "qemu/rcu.h"
#include "exec/log.h"
* to recording, which is what guest systems expect.
*/
+#include "qemu/osdep.h"
#include <poll.h>
#include <sndio.h>
-#include "qemu/osdep.h"
#include "qemu/main-loop.h"
#include "audio.h"
#include "trace.h"
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
-#include <sys/ioctl.h>
#include "qemu/osdep.h"
+#include <sys/ioctl.h>
#include "qom/object_interfaces.h"
#include "qapi/error.h"
#include "sysemu/hostmem.h"
#include "sysemu/runstate.h"
#include "sysemu/tpm_backend.h"
#include "sysemu/tpm_util.h"
-#include "sysemu/runstate.h"
#include "tpm_int.h"
#include "tpm_ioctl.h"
#include "migration/blocker.h"
# define __USE_LINUX_IOCTL_DEFS
#endif
-#include <stdint.h>
-#include <sys/types.h>
#ifndef _WIN32
#include <sys/uio.h>
#include <sys/ioctl.h>
* later. See the COPYING file in the top-level directory.
*/
+#include "qemu/osdep.h"
#include <sys/eventfd.h>
-#include "qemu/osdep.h"
#include "qapi/error.h"
#include "block/export.h"
#include "qemu/error-report.h"
#include "qapi/qmp/qstring.h"
#include "qemu/qemu-print.h"
#include "sysemu/block-backend.h"
-#include "qemu/cutils.h"
BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
BlockDriverState *bs,
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "qemu.h"
/*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+
+#include "qemu/osdep.h"
#include "target_arch.h"
void target_cpu_set_tls(CPUARMState *env, target_ulong newtls)
#ifndef BSD_PROC_H_
#define BSD_PROC_H_
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
#include <sys/resource.h>
-#include <unistd.h>
/* exit(2) */
static inline abi_long do_bsd_exit(void *cpu_env, abi_long arg1)
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "qemu.h"
#include "target_arch_sysarch.h"
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "qemu.h"
/*
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <sys/types.h>
-
#include "qemu/osdep.h"
+
#include "cpu.h"
#include "qemu.h"
#include "qemu/timer.h"
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <sys/types.h>
-#include <sys/time.h>
+#include "qemu/osdep.h"
#include <sys/resource.h>
#include <sys/sysctl.h>
-#include "qemu/osdep.h"
#include "qemu/help-texts.h"
#include "qemu/units.h"
#include "qemu/accel.h"
#ifndef QEMU_H
#define QEMU_H
-#include "qemu/osdep.h"
#include "cpu.h"
#include "qemu/units.h"
#include "exec/cpu_ldst.h"
#include <sys/select.h>
#include <sys/syscall.h>
#include <sys/ioccom.h>
-#include <ctype.h>
#include "qemu.h"
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "qemu.h"
/*
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <sys/types.h>
-
#include "qemu/osdep.h"
+
#include "cpu.h"
#include "qemu.h"
#include "qemu/timer.h"
*
*/
-#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/bswap.h"
#ifndef QEMU_P9ARRAY_H
#define QEMU_P9ARRAY_H
-#include "qemu/compiler.h"
-
/**
* P9Array provides a mechanism to access arrays in common C-style (e.g. by
* square bracket [] operator) in conjunction with reference variables that
#include "qemu/osdep.h"
#ifdef CONFIG_LINUX
#include <linux/limits.h>
-#else
-#include <limits.h>
#endif
#include <glib/gprintf.h>
#include "hw/virtio/virtio.h"
#include "sysemu/xen.h"
#include "qapi/error.h"
#include "qemu/range.h"
-#include "hw/acpi/pcihp.h"
#include "hw/acpi/cpu_hotplug.h"
#include "hw/acpi/cpu.h"
#include "hw/hotplug.h"
#include "net/net.h"
#include "qemu/cutils.h"
#include "qemu/datadir.h"
-#include "net/net.h"
static uint64_t cpu_alpha_superpage_to_phys(void *opaque, uint64_t addr)
{
#include "qemu/units.h"
#include "qemu/option.h"
#include "monitor/qdev.h"
-#include "qapi/error.h"
#include "hw/sysbus.h"
#include "hw/arm/boot.h"
#include "hw/arm/primecell.h"
#include "hw/misc/unimp.h"
#include "hw/arm/xlnx-versal.h"
#include "qemu/log.h"
-#include "hw/sysbus.h"
#define XLNX_VERSAL_ACPU_TYPE ARM_CPU_TYPE_NAME("cortex-a72")
#define XLNX_VERSAL_RCPU_TYPE ARM_CPU_TYPE_NAME("cortex-r5f")
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/bitops.h"
-#include "qemu/error-report.h"
#include "qemu/host-utils.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "exec/confidential-guest-support.h"
#include "hw/virtio/virtio.h"
#include "hw/virtio/virtio-pci.h"
-#include "qom/object_interfaces.h"
GlobalProperty hw_compat_7_2[] = {
{ "virtio-mem", "x-early-migration", "false" },
#include "exec/ramblock.h"
#include "sysemu/hostmem.h"
#include <sys/ioctl.h>
-#include <fcntl.h>
#include <linux/memfd.h>
#include "qemu/memfd.h"
#include "standard-headers/linux/udmabuf.h"
#include "qapi/error.h"
#include "net/net.h"
#include "qemu/log.h"
-#include "net/net.h"
#define MIN_SEABIOS_HPPA_VERSION 6 /* require at least this fw version */
* See the COPYING file in the top-level directory.
*/
-#include "qemu/ctype.h"
#include "qemu/osdep.h"
+#include "qemu/ctype.h"
#include "qemu/error-report.h"
#include "qemu/main-loop.h"
#include "qemu/sockets.h"
#include "qemu/osdep.h"
#include <math.h>
-#include <string.h>
#include "hw/i2c/pmbus_device.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "hw/acpi/hmat.h"
#include "hw/acpi/viot.h"
-#include "hw/acpi/cxl.h"
#include CONFIG_DEVICES
*/
#include "qemu/osdep.h"
-#include "qemu/log.h"
#include "hw/hw.h"
#include "audio/audio.h"
#include "qemu/timer.h"
/* Supported chipsets: */
#include "hw/pci-host/ls7a.h"
#include "hw/loongarch/virt.h"
-#include "hw/acpi/aml-build.h"
#include "hw/acpi/utils.h"
#include "hw/acpi/pci.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "hw/misc/macio/cuda.h"
-#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/runstate.h"
#include "sysemu/rtc.h"
#include "migration/vmstate.h"
#include "hw/irq.h"
#include "hw/misc/macio/pmu.h"
-#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/runstate.h"
#include "sysemu/rtc.h"
#include "net/net.h"
#include "net/checksum.h"
-#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "hw/stream.h"
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
#include "hw/intc/ppc-uic.h"
-#include "hw/qdev-properties.h"
-#include "qapi/error.h"
#include "trace.h"
/*****************************************************************************/
#include "qemu/osdep.h"
#include "qemu/units.h"
-#include "qemu/error-report.h"
#include "qemu/datadir.h"
#include "qemu/error-report.h"
#include "net/net.h"
#include "hw/ppc/spapr_drc.h"
#include "qom/object.h"
#include "migration/vmstate.h"
-#include "qapi/error.h"
#include "qapi/qapi-events-qdev.h"
#include "qapi/visitor.h"
#include "qemu/error-report.h"
*/
#include "qemu/osdep.h"
-#include "qemu/cutils.h"
#include "hw/pci/pci.h"
#include "cpu.h"
#include "qemu/cutils.h"
#include "hw/remote/iohub.h"
#include "hw/remote/iommu.h"
#include "hw/qdev-core.h"
-#include "hw/remote/iommu.h"
#include "hw/remote/vfio-user-obj.h"
#include "hw/pci/msi.h"
#include "qemu/osdep.h"
-#include "qemu/compiler.h"
#include "qemu/int128.h"
#include "qemu/range.h"
#include "exec/memory.h"
#include "qemu/error-report.h"
#include "qemu/notify.h"
#include "qom/object_interfaces.h"
-#include "hw/qdev-core.h"
#include "io/channel.h"
#include "hw/qdev-core.h"
#include "hw/remote/machine.h"
#include "qapi/error.h"
#include "qapi/qapi-events-misc.h"
#include "qapi/visitor.h"
-#include "hw/rtc/mc146818rtc_regs.h"
//#define DEBUG_CMOS
//#define DEBUG_COALESCED
#include "hw/qdev-properties.h"
#include "hw/virtio/virtio-serial.h"
#include "virtio-ccw.h"
-#include "hw/virtio/virtio-serial.h"
#define TYPE_VIRTIO_SERIAL_CCW "virtio-serial-ccw"
OBJECT_DECLARE_SIMPLE_TYPE(VirtioSerialCcw, VIRTIO_SERIAL_CCW)
*/
#include "qemu/osdep.h"
-#include <string.h>
#include "hw/i2c/pmbus_device.h"
#include "hw/irq.h"
#include "migration/vmstate.h"
*/
#include "qemu/osdep.h"
-#include "qemu/typedefs.h"
#include "qapi/error.h"
#include "hw/usb.h"
#include "hw/usb/desc.h"
*/
#include "qemu/osdep.h"
-#include "qemu/typedefs.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "hw/usb.h"
#ifndef GRAPH_LOCK_H
#define GRAPH_LOCK_H
-#include "qemu/osdep.h"
#include "qemu/clang-tsa.h"
/**
#ifndef BLOCK_WRITE_THRESHOLD_H
#define BLOCK_WRITE_THRESHOLD_H
-#include "qemu/typedefs.h"
-
/*
* bdrv_write_threshold_set:
*
#include "hw/timer/imx_gpt.h"
#include "hw/timer/imx_epit.h"
#include "hw/i2c/imx_i2c.h"
-#include "hw/gpio/imx_gpio.h"
#include "hw/sd/sdhci.h"
#include "hw/ssi/imx_spi.h"
#include "hw/net/imx_fec.h"
#include "hw/timer/imx_gpt.h"
#include "hw/timer/imx_epit.h"
#include "hw/i2c/imx_i2c.h"
-#include "hw/gpio/imx_gpio.h"
#include "hw/sd/sdhci.h"
#include "hw/ssi/imx_spi.h"
#include "hw/net/imx_fec.h"
#define CXL2_COMPONENT_CM_REGION_SIZE 0x1000
#define CXL2_COMPONENT_BLOCK_SIZE 0x10000
-#include "qemu/compiler.h"
#include "qemu/range.h"
-#include "qemu/typedefs.h"
#include "hw/cxl/cxl_cdat.h"
#include "hw/register.h"
#include "qapi/error.h"
* COPYING file in the top-level directory.
*/
-#include "qemu/osdep.h"
#include "hw/cxl/cxl.h"
#include "hw/boards.h"
#ifndef CXL_PCI_H
#define CXL_PCI_H
-#include "qemu/compiler.h"
#define CXL_VENDOR_ID 0x1e98
#ifndef HW_PL050_H
#define HW_PL050_H
-#include "qemu/osdep.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/input/ps2.h"
#include "hw/sysbus.h"
-#include <stdint.h>
-
#define TYPE_ASPEED_LPC "aspeed.lpc"
#define ASPEED_LPC(obj) OBJECT_CHECK(AspeedLPCState, (obj), TYPE_ASPEED_LPC)
#define PCIE_DOE_H
#include "qemu/range.h"
-#include "qemu/typedefs.h"
#include "hw/register.h"
/*
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/boards.h"
#include "sysemu/sysemu.h"
#ifndef QEMU_ASYNC_TEARDOWN_H
#define QEMU_ASYNC_TEARDOWN_H
-#include "config-host.h"
-
#ifdef CONFIG_LINUX
void init_async_teardown(void);
#endif
#include "qom/object.h"
#include "chardev/char.h"
#include "qemu/notify.h"
-#include "qemu/typedefs.h"
/* glib/gio 2.68 */
#define DBUS_METHOD_INVOCATION_HANDLED TRUE
#ifndef HOST_UTILS_H
#define HOST_UTILS_H
-#include "qemu/compiler.h"
#include "qemu/bswap.h"
#include "qemu/int128.h"
#ifdef CONFIG_LINUX
-#include "qemu/osdep.h"
#include "exec/hwaddr.h"
#include <linux/userfaultfd.h>
#ifndef ACCEL_BLOCKER_H
#define ACCEL_BLOCKER_H
-#include "qemu/osdep.h"
#include "sysemu/cpus.h"
extern void accel_blocker_init(void);
#include "qom/object.h"
#include "block/aio.h"
-#include "qemu/typedefs.h"
#define TYPE_EVENT_LOOP_BASE "event-loop-base"
OBJECT_DECLARE_TYPE(EventLoopBase, EventLoopBaseClass,
*/
#include "qemu/osdep.h"
-#include "qemu/rcu.h"
#include "qemu/madvise.h"
#include "exec/target_page.h"
#include "migration.h"
#include "hw/boards.h"
#include "exec/ramblock.h"
#include "socket.h"
-#include "qemu-file.h"
#include "yank_functions.h"
#include "tls.h"
#include "qemu/userfaultfd.h"
#ifndef VMNET_INT_H
#define VMNET_INT_H
-#include "qemu/osdep.h"
#include "vmnet_int.h"
#include "clients.h"
#else
#include <net/ethernet.h>
#endif
-#include <sys/types.h>
#ifdef CONFIG_SOLARIS
#include <sys/sockio.h>
#endif
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
-#include "cutils.h"
+#include "qemu/osdep.h"
+#include "cutils.h"
#include "qapi/error.h"
/**
#ifndef CUTILS_H_
#define CUTILS_H_
-#include "qemu/osdep.h"
-
int qga_open_cloexec(const char *name, int flags, mode_t mode);
#endif /* CUTILS_H_ */
check_mode: yes
register: centos_stream_8
+ - name: Enable EPEL repo on CentOS Stream 8
+ dnf:
+ name:
+ - epel-release
+ state: present
+ when:
+ - centos_stream_8
+
- name: Enable PowerTools repo on CentOS Stream 8
ini_file:
path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo
option: enabled
value: "1"
when:
- - ansible_facts['distribution'] == 'CentOS'
- - ansible_facts['distribution_major_version'] == '8'
- centos_stream_8
- name: Install basic packages to build QEMU on CentOS Stream 8
dnf:
name:
+ - bzip2
+ - bzip2-devel
+ - capstone-devel
+ - dbus-daemon
- device-mapper-multipath-devel
+ - diffutils
+ - gcc
+ - gcc-c++
+ - genisoimage
+ - gettext
+ - git
+ - glib2-devel
- glusterfs-api-devel
- gnutls-devel
+ - libaio-devel
- libcap-ng-devel
- libcurl-devel
+ - libepoxy-devel
- libfdt-devel
+ - libgcrypt-devel
- libiscsi-devel
- libpmem-devel
- librados-devel
- libseccomp-devel
- libssh-devel
- libxkbcommon-devel
+ - lzo-devel
+ - make
+ - mesa-libEGL-devel
+ - nettle-devel
- ninja-build
+ - nmap-ncat
- numactl-devel
+ - pixman-devel
+ - python38
- python3-sphinx
+ - rdma-core-devel
- redhat-rpm-config
- snappy-devel
+ - spice-glib-devel
- spice-server-devel
- systemd-devel
+ - systemtap-sdt-devel
+ - tar
+ - zlib-devel
state: present
when:
- - ansible_facts['distribution'] == 'CentOS'
- - ansible_facts['distribution_major_version'] == '8'
- centos_stream_8
# that patches adding downstream specific devices are not available.
#
../configure \
+--python=/usr/bin/python3.8 \
--prefix="/usr" \
--libdir="/usr/lib64" \
--datadir="/usr/share" \
- libbrlapi-dev
- libbz2-dev
- libcacard-dev
+ - libcapstone-dev
- libcap-ng-dev
- libcurl4-gnutls-dev
- libdrm-dev
- ansible_facts['distribution_version'] == '20.04'
- ansible_facts['architecture'] == 'aarch64'
+ - name: Enable EPEL repo on EL8
+ dnf:
+ name:
+ - epel-release
+ state: present
+ when:
+ - ansible_facts['distribution_file_variety'] in ['RedHat', 'CentOS']
+ - ansible_facts['distribution_major_version'] == '8'
+
+ - name: Enable PowerTools repo on CentOS 8
+ ini_file:
+ path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo
+ section: powertools
+ option: enabled
+ value: "1"
+ when:
+ - ansible_facts['distribution_file_variety'] == 'CentOS'
+ - ansible_facts['distribution_major_version'] == '8'
+
- name: Install basic packages to build QEMU on EL8
dnf:
# This list of packages start with tests/docker/dockerfiles/centos8.docker
name:
- bzip2
- bzip2-devel
+ - capstone-devel
- dbus-daemon
+ - device-mapper-multipath-devel
- diffutils
- gcc
- gcc-c++
- gettext
- git
- glib2-devel
+ - glusterfs-api-devel
+ - gnutls-devel
- libaio-devel
+ - libcap-ng-devel
+ - libcurl-devel
- libepoxy-devel
+ - libfdt-devel
- libgcrypt-devel
+ - libiscsi-devel
+ - libpmem-devel
+ - librados-devel
+ - librbd-devel
+ - libseccomp-devel
+ - libssh-devel
+ - libxkbcommon-devel
- lzo-devel
- make
- mesa-libEGL-devel
- nettle-devel
- ninja-build
- nmap-ncat
+ - numactl-devel
- pixman-devel
- - python36
+ - python38
+ - python3-sphinx
- rdma-core-devel
+ - redhat-rpm-config
+ - snappy-devel
- spice-glib-devel
+ - systemd-devel
- systemtap-sdt-devel
- tar
- zlib-devel
state: present
when:
- - ansible_facts['distribution_file_variety'] == 'RedHat'
+ - ansible_facts['distribution_file_variety'] in ['RedHat', 'CentOS']
- ansible_facts['distribution_version'] == '8'
- name: Install packages only available on x86 and aarch64
# Spice server not available in ppc64le
name:
- spice-server
+ - spice-server-devel
state: present
when:
- - ansible_facts['distribution_file_variety'] == 'RedHat'
+ - ansible_facts['distribution_file_variety'] in ['RedHat', 'CentOS']
- ansible_facts['distribution_version'] == '8'
- ansible_facts['architecture'] == 'aarch64' or ansible_facts['architecture'] == 'x86_64'
+
+ - name: Check whether the Python runtime version is managed by alternatives
+ stat:
+ path: /etc/alternatives/python3
+ register: python3
+
+ - name: Set default Python runtime to 3.8 on EL8
+ command: alternatives --set python3 /usr/bin/python3.8
+ when:
+ - ansible_facts['distribution_file_variety'] in ['RedHat', 'CentOS']
+ - ansible_facts['distribution_version'] == '8'
+ - python3.stat.islnk and python3.stat.lnk_target != '/usr/bin/python3.8'
)
EOT
+files=
for f in "$@"; do
+ if [ -L "$f" ]; then
+ echo "SKIPPING $f (symbolic link)"
+ continue
+ fi
case "$f" in
*.c.inc)
# These aren't standalone C source files
continue
;;
esac
+ files="$files $f"
if [ "$MODE" = "c" ]; then
# First, use Coccinelle to add qemu/osdep.h before the first existing include
done
-if [ "$DUPHEAD" = "yes" ]; then
- egrep "^[[:space:]]*#[[:space:]]*include" "$@" | tr -d '[:blank:]' \
- | sort | uniq -c | awk '{if ($1 > 1) print $0}'
- if [ $? -eq 0 ]; then
+if [ "$DUPHEAD" = "yes" ] && [ -n "$files" ]; then
+ if egrep "^[[:space:]]*#[[:space:]]*include" $files | tr -d '[:blank:]' \
+ | sort | uniq -c | grep -v '^ *1 '; then
echo "Found duplicate header file includes. Please check the above files manually."
exit 1
fi
fi
if [ "$GIT" = "yes" ]; then
- git add -- "$@"
+ git add -- $files
git commit --signoff -F - <<EOF
$GITSUBJ: Clean up includes
-Clean up includes so that osdep.h is included first and headers
-which it implies are not included manually.
-
This commit was created with scripts/clean-includes.
+All .c should include qemu/osdep.h first. The script performs three
+related cleanups:
+
+* Ensure .c files include qemu/osdep.h first.
+* Including it in a .h is redundant, since the .c already includes
+ it. Drop such inclusions.
+* Likewise, including headers qemu/osdep.h includes is redundant.
+ Drop these, too.
+
EOF
fi
*/
#include "qemu/osdep.h"
-#include "qapi/error.h"
#include "qemu/main-loop.h"
#include "qapi/qapi-commands-migration.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qapi-commands-run-state.h"
#include "qapi/qapi-events-run-state.h"
#include "qemu/error-report.h"
-#include "qemu/log.h"
#include "qemu/job.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "qapi/qapi-commands-misc.h"
#include "qapi/qapi-visit-qom.h"
#include "qapi/qapi-commands-ui.h"
-#include "qapi/qmp/qdict.h"
#include "block/qdict.h"
#include "qapi/qmp/qerror.h"
#include "sysemu/iothread.h"
#include "qemu/guest-random.h"
#include "qemu/keyval.h"
-#include "config-host.h"
-
#define MAX_VIRTIO_CONSOLES 1
typedef struct BlockdevOptionsQueueEntry {
#ifndef HEXAGON_HEX_ARCH_TYPES_H
#define HEXAGON_HEX_ARCH_TYPES_H
-#include "qemu/osdep.h"
#include "mmvec/mmvec.h"
#include "qemu/int128.h"
#ifndef HEXAGON_MMVEC_MACROS_H
#define HEXAGON_MMVEC_MACROS_H
-#include "qemu/osdep.h"
#include "qemu/host-utils.h"
#include "arch.h"
#include "mmvec/system_ext_mmvec.h"
#include "exec/helper-proto.h"
#include "exec/helper-gen.h"
-#include "exec/translator.h"
#include "exec/log.h"
#include "qemu/qemu-print.h"
#include "fpu/softfloat.h"
#include "semihosting/semihost.h"
#include "trace.h"
-#include "exec/translator.h"
#include "exec/log.h"
#include "qemu/qemu-print.h"
#include "fpu_helper.h"
};
#endif
-#include "exec/gen-icount.h"
-
/* generate intermediate code for basic block 'tb'. */
static void nios2_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
{
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "qemu/osdep.h"
#include "qemu/log.h"
#include "cpu.h"
#include "qemu/main-loop.h"
#include "exec/cpu_ldst.h"
#include "tcg/tcg-op.h"
#include "tcg/tcg-ldst.h"
-#include "qemu/compiler.h"
#include <ffi.h>
*/
#include "qemu/osdep.h"
-#include "qemu/units.h"
#include "qemu/cutils.h"
#include "qemu/units.h"
#include "qapi/error.h"
#include "qemu/module.h"
-#include <unistd.h>
#include <sys/syscall.h>
static void test_seccomp_helper(const char *args, bool killed,
#include <math.h>
#include "trace.h"
-#include "qemu/cutils.h"
#include "ui/input.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "qapi/error.h"
#include "ui/console.h"
-#include <fcntl.h>
#include <sys/ioctl.h>
int udmabuf_fd(void)
* option) any later version. See the COPYING file in the top-level directory.
*
*/
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
+
+#include "qemu/osdep.h"
#include <dirent.h>
#include <sys/prctl.h>
-#include <signal.h>
#include <sched.h>
-#include <unistd.h>
-#include "qemu/osdep.h"
#include "qemu/async-teardown.h"
#ifdef _SC_THREAD_STACK_MIN
#include "block/thread-pool.h"
#include "qemu/error-report.h"
#include "qemu/queue.h"
-#include "qemu/compiler.h"
#include "qom/object.h"
#ifndef _WIN32
#include "qemu/thread.h"
#include <libgen.h>
#include "qemu/cutils.h"
-#include "qemu/compiler.h"
#include "qemu/units.h"
#include "qemu/thread-context.h"
#ifdef __FreeBSD__
#include <sys/thr.h>
-#include <sys/types.h>
#include <sys/user.h>
#include <libutil.h>
#endif
#include "qemu/mmap-alloc.h"
-#ifdef CONFIG_DEBUG_STACK_USAGE
-#include "qemu/error-report.h"
-#endif
-
#define MAX_MEM_PREALLOC_THREAD_COUNT 16
struct MemsetThread;