From patchwork Mon May 21 15:20:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huaisheng Ye X-Patchwork-Id: 10415613 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 96D9E6032C for ; Mon, 21 May 2018 15:21:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C7E7289A9 for ; Mon, 21 May 2018 15:21:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7AF8028B68; Mon, 21 May 2018 15:21:46 +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 5D9B1289A9 for ; Mon, 21 May 2018 15:21:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 68DF46B0008; Mon, 21 May 2018 11:20:59 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6142C6B000A; Mon, 21 May 2018 11:20:59 -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 4B6456B000C; Mon, 21 May 2018 11:20:59 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg0-f72.google.com (mail-pg0-f72.google.com [74.125.83.72]) by kanga.kvack.org (Postfix) with ESMTP id 06DD56B0008 for ; Mon, 21 May 2018 11:20:59 -0400 (EDT) Received: by mail-pg0-f72.google.com with SMTP id t11-v6so4520988pgn.9 for ; Mon, 21 May 2018 08:20:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=+qXoWc9m1t3VT6I86x0msVkk0a5EDzoYUDMpAQp8jw4=; b=APEiY2xin2dYh/L5ZGHAp5Sh89G780XFhw8xri/0jc1bJ2XNq4+SIpmeOiwbHmO5Mr MGjC0JAyHv0Gw3YwUgpupD/cnPmSEHHBnhjfOo/cKcBhT99fZ9IX9+Uwe2SYhrum3dLJ Us99gb4YRbBVdj1fAqcFu7UY2cyy/kFGevmFzWljCJmBW4AE3pXpydNW9Tq7r7iDIbUA 5/SLbqhkMAZt5Fxk4qfAfpfOMVY1K1gWc4mR8AEdJTG5Xt2XhapRbXE5uY4ircLvIffa zc8QGP+qIM2m2vLU1YD3ewFG0MUKfkV3/oBnW5Dw+MAZf3pDL5k++BwMKFGaL4tYycof jSJA== X-Gm-Message-State: ALKqPwc0Hu2xC4G7Ovi6k16UCAnednFgS/7cmSGlMNc2i9ooysK9fV70 lGy5Tr/zHJ+8emfNpkIkoZR01v/2TxZvSfXb42qFVeTRF6cG9geEUmUO/7EVAB/N3mFeYiuZ9XR PVv4TOHq73zZPGll+79igWXsFokwmDm4a5wcz2/zZMA1+jcYuiVYrNF/B3/xBwP3lKR8xrETfM+ s9OLLEXj3dBZJd4bAW89EwVoW0RzkXwiWwZmfCCdyTUXz7+xa9VHCuDGIB3ady+vuqiUMqG4Ydq DyI7clrVEe8JSorIUltHTnsMAXRhRHb4JRvtsANfPWofid3PXexRhy/TqyMvgmO4GlXF2/HBxIS iv/EpnrKgYcIuwrbLsdTlFd/tDhEKinxqK3xd78cSxvdBSD4yRrR3tJpsWjJubMxIdlP4t8gnfS u X-Received: by 2002:a17:902:5952:: with SMTP id e18-v6mr21099415plj.351.1526916058723; Mon, 21 May 2018 08:20:58 -0700 (PDT) X-Received: by 2002:a17:902:5952:: with SMTP id e18-v6mr21099358plj.351.1526916057980; Mon, 21 May 2018 08:20:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526916057; cv=none; d=google.com; s=arc-20160816; b=P1+zKVm/6k5nGzZl/lyiqtYFBjTogD3TbrpdkXg9r4ZlC36vyJO5v/3CvDPLdmBmf/ rgI75qsphSlk59ONljkmIDosgGIKO7X4w2mSxj9F8sCM49LfU1ZHBylU0QrSmg0RaH2r wcWLn/m42LhJe1OFEKuGkDgdY3Fn1grCuzk/desriGNyQT1HXsfp4Xpq3kr1CwDCMu9k zRYGeEAXL+k3fw6wndKq0ctppzBKCzscTngjp585QJuEGPwHadm6Rkgxj+dHXNc1p6aS G8M8AV3hCHuf5WF2OvvxRY1E5V5lqJBDwIo1/YaZD8+u6HJcD77Wf1Iei4amoquDdAwf Dt2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=+qXoWc9m1t3VT6I86x0msVkk0a5EDzoYUDMpAQp8jw4=; b=vXUax++mMm0KMe6jrWpKUxy/B3EcHLwJruBie3ZVPN9mvTdn0K109KSXcNSoLX0kQA 5JryTpxxeSmrmdEX3+ZCKK+6emmWnx9s4pXbRAUd7lSgemzo7kp9fZgvVZod36j3Ak7W q6KUk3WuMy9oiK8C63LZNLQg4jENVyoMjMg01sFZwNmFZwKZNIsej5HRD8UVRGCi9IPK l4/DkocK9tcrWQklvkAzcs16CO/cj2SDG9tlQzIITl5JnjqIV1JK7RaFJvXKZvenVrFK 5es2nkp/Mk0L+8R8ZEJzkXXXW+QfUbSZL6GFu0l1dne4Qh+vvRfOpYZyxcuDoqXYjUiW KA9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OoNijXYv; spf=pass (google.com: domain of yehs2007@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=yehs2007@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id k10-v6sor1000896pgn.183.2018.05.21.08.20.57 for (Google Transport Security); Mon, 21 May 2018 08:20:57 -0700 (PDT) Received-SPF: pass (google.com: domain of yehs2007@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OoNijXYv; spf=pass (google.com: domain of yehs2007@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=yehs2007@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+qXoWc9m1t3VT6I86x0msVkk0a5EDzoYUDMpAQp8jw4=; b=OoNijXYvj4BvNZ5M4nJ4A4ukIAb0QnOJeyGY7OWlu5zqpXvr2mJEhirloS3ui3pdsF nlzyDC8YcS2E0+83YyQWFvHUoEeDZNievFTyFHbqvzp5mVXa6LItA5udcVx4A2+mBCNa a0uEHAeSQNYVNzfXh9xnbjLSX0VlK7ph2qUNihfnBggTkcOuxOwJL8QnpgoQclNTCOO1 ELB7S5SZPTGabm9HhW9ZdhtUOSORNke3qix5Ho0moDsJrUXdeEZ9u7cyV7r9A4OjBKL3 18aR6anPUPeLi5H8H2rYX1pV0S2r6eCwAaxqGSEEMIFTvcz2+/XNpFtTOnCftuB3mXCB 525Q== X-Google-Smtp-Source: AB8JxZqewaMO6N2bHpyXYSuDYmPj77UwH9wj1+0OYgDu4Sv0hKoq/yJBAz59W+ZZM7RsR0slj5L6UQ== X-Received: by 2002:a63:6e8b:: with SMTP id j133-v6mr5787324pgc.91.1526916057696; Mon, 21 May 2018 08:20:57 -0700 (PDT) Received: from localhost.localdomain ([125.33.105.40]) by smtp.gmail.com with ESMTPSA id t14-v6sm30844344pfh.109.2018.05.21.08.20.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 May 2018 08:20:57 -0700 (PDT) From: Huaisheng Ye To: akpm@linux-foundation.org, linux-mm@kvack.org Cc: mhocko@suse.com, willy@infradead.org, vbabka@suse.cz, mgorman@techsingularity.net, kstewart@linuxfoundation.org, alexander.levin@verizon.com, gregkh@linuxfoundation.org, colyli@suse.de, chengnt@lenovo.com, hehy1@lenovo.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, xen-devel@lists.xenproject.org, linux-btrfs@vger.kernel.org, Huaisheng Ye , Muli Ben-Yehuda , Jon Mason , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Subject: [RFC PATCH v2 03/12] arch/x86/kernel/pci-calgary_64: update usage of address zone modifiers Date: Mon, 21 May 2018 23:20:24 +0800 Message-Id: <1526916033-4877-4-git-send-email-yehs2007@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1526916033-4877-1-git-send-email-yehs2007@gmail.com> References: <1526916033-4877-1-git-send-email-yehs2007@gmail.com> 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 Use __GFP_ZONE_MASK to replace (__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32). ___GFP_DMA, ___GFP_HIGHMEM and ___GFP_DMA32 have been deleted from GFP bitmasks, the bottom three bits of GFP mask is reserved for storing encoded zone number. __GFP_DMA, __GFP_HIGHMEM and __GFP_DMA32 should not be operated by OR. Signed-off-by: Huaisheng Ye Cc: Muli Ben-Yehuda Cc: Jon Mason Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" --- arch/x86/kernel/pci-calgary_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index 35c461f..c89717d 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c @@ -445,7 +445,7 @@ static void* calgary_alloc_coherent(struct device *dev, size_t size, npages = size >> PAGE_SHIFT; order = get_order(size); - flag &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32); + flag &= ~__GFP_ZONE_MASK; /* alloc enough pages (and possibly more) */ ret = (void *)__get_free_pages(flag, order);