Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4186342pxf; Tue, 30 Mar 2021 01:11:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOrZGmTnJo4qV8GFeAeEPMMJBNykCWetBix/ttfATnR6nD/maoyyfiACNU/cWLu2z89Z1L X-Received: by 2002:a05:6402:46:: with SMTP id f6mr32551460edu.252.1617091864076; Tue, 30 Mar 2021 01:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617091864; cv=none; d=google.com; s=arc-20160816; b=ZOOHVexZoA42mdRpM8Qohyyv+weNb6SfPrQ26QJk9ihmcjirJFdW+7bLqizSUcOIut rast9vizTUKStrDcYciPia1Tfei4RRAXv6xhKl0pzpt/N/hwb7wYj0Vg97BEkDG9Zv6e KDW7oU8aGwPM+K6Jr0cX/RlQeJAChdmFAMCxDLjZhadokC0cbZaI0qKSRxZgZCKy8jZV Hti4q16B1eu+AtWgAgIEbNUMbNou+B3or70Fjeea+b/Sy1s6jqp6Y0U5kTxGBNs66EMN /Jo8QOn13KxonpYCArtS0lsuSJbl9T6g2cwMSayb+1gM9lU9Ru1quXHhc4qX2PfENwh2 N61g== 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=Uem5QO5Rc+lEqlX8L2f74HMXsbMtQGXZR3H8zBw451A=; b=AJlQ0d83Be33VPo/FxGKXTl/1dYY13ab70nV7qHXJgy8mNdgzSlAYLWiqmPvzG6fIp hlVBtxX5AdfrxwrWfyitvuHbu+bUqswbFetU8A6I9v6G6n2c0YhmXcUp0dRVA95wEecM bnCN5Yh4MyeIW2ECfzctPMkd/QrcrvGNVjUZtRXdP6y1gSCkqHxJ8FInGg1juPSg4zHO zQwhutqYy6DLQ6ZXEjDeroxUVsdjkYUGmg0pNWA63F2jWKcVE2Cmaeas4W56dNO7u+0/ yrGtOtZahvVDlnuGABWwYCtCSyP2pw7jaIBFSUQOn/AjIW+q7SNUaDfUpcx+qISiIIPx fNgA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m22si14153462ejr.463.2021.03.30.01.10.41; Tue, 30 Mar 2021 01:11:04 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231522AbhC3IJr (ORCPT + 99 others); Tue, 30 Mar 2021 04:09:47 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:15104 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231338AbhC3IJN (ORCPT ); Tue, 30 Mar 2021 04:09:13 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4F8hqs4Htrz19Jq2; Tue, 30 Mar 2021 16:07:05 +0800 (CST) Received: from DESKTOP-TMVL5KK.china.huawei.com (10.174.187.128) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.498.0; Tue, 30 Mar 2021 16:08:59 +0800 From: Yanan Wang To: Paolo Bonzini , Andrew Jones , , , CC: Ben Gardon , Sean Christopherson , Vitaly Kuznetsov , Peter Xu , "Ingo Molnar" , Adrian Hunter , Jiri Olsa , Arnaldo Carvalho de Melo , Arnd Bergmann , Michael Kerrisk , Thomas Gleixner , , , Yanan Wang Subject: [PATCH v6 01/10] tools/headers: sync headers of asm-generic/hugetlb_encode.h Date: Tue, 30 Mar 2021 16:08:47 +0800 Message-ID: <20210330080856.14940-2-wangyanan55@huawei.com> X-Mailer: git-send-email 2.8.4.windows.1 In-Reply-To: <20210330080856.14940-1-wangyanan55@huawei.com> References: <20210330080856.14940-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. Cc: Ingo Molnar Cc: Adrian Hunter Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Signed-off-by: Yanan Wang Reviewed-by: Ben Gardon --- 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