From patchwork Sun Jul 9 18:28:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 700896 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp4829208wrs; Sun, 9 Jul 2023 11:39:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlGBcC7yuykaNcdD1tnP1AU0QuxRchu1xLCOx2mOJYUoUpXd8dH6nudLJvy9xUIR0kEroiJT X-Received: by 2002:a0c:dd8c:0:b0:62b:33fb:d04c with SMTP id v12-20020a0cdd8c000000b0062b33fbd04cmr9496948qvk.31.1688927949904; Sun, 09 Jul 2023 11:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688927949; cv=none; d=google.com; s=arc-20160816; b=VWaPm9jotaGsxoexix+nAOv+jpBYxfG6H2JaC+Vx2C1BNcem8fl5u9TZr9QnRvwXfW iPtmoCOLJBW+gatzZEYt6Ytsa5YfKliJOyWW+25wZKorhi+8DX2mjfZ2bId24GajTJGq 0usUmJb2B0pAczq1oVYM4CGUB3rVbM2p768KQkIL/Y/61O+sKjZ36d1TE45TIveB3Q+N O8g3QmNC+O30+A/FIezyNalPyudiq4Q5zpFxOI4aQcALjHJuxol6+7+Qmtm1Ge7JLJ/P kVu96ccxaWKebwIfm5EPqhZYRbvspJpJy8pJdKZPPA9ATbzawYUh+iMKY9BCl1I5Qdi+ ZvgA== 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=7XT7/zvTpZMeqxSdbndcDLpIQTRXhkVJ5EOXRYsTIYQ=; fh=J9/n186FVRrl/nfQIqc4qEum8K7z3A9aFNkBgET3s3A=; b=n1xCfBq7N0X/jviO6Blm9OUjmLp4otmnrDWNUbOwGFP0b+E5ws92zWNBFyYrkVwLNv NYdG0bpaPmy1qGws5wKJQnHtGKdEpwYjTulZ/hXULmThF8mkBEBBXg/NJlXEE6LsIGK2 hoJxcpwwESuEeFTKTnVAh9NonVo6ZTkvfxG4UeXJ9ypXZfmjUK90ATeylSKrgGPhp6X0 hedhzpAqdOyZAVYimoesLz/+JKJwkNGivB7YwhDJheY1HIy9Mqz0vEDcPU+ZnF83vxbf VFtPNvlFIHOwQmxN9pbEhpWi3JaGMUTU5TPhYdP9+biiTIZyl326fVJZMwg3gNUfWYBH fYOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y3jTRAGh; 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 h21-20020a0cab15000000b006367dfd12e1si4861505qvb.123.2023.07.09.11.39.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Jul 2023 11:39:09 -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=Y3jTRAGh; 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 1qIZEP-0005sa-NL; Sun, 09 Jul 2023 14:34:01 -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 1qIZDm-0003IU-MB for qemu-devel@nongnu.org; Sun, 09 Jul 2023 14:33:22 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIZDk-0004Ap-Qc for qemu-devel@nongnu.org; Sun, 09 Jul 2023 14:33:22 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3143ccb0f75so4500852f8f.0 for ; Sun, 09 Jul 2023 11:33:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688927597; x=1691519597; 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=7XT7/zvTpZMeqxSdbndcDLpIQTRXhkVJ5EOXRYsTIYQ=; b=Y3jTRAGhWNlLnjxFvFMZObU7LDmyk1EIlyWJzFIdgT3RszI4UvO45dVU+4BHS2zJmy yFG6Xu4v2b3JXPdYsIvG8+5tT0g5dC744DDnbo9uBz5q5B1nV2xacBL7AKODFSNTu86c p4Zq7Vud8zWagOUY4h3fPSTFSsb/Awh29YXWE0YHXXyN9MufQ64j0bPmAjWQYVtdfgLp u2Pi+uvU1t4inDzcebn8g6QXH2YNXi/NgarIX3p/HaXzThT1d00cyAw9SQo0DGABWGGa lI6F+EscYc91tqODeDQfz02g/jPt/LVEbQ0q0LOrh4OwO7QAgn+hV4d2z7uTvoQGbfGY wSzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688927597; x=1691519597; 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=7XT7/zvTpZMeqxSdbndcDLpIQTRXhkVJ5EOXRYsTIYQ=; b=U2tIt4WpGhwuAuWn7sKRIEMvAwgBPo0k3qOwY/jDPgWCt56YtL0uyXuTJD1TxtpYa9 3YBCf/+/9G+Wbx3Z9jceyJZm4bpoh2KIw6/jwVbDzIQhEaV3RHzOKk1oc16ELqPSIjPb nyiwt9JKc6pLFj764CXYcjDW6wnmLYfszcUBacLl7qlBjSj9vQwsfsc0YEOU7iFtq+zf u7+uip2qTNDYMqogQHhKpDu8Tgsfqg6CAOhZCD/irXSWL8eK7+chmHfytxVnHzBnXC/m o6gfbIh9B+Y9nCkdKekTj9sxBHCZT/1wVtUj7tQEs1Jgl6/cRO/HzDY6muDiNvxsAKn1 iWGg== X-Gm-Message-State: ABy/qLaflYDH9GsL7bny2tTFf7OXSCW+i3yjCQTuJdsH1zODQqmg2a2I X8m3mKJlv+PhvSkr9+gUTf6XxknsSeW4SW0H/EcrlA== X-Received: by 2002:adf:ee8c:0:b0:314:748:d59d with SMTP id b12-20020adfee8c000000b003140748d59dmr11590079wro.27.1688927597527; Sun, 09 Jul 2023 11:33:17 -0700 (PDT) Received: from stoup.. ([148.252.133.210]) by smtp.gmail.com with ESMTPSA id e17-20020a5d4e91000000b0031433760a92sm9635256wru.115.2023.07.09.11.33.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jul 2023 11:33:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: laurent@vivier.eu, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 24/45] linux-user: Split TARGET_PROT_* out of syscall_defs.h Date: Sun, 9 Jul 2023 19:28:59 +0100 Message-Id: <20230709182934.309468-48-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230709182934.309468-1-richard.henderson@linaro.org> References: <20230709182934.309468-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x434.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 Message-Id: <20230707204054.8792-8-richard.henderson@linaro.org> --- linux-user/aarch64/target_mman.h | 8 ++++++++ linux-user/generic/target_mman.h | 6 +++++- linux-user/mips/target_mman.h | 2 ++ linux-user/syscall_defs.h | 11 ----------- linux-user/xtensa/target_mman.h | 2 ++ 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/linux-user/aarch64/target_mman.h b/linux-user/aarch64/target_mman.h index e7ba6070fe..f721295fe1 100644 --- a/linux-user/aarch64/target_mman.h +++ b/linux-user/aarch64/target_mman.h @@ -1 +1,9 @@ +#ifndef AARCH64_TARGET_MMAN_H +#define AARCH64_TARGET_MMAN_H + +#define TARGET_PROT_BTI 0x10 +#define TARGET_PROT_MTE 0x20 + #include "../generic/target_mman.h" + +#endif diff --git a/linux-user/generic/target_mman.h b/linux-user/generic/target_mman.h index 7b888fb7f8..ec76a91b46 100644 --- a/linux-user/generic/target_mman.h +++ b/linux-user/generic/target_mman.h @@ -23,7 +23,11 @@ #define TARGET_MAP_NORESERVE 0x4000 #endif -/* Other MAP flags are defined in asm-generic/mman-common.h */ +/* Defined in asm-generic/mman-common.h */ +#ifndef TARGET_PROT_SEM +#define TARGET_PROT_SEM 0x08 +#endif + #ifndef TARGET_MAP_TYPE #define TARGET_MAP_TYPE 0x0f #endif diff --git a/linux-user/mips/target_mman.h b/linux-user/mips/target_mman.h index cd566c24b6..e97694aa4e 100644 --- a/linux-user/mips/target_mman.h +++ b/linux-user/mips/target_mman.h @@ -1,6 +1,8 @@ #ifndef MIPS_TARGET_MMAN_H #define MIPS_TARGET_MMAN_H +#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 041105b7a7..77ba343c85 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1227,17 +1227,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 3891bb5e07..3933771b5b 100644 --- a/linux-user/xtensa/target_mman.h +++ b/linux-user/xtensa/target_mman.h @@ -1,6 +1,8 @@ #ifndef XTENSA_TARGET_MMAN_H #define XTENSA_TARGET_MMAN_H +#define TARGET_PROT_SEM 0x10 + #define TARGET_MAP_NORESERVE 0x0400 #define TARGET_MAP_ANONYMOUS 0x0800 #define TARGET_MAP_GROWSDOWN 0x1000