From patchwork Wed Jan 11 16:31:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 641259 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp3349443pvb; Wed, 11 Jan 2023 08:35:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXvxdhR5jWWN7s/I+9jF/IrXXQ5Vjesuz6yx+iOdg5Djzaj03dansI3xfHmteynLlqg4V+vl X-Received: by 2002:a05:622a:2609:b0:3a8:28b2:af69 with SMTP id ci9-20020a05622a260900b003a828b2af69mr106328765qtb.58.1673454910516; Wed, 11 Jan 2023 08:35:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673454910; cv=none; d=google.com; s=arc-20160816; b=hBL0gqEJmWRnrxOzwQU1QRXPKas3q2NR8qrTPM5ebgXGK5CoqM9ieVAisLXGw2pKtn ogJ/wfFWUtCHXBsgc/FwJ8FiaZs6+aaTwuWjxaTVa3HJPuhMpUHBdn0B/+A2ZC6XhqRr 26V6W5IMtach+SdtgailHFmH/ZFq7M2W5hCUKPOG1O3pQK2nilTG2LPK98Nl+f3R343M UhRfx26by+dv7/V7xJKdxZpOnNWz9tH6+k1JB2IpGs6RCKEY4i+/+0ZeuowlMGWiHblt gpDCbB+whJGCBlWrkWnEEL1rHWnzOlUrgCKzDiU8l0MhE3tUsF5nFBZqOYdasLXLrZG2 Lopg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=v80+rMsZqzMpEgzB1XIdOA1qaUJSrJqpOPE+0MZTyas=; b=wLeXl1OYoFRclRp4Z9i6xsShQ8bK1uFkQ558IHgwqZxKtDytrTsdOLuftQb4rHj7M4 aAT83/ktvXOjKmOmXYU32yKHmBgxobLTBJkQ+0podiOEMIh90TwD1dPAfIhiRi+e3UoT k/gpvFlgkOlMEgU88Qx/9NQNpvbZw+RmBTd2mH1CAhGDWbJ2v5eRE9RpVSlQDsKRpKQJ DSGG3ZNxDbveMPWUjyVXLtGuqUssmGuRdyJTBzZ3HJ9IIpe+lSYSML3b7rfEKvvwv5e5 Omw3yxgzDbMwfayBBiNZ9Zh9xsCHcEQlKYLUyyV4+GEmCYUxUtYoXjZC3DeAAX4R5XSD QV0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MyHtzkjy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTP id c11-20020ac853cb000000b003a7f3c46cffsi8335409qtq.716.2023.01.11.08.35.10 for ; Wed, 11 Jan 2023 08:35:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MyHtzkjy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFe1u-0001dY-Qt; Wed, 11 Jan 2023 11:32:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pFe1Y-0001R1-Hf for qemu-devel@nongnu.org; Wed, 11 Jan 2023 11:32:25 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFe1W-0006FQ-LN for qemu-devel@nongnu.org; Wed, 11 Jan 2023 11:32:24 -0500 Received: by mail-wm1-x32e.google.com with SMTP id p3-20020a05600c1d8300b003d9ee5f125bso8310183wms.4 for ; Wed, 11 Jan 2023 08:32:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=v80+rMsZqzMpEgzB1XIdOA1qaUJSrJqpOPE+0MZTyas=; b=MyHtzkjyygiTCAVcn3ep3+8nAvsBulZumExrDF907CTi2vaY1xO+shI+Yk9K2yVV8c mHeUSPZ/jJt++BFhcl9Q/1tGRC/Xi2D5FLeekf5g/OGMle01D5BwphGfCdM8OgCWwwYE imlGElgWpm+mPOWoEfzDIr2swi3F99CvfLAB1imM5/BcRNnOq3srZq9SseFHIdnig8ow Cx/turtlMNkIMyn3jCK4opXREwctewZpevXJJiNuTOOitXyfrTT2f1dUU6qBt0WEASD7 jTTsKyOReRefshGcXBFT+bpgMmspko5gNAFTMEVEy76wAIvCDwel/QMDRK2gRuUScRmB JUNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v80+rMsZqzMpEgzB1XIdOA1qaUJSrJqpOPE+0MZTyas=; b=VI3VwuX4p8NlZhxEgWce6+JMvo4zO3lqQVK6n1NakNCYmmrJM3acpBZ8sUJYdvy9fl HoWXvymE1tjrop3dZ8K+SX/jPuF3AvrkqnTOFos35c98hI1IYFqRIaBTcCIt9dXX774x dj9fcEaO4byfuTpBXaYJTg8+B4dBTcO+U3/XkFWnLjjuDanNY3PKJAUsZP9xyICOtqfX hPqNGfA7wil2/X9nbgxr3yZCWUBGsVydfBtzWM6zdGH4tZXvvSMlWP2MkPzbIswkGjmI FwEf9OUf1QFarEGlt4O29KI7UpF4Zpuk3aF0loVWWm/ePlnzq/yLnLmTzoHaReotCGzn gvQg== X-Gm-Message-State: AFqh2krwUST1ukA/hzXVMI6UKYvVOnbnr/K7McadNbhYlcB4l6S4EqDh H9vHRl9doOjEIxxyMcitNTrRw5pghqb2Ymbw X-Received: by 2002:a05:600c:1e24:b0:3d0:8643:caf1 with SMTP id ay36-20020a05600c1e2400b003d08643caf1mr53781460wmb.16.1673454740806; Wed, 11 Jan 2023 08:32:20 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id z12-20020a05600c0a0c00b003cfa81e2eb4sm18720569wmp.38.2023.01.11.08.32.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Jan 2023 08:32:20 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Ryo ONODERA , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Ira Weiny , Paolo Bonzini , Kamil Rytarowski , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Reinoud Zandijk , Jonathan Cameron , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PATCH v3 6/6] qemu/bswap: Use compiler __builtin_bswap() on NetBSD Date: Wed, 11 Jan 2023 17:31:47 +0100 Message-Id: <20230111163147.71761-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230111163147.71761-1-philmd@linaro.org> References: <20230111163147.71761-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Since commit efc6c070aca ("configure: Add a test for the minimum compiler version") the minimum compiler version required for GCC is 4.8, which supports __builtin_bswap(). Remove the NetBSD specific ifdef'ry. This reverts commit 1360677cfe3ca8f945fa1de77823df21a77e4500 ("makes NetBSD use the native bswap functions"). Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/bswap.h | 11 ----------- meson.build | 4 ---- 2 files changed, 15 deletions(-) diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index 32d5cdec27..3cbe52246b 100644 --- a/include/qemu/bswap.h +++ b/include/qemu/bswap.h @@ -1,27 +1,16 @@ #ifndef BSWAP_H #define BSWAP_H -#ifdef CONFIG_MACHINE_BSWAP_H -# include -# include -# else -#define BSWAP_FROM_FALLBACKS -#endif /* ! CONFIG_MACHINE_BSWAP_H */ - #ifdef __cplusplus extern "C" { #endif -#ifdef BSWAP_FROM_FALLBACKS #undef bswap16 #define bswap16(_x) __builtin_bswap16(_x) #undef bswap32 #define bswap32(_x) __builtin_bswap32(_x) #undef bswap64 #define bswap64(_x) __builtin_bswap64(_x) -#endif - -#undef BSWAP_FROM_FALLBACKS static inline void bswap16s(uint16_t *s) { diff --git a/meson.build b/meson.build index 697059d2c8..f2663cfc32 100644 --- a/meson.build +++ b/meson.build @@ -2023,10 +2023,6 @@ config_host_data.set('CONFIG_INOTIFY', cc.has_header_symbol('sys/inotify.h', 'inotify_init')) config_host_data.set('CONFIG_INOTIFY1', cc.has_header_symbol('sys/inotify.h', 'inotify_init1')) -config_host_data.set('CONFIG_MACHINE_BSWAP_H', - cc.has_header_symbol('machine/bswap.h', 'bswap32', - prefix: '''#include - #include ''')) config_host_data.set('CONFIG_PRCTL_PR_SET_TIMERSLACK', cc.has_header_symbol('sys/prctl.h', 'PR_SET_TIMERSLACK')) config_host_data.set('CONFIG_RTNETLINK',