From patchwork Fri Jul 7 20:40:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 700048 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp4065824wrs; Fri, 7 Jul 2023 13:43:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlG991SpQ1+WAc3hziOVfBciNUBQoL9RMNXctPYlUnI6DBrak0XiQ2OeYSy7jKsNCSno0ZWw X-Received: by 2002:ac8:5fc5:0:b0:3f5:31c9:2578 with SMTP id k5-20020ac85fc5000000b003f531c92578mr7924034qta.67.1688762610664; Fri, 07 Jul 2023 13:43:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688762610; cv=none; d=google.com; s=arc-20160816; b=Xvz11lA2tBf5o+pMPFYALtWBlbXC01KZKzxprlXWoDLUBi5A7tiG7NenCSLGvkHvGf H8ZhRmmV77BWCMSIdYJnKGSkPkBNR8QN/HC6BzM6hJ71Hc1aFji8xhywzpQBTPCmJGd0 tn9jTGBjQiv6Ty7H2NdEUCSDjkGIzAlafTu2KxcN/5E2yC212J5WOi4U/PSh3H4mDNw7 d0irQCw/wX04PDY7sAs0J43EsWI3nOaF9CcVJFP5ftWOhzyfQOZOGK98TmyA4foWDZ7z q4b7Atofubwsa/j9MlEZdSpdqbkW4h7AjnKkPAIaPjIvmVjck+94iWF0HsKcaryDs3lQ olGg== 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=mY6tTuYQJnWBze2KXsMQEugLPFruzX0150L5BphLiXg=; fh=1lFznT7T8SaB6qvJwL+l8YZVr291z45CfOlDlCUV7JU=; b=G+LFJ/sTpU3eo1plQIbDU+sykN5aT5r1XaTA0YGKdxJTl8IFF9T0vHdqdWS+WPOj2o bcNsiO09ICiSKFkSSZmCI7CU8+JUWKAUgJZqSv5PR0Pn5PQwkcOy7/9po2MnzdTU98lJ sR346Je9daPSqrug0DVq8cC7frEUzdFXNysTWChg8gS797Wp4UmDkjr+Tfe3QGHs/X84 HPcaxGL/SCC2jRnHlF5+B3Zg4iQD3sUc433/D58u1yIO9OOmxPS4jb6hROviX/80A3HQ iUF3F5BzN1hDpxNgIu2z/w9xA456BnNcYYEbY7ffaT4nzK29gwgxwTQZfwtBtPl2NqFp O9Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gGKHZ8Vm; 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 ESMTPS id s34-20020a05622a1aa200b00403489b9d8fsi3016425qtc.472.2023.07.07.13.43.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Jul 2023 13:43:30 -0700 (PDT) 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=gGKHZ8Vm; 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 1qHsGJ-0004kr-Hu; Fri, 07 Jul 2023 16:41:07 -0400 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 1qHsGG-0004j4-9b for qemu-devel@nongnu.org; Fri, 07 Jul 2023 16:41:04 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qHsGE-0004dL-FG for qemu-devel@nongnu.org; Fri, 07 Jul 2023 16:41:03 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3fbca8935bfso25736075e9.3 for ; Fri, 07 Jul 2023 13:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688762461; x=1691354461; 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=mY6tTuYQJnWBze2KXsMQEugLPFruzX0150L5BphLiXg=; b=gGKHZ8VmW2tSaGVmW6c99QAmNI24HmOYeTjAJDacfVqMLr5LtBR+yEegcqGOTv07Fb ZyqUQcc9EwKeBqg7q4MgelxJ14cju6WcGvl661hx0zq6fkYWhMWhp6aj5AtyNB7WssmZ eIz93QDUb6A30tQIDaz1g45AANR7AAia8cGwtQVOlY6v0nOW/suHPsV+bfbb0/JhCv/z 3PDXKDIi7Ib4cZivuwwUbwG7EGEG7h+/lG55C+MBZ15nJ/26i4P6I2Wpl2ZKGy/AUzbR zgd2VXvq/Oh+aJ/eIMnSfHWxYneFerAJm6KcQuJWpqI4vJWY3Ogbuuw4kc09JD/KxbCm 66fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688762461; x=1691354461; 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=mY6tTuYQJnWBze2KXsMQEugLPFruzX0150L5BphLiXg=; b=a+FSQVcZ3mj7j7CnJQB/5hG7J4S4cVNQQeZxpW+aHnuRwMmgHd76l/Yc4Q3SJSe1qz 5VjW6C+iNvVOtt7dXkCthknMq6f6jW2bmvaYncAMSlsPsQYjTix5zDnUoRGAIyzs+LoI pQVQRBzpMFonQu5W0EuiSaZeJ0JwWWUWeGGsRM/gDIemuVy5a357tEirJ3t7iDLHhUG5 aqgkBQ2AGQC5r6kypyrzlTMSxKth2zjwQ6wQT/b5k3va/Zxhddaexm9ahTGO5rtSPJ/t /PwKsy3uTVbiYLO3yBXeLfEl4LLFhzODk/2pwqPvKhTFwZicy2rgYI/nWJf5LQiIViA2 TNcw== X-Gm-Message-State: ABy/qLariwm6mRlUvDEMlcvRiAntGm0Ypc36CHkHa+oemdkG9c8ufD+j 0hkqz2F834dEiWbt9m90k2rMd5E40NHREDrbcMwqmw== X-Received: by 2002:a7b:c3d7:0:b0:3fb:a6ee:4cec with SMTP id t23-20020a7bc3d7000000b003fba6ee4cecmr4499416wmj.33.1688762460838; Fri, 07 Jul 2023 13:41:00 -0700 (PDT) Received: from localhost.localdomain (host-92-23-208-66.as13285.net. [92.23.208.66]) by smtp.gmail.com with ESMTPSA id q10-20020a1ce90a000000b003fbb25da65bsm3337736wmc.30.2023.07.07.13.41.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 13:41:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: laurent@vivier.eu, mjt@tls.msk.ru, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PATCH v2 05/24] linux-user: Split TARGET_PROT_* out of syscall_defs.h Date: Fri, 7 Jul 2023 21:40:35 +0100 Message-Id: <20230707204054.8792-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230707204054.8792-1-richard.henderson@linaro.org> References: <20230707204054.8792-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x335.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Move the values into the per-target target_mman.h headers Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/aarch64/target_mman.h | 3 +++ linux-user/generic/target_mman.h | 4 ++++ linux-user/mips/target_mman.h | 2 ++ linux-user/syscall_defs.h | 11 ----------- linux-user/xtensa/target_mman.h | 2 ++ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/linux-user/aarch64/target_mman.h b/linux-user/aarch64/target_mman.h index e7ba6070fe..7f15cab25e 100644 --- a/linux-user/aarch64/target_mman.h +++ b/linux-user/aarch64/target_mman.h @@ -1 +1,4 @@ +#define TARGET_PROT_BTI 0x10 +#define TARGET_PROT_MTE 0x20 + #include "../generic/target_mman.h" diff --git a/linux-user/generic/target_mman.h b/linux-user/generic/target_mman.h index 7b888fb7f8..39a650e751 100644 --- a/linux-user/generic/target_mman.h +++ b/linux-user/generic/target_mman.h @@ -1,6 +1,10 @@ #ifndef LINUX_USER_TARGET_MMAN_H #define LINUX_USER_TARGET_MMAN_H +#ifndef TARGET_PROT_SEM +#define TARGET_PROT_SEM 0x08 +#endif + /* These are defined in linux/mmap.h */ #define TARGET_MAP_SHARED 0x01 #define TARGET_MAP_PRIVATE 0x02 diff --git a/linux-user/mips/target_mman.h b/linux-user/mips/target_mman.h index d1d96decf5..e9f3905a52 100644 --- a/linux-user/mips/target_mman.h +++ b/linux-user/mips/target_mman.h @@ -1,3 +1,5 @@ +#define TARGET_PROT_SEM 0x10 + #define TARGET_MAP_NORESERVE 0x0400 #define TARGET_MAP_ANONYMOUS 0x0800 #define TARGET_MAP_GROWSDOWN 0x1000 diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 118a8ac7da..9387ed422d 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1251,17 +1251,6 @@ struct target_winsize { #include "termbits.h" -#if defined(TARGET_MIPS) || defined(TARGET_XTENSA) -#define TARGET_PROT_SEM 0x10 -#else -#define TARGET_PROT_SEM 0x08 -#endif - -#ifdef TARGET_AARCH64 -#define TARGET_PROT_BTI 0x10 -#define TARGET_PROT_MTE 0x20 -#endif - #include "target_mman.h" #if (defined(TARGET_I386) && defined(TARGET_ABI32)) \ diff --git a/linux-user/xtensa/target_mman.h b/linux-user/xtensa/target_mman.h index d1d96decf5..e9f3905a52 100644 --- a/linux-user/xtensa/target_mman.h +++ b/linux-user/xtensa/target_mman.h @@ -1,3 +1,5 @@ +#define TARGET_PROT_SEM 0x10 + #define TARGET_MAP_NORESERVE 0x0400 #define TARGET_MAP_ANONYMOUS 0x0800 #define TARGET_MAP_GROWSDOWN 0x1000