Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp183191pxb; Wed, 24 Feb 2021 22:54:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJziu1SRD+YYifkH5UtEnM9kYIvASWCZ6QqtTBwI494HrI7ovwvnyfRo7mvDpuMHVqj6/8qX X-Received: by 2002:a05:6402:1649:: with SMTP id s9mr1438288edx.177.1614236082583; Wed, 24 Feb 2021 22:54:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614236082; cv=none; d=google.com; s=arc-20160816; b=RUH9e+meGGnUA4n9C/oJ7p11Iw+j41fX2xAkvDjvdNSKouFFK0HbRoqygaPbynNIuK 6X1XHnzSL+Uy/dQ2Nz5UiBd66EGAiIAYsvV4yfNM58uenctXe88nq0FMqaxs+yzwedoh lvetkMpaSMCFHQ31COSdd8siF3uZFIRZpBNN6rFgVBv7TVSWC9QO/7tn0Xh34W75LlUZ vjVqxff9shz8MZ30SpZj+5aS7XKWgdbzaEa7y+EqNInM5SHOXw+oN0G1NVMQ0Sra6/Yt Xfcnmve6XP4YfvkvDMBuHlKmRD6c0L8s/X16areG0zycKnG4jGFMuuF7xunCJTnOuS/6 pQGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=aIdfObZdbUxOr+zw8BBcTv0bm9J3OIM5VOrjaPL9j4c=; b=yVyujzSYGJLQ2VMOFtl/xJziWOpEBKuh5WkGtxC8lcbNeZ8ubWnahHwEci2CzMnTea U+9kkPW2vj2Jpk83OfS7B/9sHmLNCEnSY/VHo0DRp9nsJGPspQya3X8Hn3yi1t1fDrpu gDaFDNq/rC39vQkg77uqYlIpJVffd9ysfhkfwptRnFbvsTTcDi1ZNXkkWoGNSVNtTxPE HRfoWYWe9Dh+CjeDJzfXKu+vHlmhhJNBuw42ylDa5TBU5DYAdHjyira8yDU7jhMuXaJR /BZrqUxJo/RMgmjaMLGfAVgwpT84rym8J+WbgaTAsHy957vZKeNQtc/9701M2npX0T1a 0uLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p2si2878674ejl.393.2021.02.24.22.54.20; Wed, 24 Feb 2021 22:54:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235487AbhBYGBW (ORCPT + 99 others); Thu, 25 Feb 2021 01:01:22 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:12203 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234928AbhBYGAh (ORCPT ); Thu, 25 Feb 2021 01:00:37 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DmMWz5DSlzlPwm; Thu, 25 Feb 2021 13:57:51 +0800 (CST) Received: from DESKTOP-TMVL5KK.china.huawei.com (10.174.187.128) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Thu, 25 Feb 2021 13:59:43 +0800 From: Yanan Wang To: , , CC: Paolo Bonzini , Ben Gardon , "Sean Christopherson" , Vitaly Kuznetsov , Arnaldo Carvalho de Melo , Ingo Molnar , Andrew Jones , Peter Xu , Marc Zyngier , , , "Yanan Wang" Subject: [RFC PATCH v2 1/7] tools include: sync head files of mmap flag encodings about hugetlb Date: Thu, 25 Feb 2021 13:59:34 +0800 Message-ID: <20210225055940.18748-2-wangyanan55@huawei.com> X-Mailer: git-send-email 2.8.4.windows.1 In-Reply-To: <20210225055940.18748-1-wangyanan55@huawei.com> References: <20210225055940.18748-1-wangyanan55@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.187.128] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch syncs contents of tools/include/asm-generic/hugetlb_encode.h and include/uapi/asm-generic/hugetlb_encode.h. Arch powerpc supports 16KB hugepages and ARM64 supports 32MB/512MB hugepages. The corresponding mmap flags have already been added in include/uapi/asm-generic/hugetlb_encode.h, but not tools/include/asm-generic/hugetlb_encode.h. Signed-off-by: Yanan Wang --- tools/include/asm-generic/hugetlb_encode.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/include/asm-generic/hugetlb_encode.h b/tools/include/asm-generic/hugetlb_encode.h index e4732d3c2998..4f3d5aaa11f5 100644 --- a/tools/include/asm-generic/hugetlb_encode.h +++ b/tools/include/asm-generic/hugetlb_encode.h @@ -20,13 +20,16 @@ #define HUGETLB_FLAG_ENCODE_SHIFT 26 #define HUGETLB_FLAG_ENCODE_MASK 0x3f +#define HUGETLB_FLAG_ENCODE_16KB (14 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_64KB (16 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_512KB (19 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_1MB (20 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_2MB (21 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_8MB (23 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_16MB (24 << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_32MB (25 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_256MB (28 << HUGETLB_FLAG_ENCODE_SHIFT) +#define HUGETLB_FLAG_ENCODE_512MB (29 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_1GB (30 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_2GB (31 << HUGETLB_FLAG_ENCODE_SHIFT) #define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT) -- 2.19.1