From patchwork Wed Jun 5 22:36:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edward Liaw X-Patchwork-Id: 13687639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5420DC25B76 for ; Wed, 5 Jun 2024 22:36:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DDC1F6B00A3; Wed, 5 Jun 2024 18:36:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D8C046B00A4; Wed, 5 Jun 2024 18:36:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C544A6B00A5; Wed, 5 Jun 2024 18:36:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id A7BB06B00A3 for ; Wed, 5 Jun 2024 18:36:54 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 50B191C2531 for ; Wed, 5 Jun 2024 22:36:54 +0000 (UTC) X-FDA: 82198296348.04.AF47EEE Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) by imf08.hostedemail.com (Postfix) with ESMTP id 7CE3A160005 for ; Wed, 5 Jun 2024 22:36:52 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=GQWNXQVO; spf=pass (imf08.hostedemail.com: domain of 3g-hgZgYKCBIwv30sEy66y3w.u64305CF-442Dsu2.69y@flex--edliaw.bounces.google.com designates 209.85.210.201 as permitted sender) smtp.mailfrom=3g-hgZgYKCBIwv30sEy66y3w.u64305CF-442Dsu2.69y@flex--edliaw.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717627012; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=W09wuD4FxLrgIE1KeD5W+uP9/uZWU9NhM8LDAnFpogw=; b=ly+o36dSqlmaWR/eiJgaSPsmTXN+J/8LOIywCrUFpmK4NoTtCoZWTMlcX1wCEyKBUe0ASY s5a3P8qpzZEWy6n2k3YUMdby6bhY/6LgOd7Zb9YO9gcwS73A9GKxCTmc00YHSvkrAMH+kT ESQE5z3TWgxv/GhqfAI0I65Ue/HBBok= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717627012; a=rsa-sha256; cv=none; b=VANLm1pH71kz+FO0kcExrAsA0czNSPn4k2lAtk8gXRNaNOVaT4PmQ4wJRI6pw/EZUg1jBD fzPIh1WG7Al9YWaVI/cgTzAigmYioHIF5U8fWzYor1pu8JBbxH1K1jodJAztstVFMD/31W +hFAheFueQdoVsGQ+dS2BG2wNnzFc88= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=GQWNXQVO; spf=pass (imf08.hostedemail.com: domain of 3g-hgZgYKCBIwv30sEy66y3w.u64305CF-442Dsu2.69y@flex--edliaw.bounces.google.com designates 209.85.210.201 as permitted sender) smtp.mailfrom=3g-hgZgYKCBIwv30sEy66y3w.u64305CF-442Dsu2.69y@flex--edliaw.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-7027e5aab15so267627b3a.2 for ; Wed, 05 Jun 2024 15:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717627011; x=1718231811; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=W09wuD4FxLrgIE1KeD5W+uP9/uZWU9NhM8LDAnFpogw=; b=GQWNXQVOme+EbEkEcjG7V5GI2JJZRR1adY++ifWlCvTJI8RCBs2+C9iKvrk8pzm34K c3vsvrJL1L9C0/fSmB20Cn5nbRS96m856nNWvLa8kW2gST/fAGBixm//o5CFgkCcxF6d 1gMRXTnREhtrrMH0OmK+piKIxI8hvVmIy3oHk77xIdvs+418EaZvrc+xUuqZyb2xC+4h BwknUbxa21rCG35rObvM+wgopBN2Dk5m3HbK4ZvEZJVyeKZKfmGeauPAo5kOUlcaNWhn tqjaxleqSVjZw77tTyxjUQ1FPCtCmbsrjsv6fsBeloTjRnWiUSd0NeYD4WS9iTwzr13C btxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717627011; x=1718231811; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=W09wuD4FxLrgIE1KeD5W+uP9/uZWU9NhM8LDAnFpogw=; b=j/BKs7GPWelLwBV0tfKTk3d/HGssyRuaMHSWOm0ScJa+SMgZLNDN7rP+csQJrvKPdX vm3kSsK+NC0NOJKiLFR8i0cCh68WNK2KvvS4XO61Ks8yL6om2ZucpSuniGiST5DlVGVm Ucq872oDGuuvxFifw/mu5mqJ2hCuQQTXvxL4QIc41TY7jD6gUnE7hhqwuRKreQvUbV2O Nb9Ol1hjhPUSYPBN6JVDb2ulJeEC9ioUdC+ua2VDwxZ1SV9RkQFzBS/7fMHMtu2HFU8Q zT78jwyL2MoE9/afz/zpZdrpAxbxuFiODv1ZRZe50JAT6LKeWhhyZcIjK52Qjs5wyuWq i0Xw== X-Forwarded-Encrypted: i=1; AJvYcCX6zZxgVxoep6evTedIG55qnGMmXu9BNZWSimdTOVE4/L1trW2JWKKiszTkAVQibzWnEiu3olXHYg2Ay/HxG0sTFGo= X-Gm-Message-State: AOJu0YzqROcI7J9QeaxuJeaDbUUlVKpasTBweDJYCHCQ/Vin3cK7Nqdv Nz3fB50a9MZWDIHvWSCYTczFLtpRXT/4OYlvAzvjkFDmvj08XkbYNEfYCMWoWAyWNsYPE07fmTu IVA== X-Google-Smtp-Source: AGHT+IFMIrLdQe45thJUN1W26E8IgQCgCg3jMfWtuEwXZZmX/GxigF7WD+0J3Zd+VqHvwqAm4zpgp44oOeM= X-Received: from edliaw.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:305d]) (user=edliaw job=sendgmr) by 2002:a05:6a00:4f85:b0:6f0:b53c:dfa5 with SMTP id d2e1a72fcca58-703e5a7f7ecmr58171b3a.5.1717627011007; Wed, 05 Jun 2024 15:36:51 -0700 (PDT) Date: Wed, 5 Jun 2024 22:36:34 +0000 In-Reply-To: <20240605223637.1374969-1-edliaw@google.com> Mime-Version: 1.0 References: <20240605223637.1374969-1-edliaw@google.com> X-Mailer: git-send-email 2.45.1.467.gbab1589fc0-goog Message-ID: <20240605223637.1374969-2-edliaw@google.com> Subject: [PATCH v1 1/2] selftests/mm: Include linux/mman.h From: Edward Liaw To: shuah@kernel.org, Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Andrew Morton Cc: cmllamas@google.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com, Edward Liaw , llvm@lists.linux.dev, linux-mm@kvack.org X-Rspam-User: X-Stat-Signature: 1j5gffcw3qt371eo4ckiwddiuq5g6on3 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 7CE3A160005 X-HE-Tag: 1717627012-546644 X-HE-Meta: U2FsdGVkX18b6jZGJpDW/iYhj901moILeWVDH722XQkUMrAD3JgMpTfD15E6yq1PJVV34QE6WpQeMiQhwjoQIpdxjqolsosy73ea6KagF0OOr2G0JdYCVUEuU5DUmNXqswVaorcQvqO1/xiMtbpoZZb3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OEXaaZzeqXQeH2tqisHOxzxEKuc1D/ikkDqs9vvUa/fK5P4yWgAmSQprh7cVOm7OzX/QrCTCYmLyD0Y2Bw8NLQxjZxoFf/k5k/ddWI5wrpYBcufCKUMCIer5/WpivEtbO5hRcVFRJc51z+xYD4M1fPc1dT9rufsdD9lvqBaWNxaTuZL8ceV3LLatMs+B1FLpa5JoXOkxpYGsoyQcTkYx3/r9ekuIn3RTo8CK/+RQzf0rOklskNrilSP+rlprR610iVFi+avhtNmv7HO8uPrPp1HXbNpIf51Kea+xUIGAHWS3Tch+XSnrRrfOTU3RwDcg0+JFd3KFJkU/YUvIs2+Mgm0546QUaTCkbyRU4uFmfgRgmB7iIUcprwKRme1PP7KU/qNLEw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.001345, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: thuge-gen defines MAP_HUGE_* macros that are provided by linux/mman.h since 4.15. Removes the macros and includes linux/mman.h instead. Signed-off-by: Edward Liaw Reviewed-by: Carlos Llamas Reviewed-by: Muhammad Usama Anjum Reviewed-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/thuge-gen.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/testing/selftests/mm/thuge-gen.c b/tools/testing/selftests/mm/thuge-gen.c index ea7fd8fe2876..034635317935 100644 --- a/tools/testing/selftests/mm/thuge-gen.c +++ b/tools/testing/selftests/mm/thuge-gen.c @@ -15,6 +15,7 @@ #define _GNU_SOURCE 1 #include +#include #include #include #include @@ -28,10 +29,6 @@ #include "vm_util.h" #include "../kselftest.h" -#define MAP_HUGE_2MB (21 << MAP_HUGE_SHIFT) -#define MAP_HUGE_1GB (30 << MAP_HUGE_SHIFT) -#define MAP_HUGE_SHIFT 26 -#define MAP_HUGE_MASK 0x3f #if !defined(MAP_HUGETLB) #define MAP_HUGETLB 0x40000 #endif