From patchwork Sat Apr 17 19:42:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 12209889 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8E5FC433B4 for ; Sat, 17 Apr 2021 19:43:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5821B61210 for ; Sat, 17 Apr 2021 19:43:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5821B61210 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lXqqs-0001MT-GW for qemu-devel@archiver.kernel.org; Sat, 17 Apr 2021 15:43:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39410) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lXqpb-0007vV-L1 for qemu-devel@nongnu.org; Sat, 17 Apr 2021 15:42:15 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:46709) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lXqpX-0008C1-Iy for qemu-devel@nongnu.org; Sat, 17 Apr 2021 15:42:15 -0400 Received: by mail-wr1-x42b.google.com with SMTP id c15so20997969wro.13 for ; Sat, 17 Apr 2021 12:42:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X+yX84qon75IWnfGBV9DoIC7IAiy08A30WrHnxDcNWA=; b=mDbxqx9JoIiNtPO0HHXqoQjuCUGAk4XWnDx81AURiK98JIvzmcGbjzojgLh/wndUGk T++17PQRxN90walHNLvZKA6EjtKTa/KtlXXRpnjPWdZtyZ89pQAWeZg7Z6j4RPFNaAlb //gp4dVr1/zj2SKj4mf+RbvB/Tvh+3x/mi5/VBPFOHAr4KZxBK1xryDBJWjrI8YljZ31 azBboIErl3ZBoAvLlsmZwNAyH5McXZFSgkz1MYOBth2A9UuJymEaGkyN5YNGHrpviyi/ KGGYMWw85rHzMswwoqJgRG/mcpR+pGx7BDQuaO9iuKfPHy5oYCTxCtZVr6gDvXhI5nrx YPhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X+yX84qon75IWnfGBV9DoIC7IAiy08A30WrHnxDcNWA=; b=sVEJeY/L8Y//VOeQZn7o7pYoaJkpgYzibtA0DeigcFhUX46guYXZYfypdbtVKn33fB TpQaf+dm/I9cR0rtYK7xsEU7Bcni0e/F/4GPswtGj6RXcj8v5ycOsNHRTceWcQQaLquF CWtuRVWGSrFr1WC53r4jKadrWjscByRdHICwEtUcrEq/9LEaqEO2a0XCwLeEWQQUqrNU NgXAS0ThdyYXnEzLuMzoO4TKCJO82jMdFYUven65frdTnU/FmE8y2sgF5R3Htqfi3yhc cfQkkMx2PE3ZBMjDU7q+XzxPcUMTKseq9uISaDrQFyKv0HSWVqAt50cN0eO/ubiL9MQc 7OyQ== X-Gm-Message-State: AOAM530XMEOk+Qdorpih+wQxOqrjyfCG0SYOaDFoKODwf7grk62tOIFC Y1MmaR/joCyzI/eImTHqXvt8khtn/ivnjoYG X-Google-Smtp-Source: ABdhPJwjrbc+5Dy0dnoaaNo0SfncUHuQC02KKga6dqmIbldFdoAFzRfFKLiYZdS/HZ+GF8Qkiu6n8w== X-Received: by 2002:a5d:4c88:: with SMTP id z8mr5692000wrs.154.1618688530097; Sat, 17 Apr 2021 12:42:10 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id c12sm17304374wro.6.2021.04.17.12.42.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Apr 2021 12:42:09 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 3/7] include/qemu/osdep.h: Move system includes to top Date: Sat, 17 Apr 2021 20:42:01 +0100 Message-Id: <20210417194205.17057-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210417194205.17057-1-peter.maydell@linaro.org> References: <20210417194205.17057-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Mostly osdep.h puts the system includes at the top of the file; but there are a couple of exceptions where we include a system header halfway through the file. Move these up to the top with the rest so that all the system headers we include are included before we include os-win32.h or os-posix.h. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Acked-by: Paolo Bonzini Reviewed-by: Richard Henderson Message-id: 20210416135543.20382-4-peter.maydell@linaro.org Message-id: 20210414184343.26235-1-peter.maydell@linaro.org --- include/qemu/osdep.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 6d8562eaf40..cb2a07e472e 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -104,6 +104,15 @@ QEMU_EXTERN_C int daemon(int, int); #include #include +#ifdef CONFIG_IOVEC +#include +#endif + +#if defined(__linux__) && defined(__sparc__) +/* The SPARC definition of QEMU_VMALLOC_ALIGN needs SHMLBA */ +#include +#endif + #ifndef _WIN32 #include #else @@ -111,6 +120,10 @@ QEMU_EXTERN_C int daemon(int, int); #define WEXITSTATUS(x) (x) #endif +#ifdef __APPLE__ +#include +#endif + /* * This is somewhat like a system header; it must be outside any extern "C" * block because it includes system headers itself, including glib.h, @@ -130,10 +143,6 @@ extern "C" { #include "sysemu/os-posix.h" #endif -#ifdef __APPLE__ -#include -#endif - #include "qemu/typedefs.h" /* @@ -469,7 +478,6 @@ void qemu_anon_ram_free(void *ptr, size_t size); /* Use 1 MiB (segment size) alignment so gmap can be used by KVM. */ # define QEMU_VMALLOC_ALIGN (256 * 4096) #elif defined(__linux__) && defined(__sparc__) -#include # define QEMU_VMALLOC_ALIGN MAX(qemu_real_host_page_size, SHMLBA) #else # define QEMU_VMALLOC_ALIGN qemu_real_host_page_size @@ -549,8 +557,6 @@ struct iovec { ssize_t readv(int fd, const struct iovec *iov, int iov_cnt); ssize_t writev(int fd, const struct iovec *iov, int iov_cnt); -#else -#include #endif #ifdef _WIN32