Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3493663ybi; Mon, 29 Jul 2019 07:30:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIfa6NNeOOJA65XOYFFZ3nsb7cIT8Nvvm2n5vfL6kMO/7LhqB18UKxpftT5IkKft/f0HLr X-Received: by 2002:a63:505a:: with SMTP id q26mr101868054pgl.18.1564410641982; Mon, 29 Jul 2019 07:30:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564410641; cv=none; d=google.com; s=arc-20160816; b=yoelEbm1WGp/01UxT6tPJIfMAu+D6km0J6xvjXHAE7MouqBEu9bFKw2MWxap+RNNxU PTQuF/xW2GaNIXs71P2YUfIlz9coObdZfdVmSQ8JMd/xrsq0ZHpCFUtTcGg/2GhTuhbc qxK5HLLoKKa0yMbldm+uG1PkNAsNTe7abjBeqKQPwLBL/QSojEkqXQq/J2h8enyB1oAQ HBIgbyRIbERoiKuzS8ctNy4U+m+TK6RMAS+CRrZp/srg9Bi2dgTYZ0hWLUbBMD3SArF6 q4+xJEwJ50tiRtCwajK6GM0AXIOaZGfdvUXer/s89ADsGTdwcT17kBJ7A2yx/oR9tzTf arug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=btXxqezSTYpMi2lLCeQ3gcAVYHUyBBOdSXXsZurrEew=; b=ZTNmr3wv1R5Npq8oac1ANzQViuS+fJrS3GHgHIV3diVuZZCtiHzTphbvq9Eh+O1fFj +Kbq13nVt1EDQxSgpVvzhA/9g6LLEXOgadEMHexxCZps77mzWyAZasYK3OGZ12Zg79qV S9ApWREGzWeeCUbgfiJV1M2DN7FWy5+DmE++Lyw6p/1Dh5DFODtCt520xp1/rPv8QTB7 r9btx4G4f4lzpLrCWqIaXxvmNvbBFgmPMWXkw/Pw3kk0+qoMwY2RVV7PWagyGEULNG6Q /20NppzsvGvTZ+VfWj51HCL2i8Wsr37Mg5oPe3YyPx7Usf0kIuE1tbqlICBtrd9Dsq7A qJvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZXUwnk7x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32si27868510pgm.409.2019.07.29.07.30.26; Mon, 29 Jul 2019 07:30:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZXUwnk7x; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727502AbfG2O3U (ORCPT + 99 others); Mon, 29 Jul 2019 10:29:20 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46996 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728486AbfG2O3T (ORCPT ); Mon, 29 Jul 2019 10:29:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=btXxqezSTYpMi2lLCeQ3gcAVYHUyBBOdSXXsZurrEew=; b=ZXUwnk7xK0eKvyNMCJiotaRVYY rDFhDzOGkIe8OqjwqnrED1/er13fgyYhrlvT/BdF5iqD2+fHbtr+SI6BVjX7Y8UUDrM5++0RTtGD+ A6wiqxzp5hNljbLRwzQ62Oxo0eirdUqNPJBq/QV7OfJFQt+QafoC8dV+5GO3zFNzfnYPHLQIGe9Me uVgP7tYhnsmBNwE9+DLYy6MFGcMI2KOY40RRE4FWvTaRyAvNOgfRu14N1QeGfaqlBnzHHd60ZFwpx XrKs7PeR4RmkKc8b/thC2CTBP75FhQaJQp1/nAV/tBf5G2wLyPJyvf25PxBVnv3It7Os91C9hkzNf KazPletQ==; Received: from [195.167.85.94] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hs6eK-0006O9-Rc; Mon, 29 Jul 2019 14:29:17 +0000 From: Christoph Hellwig To: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Jason Gunthorpe , Ben Skeggs Cc: Ralph Campbell , Bharata B Rao , Andrew Morton , linux-mm@kvack.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 8/9] mm: remove the unused MIGRATE_PFN_DEVICE flag Date: Mon, 29 Jul 2019 17:28:42 +0300 Message-Id: <20190729142843.22320-9-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190729142843.22320-1-hch@lst.de> References: <20190729142843.22320-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No one ever checks this flag, and we could easily get that information from the page if needed. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 3 +-- include/linux/migrate.h | 1 - mm/migrate.c | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c index 6cb930755970..f04686a2c21f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dmem.c +++ b/drivers/gpu/drm/nouveau/nouveau_dmem.c @@ -582,8 +582,7 @@ static unsigned long nouveau_dmem_migrate_copy_one(struct nouveau_drm *drm, *dma_addr)) goto out_dma_unmap; - return migrate_pfn(page_to_pfn(dpage)) | - MIGRATE_PFN_LOCKED | MIGRATE_PFN_DEVICE; + return migrate_pfn(page_to_pfn(dpage)) | MIGRATE_PFN_LOCKED; out_dma_unmap: dma_unmap_page(dev, *dma_addr, PAGE_SIZE, DMA_BIDIRECTIONAL); diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 229153c2c496..8b46cfdb1a0e 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h @@ -166,7 +166,6 @@ static inline int migrate_misplaced_transhuge_page(struct mm_struct *mm, #define MIGRATE_PFN_MIGRATE (1UL << 1) #define MIGRATE_PFN_LOCKED (1UL << 2) #define MIGRATE_PFN_WRITE (1UL << 3) -#define MIGRATE_PFN_DEVICE (1UL << 4) #define MIGRATE_PFN_SHIFT 6 static inline struct page *migrate_pfn_to_page(unsigned long mpfn) diff --git a/mm/migrate.c b/mm/migrate.c index dc4e60a496f2..74735256e260 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2237,8 +2237,8 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp, goto next; page = device_private_entry_to_page(entry); - mpfn = migrate_pfn(page_to_pfn(page))| - MIGRATE_PFN_DEVICE | MIGRATE_PFN_MIGRATE; + mpfn = migrate_pfn(page_to_pfn(page)) | + MIGRATE_PFN_MIGRATE; if (is_write_device_private_entry(entry)) mpfn |= MIGRATE_PFN_WRITE; } else { -- 2.20.1