From patchwork Fri Jun 1 16:34:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huaisheng Ye X-Patchwork-Id: 10444005 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED5A0602BD for ; Fri, 1 Jun 2018 16:37:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E321228726 for ; Fri, 1 Jun 2018 16:37:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D744628D60; Fri, 1 Jun 2018 16:37:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23B0828726 for ; Fri, 1 Jun 2018 16:37:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 938076B0005; Fri, 1 Jun 2018 12:37:24 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8BECA6B0006; Fri, 1 Jun 2018 12:37:24 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 761106B0007; Fri, 1 Jun 2018 12:37:24 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ot0-f198.google.com (mail-ot0-f198.google.com [74.125.82.198]) by kanga.kvack.org (Postfix) with ESMTP id 4AAC66B0005 for ; Fri, 1 Jun 2018 12:37:24 -0400 (EDT) Received: by mail-ot0-f198.google.com with SMTP id v10-v6so16233563oth.16 for ; Fri, 01 Jun 2018 09:37:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state :domainkey-signature:from:to:cc:subject:date:message-id; bh=RRp5aYUAdEArs/Aq2e64Ba0k14DxZBdLM0E2DMCXaKg=; b=oVEGfkN9zHlyolywuqIJm1ainfdnjaQN13/3kVcZpm2ElpbTpv8bwgRtZtpgIODyv6 IJ1QLWUHxo+ARD0VEJ0tRh3JLWm9JhntassWGfkD2XoWcONPW9BB4HtAlwjie+kwOL+b MNR8vpPC4FvTz6ju5chPmrQtTDk5B0ZxLZMhzlnmcCM2ujeUUpMTe3wCpAe3bGsQg+Tw wH5cIrqDmZvxTbN3tX8z/RDFVAeS/GzKj6NnCHCu9n/7hSlu8LAF64FvHI9wDPC7/suV MS0CFArjiGmDoMlHGxlEegD2cUerHgm1ioA8/12/s1iGzEH2so028SgcaLoi7MJBQ6NN p45Q== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of yehs2007@zoho.com designates 135.84.80.237 as permitted sender) smtp.mailfrom=yehs2007@zoho.com X-Gm-Message-State: APt69E1pUVgU79gkJp/7neULsZONNNpID0P0vXDwzNvBw7ZDwqJYBCOj JRzPJ0M0308i5my8sZpllT0LFF2OwMcubtSYukOI8KDckFkDuILxk6nLRAJii7DrnC33S8yy1Fh XS4ah+GiN5g8lwhAVcVYv4i5cDJhevOZ57Aj5+TOEU0EvVY4mp6EBiXDKHM0gv5uBhg== X-Received: by 2002:a9d:3375:: with SMTP id u50-v6mr1778320otd.401.1527871044081; Fri, 01 Jun 2018 09:37:24 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLj1dazwgZcKPPFYgyutt7qTcotkoZigPLoNWKMF20dCGBbe9OJF9cZbmS0KBnUGQed8YmH X-Received: by 2002:a9d:3375:: with SMTP id u50-v6mr1778280otd.401.1527871043103; Fri, 01 Jun 2018 09:37:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527871043; cv=none; d=google.com; s=arc-20160816; b=ZjAquhGrtxuY/kRAWtTcDWc+668yUDf1/qMYU6tL3tZBLFuTXWypWMw+OOHkwmstu6 rWM6BMTLVmHvKLs9oQXyoOjbg0wV4Mt+5VoKeeHVWODxOJTGeN4QyJQaf5ErXetZn4ao n7LQPKxwhT62IIfGC5Hp6TCWw+20vCq2FiaM2KZvJhehWGGvLk6aGslGqAiD0bCWRPRo dEgE8vXd1PdJiWEVZYjR/nwJOVZRXELphxMVNUJdlCLcFJWalN6ZBU3/SbT9VnEY66FV pvZRA8WocBmjzKh/+AMNIFPcLvgUSTdpg1dMcB67NNKgK+0uHjKKAAlg7TQey/+1JLQU wvEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:domainkey-signature :arc-authentication-results; bh=RRp5aYUAdEArs/Aq2e64Ba0k14DxZBdLM0E2DMCXaKg=; b=lmjXBQqUFVS4PhOEX/S09O4y80g+mYb85tF2FwN67M5vlQVLbPW4AdlxAdSxeJoa1w vPXrAEkOlNoq+CiyKBDw7dPMqhnwz+9qizkbFsvt1VJoBPPkFF8MiHg8WT5QCtgxYI9h KYGoUcu0CZBZdDK6fr6mkO6oQJO9XSvrMKgUuBO7Y/yausFvoD2PKn1nrVS2j4rTlxyU pO5ukdmehttA572hxmSNLl/J26Qem8g6JXn84+dUYLZnLbR77LVmVVuRdZbmq+um/WE/ MaXIIFaLCAhKxqfGRk6+tPhxDufMgYoqMxpgBHQ21oAJN3tsgaZuwbFlws241cBSd4cY f4Ww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of yehs2007@zoho.com designates 135.84.80.237 as permitted sender) smtp.mailfrom=yehs2007@zoho.com Received: from sender-pp-092.zoho.com (sender-pp-092.zoho.com. [135.84.80.237]) by mx.google.com with ESMTPS id 64-v6si13479519oig.226.2018.06.01.09.37.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jun 2018 09:37:23 -0700 (PDT) Received-SPF: pass (google.com: domain of yehs2007@zoho.com designates 135.84.80.237 as permitted sender) client-ip=135.84.80.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of yehs2007@zoho.com designates 135.84.80.237 as permitted sender) smtp.mailfrom=yehs2007@zoho.com DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id; b=VeHMFeglEffgxQxsyVwFB6q2b1k6uQVE7v8ZuYRiLSRO4I8bNd/JR/grXmu9l6ZoW07AGq70rqXd X+p+m2ewZ2ZeVIAjQx1zNF98LmI6MnPTR6y8Xtd/jPW7y/cD9ofo Received: from YEHS1XR956R00D1.lenovo.com (221.220.166.227 [221.220.166.227]) by mx.zohomail.com with SMTPS id 1527870893427396.2114959365207; Fri, 1 Jun 2018 09:34:53 -0700 (PDT) From: Huaisheng Ye To: linux-mm@kvack.org Cc: chengnt@lenovo.com, Huaisheng Ye , Andrew Morton , Vlastimil Babka , Michal Hocko , Mel Gorman , Kate Stewart , "Levin, Alexander (Sasha Levin)" , Greg Kroah-Hartman , Christoph Hellwig , Matthew Wilcox Subject: [PATCH] include/linux/gfp.h: fix the annotation of GFP_ZONE_TABLE Date: Sat, 2 Jun 2018 00:34:03 +0800 Message-Id: <20180601163403.1032-1-yehs2007@zoho.com> X-Mailer: git-send-email 2.17.0.windows.1 X-ZohoMailClient: External X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Huaisheng Ye When bit is equal to 0x4, it means OPT_ZONE_DMA32 should be got from GFP_ZONE_TABLE. OPT_ZONE_DMA32 shall be equal to ZONE_DMA32 or ZONE_NORMAL according to the status of CONFIG_ZONE_DMA32. Similarly, when bit is equal to 0xc, that means OPT_ZONE_DMA32 should be got with an allocation policy GFP_MOVABLE. So ZONE_DMA32 or ZONE_NORMAL is the possible result value. Signed-off-by: Huaisheng Ye Cc: Andrew Morton Cc: Vlastimil Babka Cc: Michal Hocko Cc: Mel Gorman Cc: Kate Stewart Cc: "Levin, Alexander (Sasha Levin)" Cc: Greg Kroah-Hartman Cc: Christoph Hellwig Cc: Matthew Wilcox --- include/linux/gfp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 1a4582b..3f1b3dc 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -343,7 +343,7 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags) * 0x1 => DMA or NORMAL * 0x2 => HIGHMEM or NORMAL * 0x3 => BAD (DMA+HIGHMEM) - * 0x4 => DMA32 or DMA or NORMAL + * 0x4 => DMA32 or NORMAL * 0x5 => BAD (DMA+DMA32) * 0x6 => BAD (HIGHMEM+DMA32) * 0x7 => BAD (HIGHMEM+DMA32+DMA) @@ -351,7 +351,7 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags) * 0x9 => DMA or NORMAL (MOVABLE+DMA) * 0xa => MOVABLE (Movable is valid only if HIGHMEM is set too) * 0xb => BAD (MOVABLE+HIGHMEM+DMA) - * 0xc => DMA32 (MOVABLE+DMA32) + * 0xc => DMA32 or NORMAL (MOVABLE+DMA32) * 0xd => BAD (MOVABLE+DMA32+DMA) * 0xe => BAD (MOVABLE+DMA32+HIGHMEM) * 0xf => BAD (MOVABLE+DMA32+HIGHMEM+DMA)