From patchwork Mon Sep 14 21:38:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Campbell X-Patchwork-Id: 11774959 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B416B618 for ; Mon, 14 Sep 2020 21:38:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6B66D20E65 for ; Mon, 14 Sep 2020 21:38:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="BNGhvkUh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B66D20E65 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5C45A900006; Mon, 14 Sep 2020 17:38:07 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 54D9B8E0001; Mon, 14 Sep 2020 17:38:07 -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 4147F900006; Mon, 14 Sep 2020 17:38:07 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id 289BC8E0001 for ; Mon, 14 Sep 2020 17:38:07 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E2768180AD804 for ; Mon, 14 Sep 2020 21:38:06 +0000 (UTC) X-FDA: 77262980172.15.move17_5b064762710b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id B03601814B0C1 for ; Mon, 14 Sep 2020 21:38:06 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,rcampbell@nvidia.com,,RULES_HIT:30012:30054:30056:30064:30080,0,RBL:216.228.121.143:@nvidia.com:.lbl8.mailshell.net-64.10.201.10 62.18.0.100;04yfa3go8ddac8n4x8kqrew1pj1i4ycea3a764whpxtnryydxfwojhu4j5ncfys.zbbx56km36i94u75szkddoujq43fm8qkzm3hdnjru7shhwbdss8gqwob1trkupz.c-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: move17_5b064762710b X-Filterd-Recvd-Size: 4176 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Sep 2020 21:38:05 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 14 Sep 2020 14:35:44 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 14 Sep 2020 14:38:04 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 14 Sep 2020 14:38:04 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 14 Sep 2020 21:38:04 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 14 Sep 2020 21:38:04 +0000 Received: from rcampbell-dev.nvidia.com (Not Verified[10.110.48.66]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Mon, 14 Sep 2020 14:38:04 -0700 From: Ralph Campbell To: , CC: Jerome Glisse , Andrew Morton , Ralph Campbell Subject: [PATCH] hmm/test: remove unused dmirror_zero_page Date: Mon, 14 Sep 2020 14:38:01 -0700 Message-ID: <20200914213801.16520-1-rcampbell@nvidia.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1600119344; bh=/ehxgyAd0to++qcy0nw+lw74+CJwaK3eELXvYHOH04U=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:X-NVConfidentiality:Content-Transfer-Encoding: Content-Type; b=BNGhvkUhGaPzR2Su8Yf85FP0WTC4Ex3+dP1SQBuUhsLIlziIr7iW6XmP7QQAaV33C OVeibN5Dc2drX1yhsalabrjJhDd9R5EiriPw5QnueLqqGQm+b+KZ19LycAdNhNbMm6 eLyzD6uFxQSLToXH2zIqn5EIUrQ6HAJDPwicKbQR6GC5rnBwgx+4aos7f9+G2yJ5nI DKJrJjZKt0nkyvNne0INe3ZI3vdnJffT/tWkrHhgb7pqDsOozWCDSRaRvN5ll5hI3v VELlwhMC6y9A3iOyHdI8XcEXUDpPwjY9N01v6Ju/6f4OY/ejtFbpWmPYq+Rqxee+dy OOdt1cfd6+tww== X-Rspamd-Queue-Id: B03601814B0C1 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: The variable dmirror_zero_page is unused in the HMM self test driver which was probably intended to demonstrate how a driver could use migrate_vma_setup() to share a single read-only device private zero page similar to how the CPU does. However, this isn't needed for the self tests so remove it. Signed-off-by: Ralph Campbell --- This applies to linux-mm and is intended for Andrew Morton's git tree. lib/test_hmm.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/test_hmm.c b/lib/test_hmm.c index e3065d6123f0..c8133f50160b 100644 --- a/lib/test_hmm.c +++ b/lib/test_hmm.c @@ -36,7 +36,6 @@ static const struct dev_pagemap_ops dmirror_devmem_ops; static const struct mmu_interval_notifier_ops dmirror_min_ops; static dev_t dmirror_dev; -static struct page *dmirror_zero_page; struct dmirror_device; @@ -1127,17 +1126,6 @@ static int __init hmm_dmirror_init(void) goto err_chrdev; } - /* - * Allocate a zero page to simulate a reserved page of device private - * memory which is always zero. The zero_pfn page isn't used just to - * make the code here simpler (i.e., we need a struct page for it). - */ - dmirror_zero_page = alloc_page(GFP_HIGHUSER | __GFP_ZERO); - if (!dmirror_zero_page) { - ret = -ENOMEM; - goto err_chrdev; - } - pr_info("HMM test module loaded. This is only for testing HMM.\n"); return 0; @@ -1153,8 +1141,6 @@ static void __exit hmm_dmirror_exit(void) { int id; - if (dmirror_zero_page) - __free_page(dmirror_zero_page); for (id = 0; id < DMIRROR_NDEVICES; id++) dmirror_device_remove(dmirror_devices + id); unregister_chrdev_region(dmirror_dev, DMIRROR_NDEVICES);